parser.add_argument("--freeze-settings",action='store_true',help="disable editing of all settings globally",default=False)
parser.add_argument("--freeze-settings-in-sections",type=str,help='disable editing settings in specific sections of the settings page by specifying a comma-delimited list such like "saving-images,upscaling". The list of setting names can be found in the modules/shared_options.py file',default=None)
parser.add_argument("--freeze-specific-settings",type=str,help='disable editing of individual settings by specifying a comma-delimited list like "samples_save,samples_format". The list of setting names can be found in the config.json file',default=None)
parser.add_argument("--ui-settings-file",type=str,help="filename to use for ui settings",default=os.path.join(data_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)
...
...
@@ -91,7 +93,7 @@ parser.add_argument("--autolaunch", action='store_true', help="open the webui UR
parser.add_argument("--theme",type=str,help="launches the UI with light or dark theme",default=None)
parser.add_argument("--use-textbox-seed",action='store_true',help="use textbox for seeds in UI (no up/down, but possible to input long seeds)",default=False)
parser.add_argument("--disable-console-progressbars",action='store_true',help="do not output progressbars to console",default=False)
parser.add_argument("--enable-console-prompts",action='store_true',help="does not do anything",default=False)# Legacy compatibility, use as default value shared.opts.enable_console_prompts
parser.add_argument("--enable-console-prompts",action='store_true',help="print prompts to console when generating with txt2img and img2img",default=False)
parser.add_argument('--vae-path',type=str,help='Checkpoint to use as VAE; setting this argument disables all settings related to VAE',default=None)
parser.add_argument("--disable-safe-unpickle",action='store_true',help="disable checking pytorch models for malicious code",default=False)
parser.add_argument("--api",action='store_true',help="use api=True to launch the API together with the webui (use --nowebui instead for only the API)")
...
...
@@ -113,9 +115,8 @@ parser.add_argument("--skip-version-check", action='store_true', help="Do not ch
parser.add_argument("--no-hashing",action='store_true',help="disable sha256 hashing of checkpoints to help loading performance",default=False)
parser.add_argument("--no-download-sd-model",action='store_true',help="don't download SD1.5 model even if no model is found in --ckpt-dir",default=False)
parser.add_argument('--subpath',type=str,help='customize the subpath for gradio, use with reverse proxy')
parser.add_argument('--add-stop-route',action='store_true',help='does not do anything')
parser.add_argument('--add-stop-route',action='store_true',help='add /_stop route to stop server')
parser.add_argument('--api-server-stop',action='store_true',help='enable server stop/restart/kill via api')
parser.add_argument('--timeout-keep-alive',type=int,default=30,help='set timeout_keep_alive for uvicorn')
parser.add_argument("--disable-all-extensions",action='store_true',help="prevent all extensions from running regardless of any other settings",default=False)
parser.add_argument("--disable-extra-extensions",action='store_true',help="prevent all extensions except built-in from running regardless of any other settings",default=False)
parser.add_argument("--skip-load-model-at-start",action='store_true',help="if load a model at web start, only take effect when --nowebui",)
parser.add_argument("--disable-extra-extensions",action='store_true',help=" prevent all extensions except built-in from running regardless of any other settings",default=False)
raiseRuntimeError(f"not possible to set {key} because it is restricted")
raiseRuntimeError(f"not possible to set '{key}' because it is restricted")
# Check that this section isn't frozen
ifcmd_opts.freeze_settings_in_sectionsisnotNone:
frozen_sections=list(map(str.strip,cmd_opts.freeze_settings_in_sections.split(',')))# Trim whitespace from section names
section_key=info.section[0]
section_name=info.section[1]
assertsection_keynotinfrozen_sections,f"not possible to set '{key}' because settings in section '{section_name}' ({section_key}) are frozen with --freeze-settings-in-sections"
# Check that this section of the settings isn't frozen
ifcmd_opts.freeze_specific_settingsisnotNone:
frozen_keys=list(map(str.strip,cmd_opts.freeze_specific_settings.split(',')))# Trim whitespace from setting keys
assertkeynotinfrozen_keys,f"not possible to set '{key}' because this setting is frozen with --freeze-specific-settings"
# Check shorthand option which disables editing options in "saving-paths"