parser.add_argument("--scunet-models-path",type=str,help="Path to directory with ScuNET model file(s).",default=os.path.join(paths.models_path,'ScuNET'))
parser.add_argument("--swinir-models-path",type=str,help="Path to directory with SwinIR model file(s).",default=os.path.join(paths.models_path,'SwinIR'))
shared.opts.add_option("SWIN_tile",shared.OptionInfo(192,"Tile size for all SwinIR.",gr.Slider,{"minimum":16,"maximum":512,"step":16},section=('upscaling',"Upscaling")))
shared.opts.add_option("SWIN_tile_overlap",shared.OptionInfo(8,"Tile overlap, in pixels for SwinIR. Low values = visible seam.",gr.Slider,{"minimum":0,"maximum":48,"step":1},section=('upscaling',"Upscaling")))
"Learning rate":"how fast should the training go. Low values will take longer to train, high values may fail to converge (not generate accurate results) and/or may break the embedding (This has happened if you see Loss: nan in the training info textbox. If this happens, you need to manually restore your embedding from an older not-broken backup).\n\nYou can set a single numeric value, or multiple learning rates using the syntax:\n\n rate_1:max_steps_1, rate_2:max_steps_2, ...\n\nEG: 0.005:100, 1e-3:1000, 1e-5\n\nWill train with rate of 0.005 for first 100 steps, then 1e-3 until 1000 steps, then 1e-5 for all remaining steps.",
"Clip skip":"Early stopping parameter for CLIP model; 1 is stop at last layer as usual, 2 is stop at penultimate layer, etc."
@@ -50,9 +50,6 @@ parser.add_argument("--gfpgan-models-path", type=str, help="Path to directory wi
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("--clip-models-path",type=str,help="Path to directory with CLIP model file(s).",default=None)
parser.add_argument("--xformers",action='store_true',help="enable xformers for cross attention layers")
parser.add_argument("--force-enable-xformers",action='store_true',help="enable xformers for cross attention layers regardless of whether the checking code thinks you can run it; do not make bug reports if this fails to work")
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("--use-cpu",nargs='+',choices=['all','sd','interrogate','gfpgan','swinir','esrgan','scunet','codeformer'],help="use CPU as torch device for specified modules",default=[],type=str.lower)
parser.add_argument("--use-cpu",nargs='+',help="use CPU as torch device for specified modules",default=[],type=str.lower)
parser.add_argument("--listen",action='store_true',help="launch gradio with 0.0.0.0 as server name, allowing to respond to network requests")
parser.add_argument("--port",type=int,help="launch gradio with given server port, you need root/admin rights for ports < 1024, defaults to 7860 if available",default=None)
parser.add_argument("--show-negative-prompt",action='store_true',help="does not do anything",default=False)
...
...
@@ -72,6 +69,7 @@ parser.add_argument("--ui-settings-file", type=str, help="filename to use for ui
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("--gradio-inpaint-tool",type=str,choices=["sketch","color-sketch"],default="sketch",help="gradio inpainting editor: can be either sketch to only blur/noise the input, or color-sketch to paint over it")
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)
"ESRGAN_tile":OptionInfo(192,"Tile size for ESRGAN upscalers. 0 = no tiling.",gr.Slider,{"minimum":0,"maximum":512,"step":16}),
"ESRGAN_tile_overlap":OptionInfo(8,"Tile overlap, in pixels for ESRGAN upscalers. Low values = visible seam.",gr.Slider,{"minimum":0,"maximum":48,"step":1}),
"realesrgan_enabled_models":OptionInfo(["R-ESRGAN 4x+","R-ESRGAN 4x+ Anime6B"],"Select which Real-ESRGAN models to show in the web UI. (Requires restart)",gr.CheckboxGroup,lambda:{"choices":realesrgan_models_names()}),
"SWIN_tile":OptionInfo(192,"Tile size for all SwinIR.",gr.Slider,{"minimum":16,"maximum":512,"step":16}),
"SWIN_tile_overlap":OptionInfo(8,"Tile overlap, in pixels for SwinIR. Low values = visible seam.",gr.Slider,{"minimum":0,"maximum":48,"step":1}),
"enable_batch_seeds":OptionInfo(True,"Make K-diffusion samplers produce same images in a batch as when making a single image"),
"comma_padding_backtrack":OptionInfo(20,"Increase coherency by padding from the last comma within n tokens when using more than 75 tokens",gr.Slider,{"minimum":0,"maximum":74,"step":1}),
"random_artist_categories":OptionInfo([],"Allowed categories for random artists selection when using the Roll button",gr.CheckboxGroup,{"choices":artist_db.categories()}),
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).style(height=480)
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").style(height=480)
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=cmd_opts.gradio_inpaint_tool,image_mode="RGBA").style(height=480)
init_img_inpaint=gr.Image(label="Image for img2img",show_label=False,source="upload",interactive=True,type="pil",visible=False,elem_id="img_inpaint_base")