@@ -157,5 +157,6 @@ Licenses for borrowed code can be found in `Settings -> Licenses` screen, and al
- Sampling in float32 precision from a float16 UNet - marunine for the idea, Birch-san for the example Diffusers implementation (https://github.com/Birch-san/diffusers-play/tree/92feee6)
- Instruct pix2pix - Tim Brooks (star), Aleksander Holynski (star), Alexei A. Efros (no star) - https://github.com/timothybrooks/instruct-pix2pix
"GFPGAN":"Restore low quality faces using GFPGAN neural network",
"Euler a":"Euler Ancestral - very creative, each can get a completely different picture depending on step count, setting steps higher than 30-40 does not help",
"DDIM":"Denoising Diffusion Implicit Models - best at inpainting",
"UniPC":"Unified Predictor-Corrector Framework for Fast Sampling of Diffusion Models",
"DPM adaptive":"Ignores step count - uses a number of steps determined by the CFG and resolution",
"Batch count":"How many batches of images to create (has no impact on generation performance or VRAM usage)",
can_use_sdp=hasattr(torch.nn.functional,"scaled_dot_product_attention")andcallable(getattr(torch.nn.functional,"scaled_dot_product_attention"))# not everyone has torch 2.x to use sdp
# Based on Diffusers usage of scaled dot product attention from https://github.com/huggingface/diffusers/blob/c7da8fd23359a22d0df2741688b5b4f33c26df21/src/diffusers/models/cross_attention.py
# The scaled_dot_product_attention_forward function contains parts of code under Apache-2.0 license listed under Scaled Dot Product Attention in the Licenses section of the web UI interface
parser.add_argument("--sub-quad-chunk-threshold",type=int,help="the percentage of VRAM threshold for the sub-quadratic cross-attention layer optimization to use chunking",default=None)
parser.add_argument("--opt-split-attention-invokeai",action='store_true',help="force-enables InvokeAI's cross-attention layer optimization. By default, it's on when cuda is unavailable.")
parser.add_argument("--opt-split-attention-v1",action='store_true',help="enable older version of split attention optimization that does not consume all the VRAM it can find")
parser.add_argument("--disable-nan-check",action='store_true',help="do not check if produced images/latent spaces have nans; useful for running without a checkpoint in CI")
parser.add_argument("--use-cpu",nargs='+',help="use CPU as torch device for specified modules",default=[],type=str.lower)
...
...
@@ -114,7 +116,10 @@ parser.add_argument("--no-download-sd-model", action='store_true', help="don't d
"save_images_before_highres_fix":OptionInfo(False,"Save a copy of image before applying highres fix."),
"save_images_before_color_correction":OptionInfo(False,"Save a copy of image before applying color correction to img2img results"),
"jpeg_quality":OptionInfo(80,"Quality for saved jpeg images",gr.Slider,{"minimum":1,"maximum":100,"step":1}),
"webp_lossless":OptionInfo(False,"Use lossless compression for webp images"),
"export_for_4chan":OptionInfo(True,"If the saved image file size is above the limit, or its either width or height are above the limit, save a downscaled copy as JPG"),
"img_downscale_threshold":OptionInfo(4.0,"File size limit for the above option, MB",gr.Number),
"target_side_length":OptionInfo(4000,"Width/height limit for the above option, in pixels",gr.Number),
"img_max_size_mp":OptionInfo(200,"Maximum image size, in megapixels",gr.Number),
"use_original_name_batch":OptionInfo(True,"Use original name for output filename during batch process in extras tab"),
"use_upscaler_name_as_suffix":OptionInfo(False,"Use upscaler name as filename suffix in the extras tab"),
"extra_networks_default_view":OptionInfo("cards","Default view for Extra Networks",gr.Dropdown,{"choices":["cards","thumbs"]}),
"extra_networks_default_multiplier":OptionInfo(1.0,"Multiplier for extra networks",gr.Slider,{"minimum":0.0,"maximum":1.0,"step":0.01}),
"extra_networks_add_text_separator":OptionInfo(" ","Extra text to add before <...> when adding extra network to prompt"),
"sd_hypernetwork":OptionInfo("None","Add hypernetwork to prompt",gr.Dropdown,lambda:{"choices":[""]+[xforxinhypernetworks.keys()]},refresh=reload_hypernetworks),
"keyedit_precision_attention":OptionInfo(0.1,"Ctrl+up/down precision when editing (attention:1.1)",gr.Slider,{"minimum":0.01,"maximum":0.2,"step":0.001}),
"keyedit_precision_extra":OptionInfo(0.05,"Ctrl+up/down precision when editing <extra networks:0.9>",gr.Slider,{"minimum":0.01,"maximum":0.2,"step":0.001}),
available_extensions_index=gr.Text(value="https://raw.githubusercontent.com/wiki/AUTOMATIC1111/stable-diffusion-webui/Extensions-index.md",label="Extension index URL").style(container=False)
available_extensions_index=gr.Text(value="https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui-extensions/master/index.json",label="Extension index URL").style(container=False)