@@ -16,6 +16,7 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
- Attention, specify parts of text that the model should pay more attention to
- a man in a ((tuxedo)) - will pay more attention to tuxedo
- a man in a (tuxedo:1.21) - alternative syntax
- select text and press ctrl+up or ctrl+down to aduotmatically adjust attention to selected text
- Loopback, run img2img processing multiple times
- X/Y plot, a way to draw a 2 dimensional plot of images with different parameters
- Textual Inversion
...
...
@@ -61,6 +62,9 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
- Reloading checkpoints on the fly
- Checkpoint Merger, a tab that allows you to merge two checkpoints into one
-[Custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts) with many extensions from community
-[Composable-Diffusion](https://energy-based-model.github.io/Compositional-Visual-Generation-with-Composable-Diffusion-Models/), a way to use multiple prompts at once
- separate prompts using uppercase `AND`
- also supports weights for prompts: `a cat :1.2 AND a dog AND a penguin :2.2`
## Installation and Running
Make sure the required [dependencies](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Dependencies) are met and follow the instructions available for both [NVidia](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs)(recommended) and [AMD](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs) GPUs.
run(f'"{git}" -C {dir} fetch',f"Fetching updates for {name}...",f"Couldn't fetch {name}")
run(f'"{git}" -C {dir} checkout {commithash}',f"Checking out commint for {name} with hash: {commithash}...",f"Couldn't checkout commit {commithash} for {name}")
return
run(f'"{git}" clone "{url}" "{dir}"',f"Cloning {name} into {dir}...",f"Couldn't clone {name}")
parser.add_argument("--config",type=str,default=os.path.join(sd_path,"configs/stable-diffusion/v1-inference.yaml"),help="path to config which constructs model",)
parser.add_argument("--ckpt",type=str,default=sd_model_file,help="path to checkpoint of stable diffusion model; if specified, this checkpoint will be added to the list of checkpoints and loaded",)
parser.add_argument("--unload-gfpgan",action='store_true',help="does not do anything.")
parser.add_argument("--precision",type=str,help="evaluate at this precision",choices=["full","autocast"],default="autocast")
parser.add_argument("--share",action='store_true',help="use share=True for gradio and make the UI accessible through their site (doesn't work for me but you might have better luck)")
parser.add_argument("--codeformer-models-path",type=str,help="Path to directory with codeformer model file(s).",default=os.path.join(model_path,'Codeformer'))
parser.add_argument("--gfpgan-models-path",type=str,help="Path to directory with GFPGAN model file(s).",default=os.path.join(model_path,'GFPGAN'))
parser.add_argument("--esrgan-models-path",type=str,help="Path to directory with ESRGAN model file(s).",default=os.path.join(model_path,'ESRGAN'))
parser.add_argument("--bsrgan-models-path",type=str,help="Path to directory with BSRGAN model file(s).",default=os.path.join(model_path,'BSRGAN'))
parser.add_argument("--realesrgan-models-path",type=str,help="Path to directory with RealESRGAN model file(s).",default=os.path.join(model_path,'RealESRGAN'))
parser.add_argument("--scunet-models-path",type=str,help="Path to directory with ScuNET model file(s).",default=os.path.join(model_path,'ScuNET'))
parser.add_argument("--swinir-models-path",type=str,help="Path to directory with SwinIR model file(s).",default=os.path.join(model_path,'SwinIR'))
parser.add_argument("--ldsr-models-path",type=str,help="Path to directory with LDSR model file(s).",default=os.path.join(model_path,'LDSR'))
parser.add_argument("--codeformer-models-path",type=str,help="Path to directory with codeformer model file(s).",default=os.path.join(models_path,'Codeformer'))
parser.add_argument("--gfpgan-models-path",type=str,help="Path to directory with GFPGAN model file(s).",default=os.path.join(models_path,'GFPGAN'))
parser.add_argument("--esrgan-models-path",type=str,help="Path to directory with ESRGAN model file(s).",default=os.path.join(models_path,'ESRGAN'))
parser.add_argument("--bsrgan-models-path",type=str,help="Path to directory with BSRGAN model file(s).",default=os.path.join(models_path,'BSRGAN'))
parser.add_argument("--realesrgan-models-path",type=str,help="Path to directory with RealESRGAN model file(s).",default=os.path.join(models_path,'RealESRGAN'))
parser.add_argument("--scunet-models-path",type=str,help="Path to directory with ScuNET model file(s).",default=os.path.join(models_path,'ScuNET'))
parser.add_argument("--swinir-models-path",type=str,help="Path to directory with SwinIR model file(s).",default=os.path.join(models_path,'SwinIR'))
parser.add_argument("--ldsr-models-path",type=str,help="Path to directory with LDSR model file(s).",default=os.path.join(models_path,'LDSR'))
parser.add_argument("--opt-split-attention",action='store_true',help="force-enables cross-attention layer optimization. By default, it's on for torch.cuda and off for other torch devices.")
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")
...
...
@@ -55,6 +55,7 @@ parser.add_argument("--hide-ui-dir-config", action='store_true', help="hide dire
parser.add_argument("--ui-settings-file",type=str,help="filename to use for ui settings",default=os.path.join(script_path,'config.json'))
parser.add_argument("--gradio-debug",action='store_true',help="launch gradio with --debug option")
parser.add_argument("--gradio-auth",type=str,help='set gradio authentication like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"',default=None)
parser.add_argument("--gradio-img2img-tool",type=str,help='gradio image uploader tool: can be either editor for ctopping, or color-sketch for drawing',choices=["color-sketch","editor"],default="editor")
parser.add_argument("--opt-channelslast",action='store_true',help="change memory type for stable diffusion to channels last")
parser.add_argument("--styles-file",type=str,help="filename to use for styles",default=os.path.join(script_path,'styles.csv'))
parser.add_argument("--autolaunch",action='store_true',help="open the webui URL in the system's default browser upon launch",default=False)
...
...
@@ -75,6 +76,12 @@ parallel_processing_allowed = not cmd_opts.lowvram and not cmd_opts.medvram
"img2img_color_correction":OptionInfo(False,"Apply color correction to img2img results to match original colors."),
"save_images_before_color_correction":OptionInfo(False,"Save a copy of image before applying color correction to img2img results"),
"img2img_fix_steps":OptionInfo(False,"With img2img, do exactly the amount of steps the slider specifies (normally you'd do less with less denoising)."),
"hide_samplers":OptionInfo([],"Hide samplers in user interface (requires restart)",gr.CheckboxGroup,lambda:{"choices":[x.nameforxinsd_samplers.all_samplers]}),
"eta_ddim":OptionInfo(0.0,"eta (noise multiplier) for DDIM",gr.Slider,{"minimum":0.0,"maximum":1.0,"step":0.01}),
"eta_ancestral":OptionInfo(1.0,"eta (noise multiplier) for ancestral samplers",gr.Slider,{"minimum":0.0,"maximum":1.0,"step":0.01}),
"ddim_discretize":OptionInfo('uniform',"img2img DDIM discretize",gr.Radio,{"choices":['uniform','quad']}),
ifindex>-1andopts.save_selected_onlyand(index>=data["index_of_first_image"]):# ensures we are looking at a specific non-grid picture, and we have save_selected_only
init_img=gr.Image(label="Image for img2img",show_label=False,source="upload",interactive=True,type="pil")
init_img=gr.Image(label="Image for img2img",elem_id="img2img_image",show_label=False,source="upload",interactive=True,type="pil",tool=cmd_opts.gradio_img2img_tool)
withgr.TabItem('Inpaint',id='inpaint'):
init_img_with_mask=gr.Image(label="Image for inpainting with mask",show_label=False,elem_id="img2maskimg",source="upload",interactive=True,type="pil",tool="sketch",image_mode="RGBA")