提交 26ce47eb 编写于 作者: A AUTOMATIC

[Feature Request] Ability to pass a custom ui-config.json via command line args #212

上级 d55a7310
...@@ -38,6 +38,7 @@ parser.add_argument("--opt-split-attention", action='store_true', help="enable o ...@@ -38,6 +38,7 @@ parser.add_argument("--opt-split-attention", action='store_true', help="enable o
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("--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("--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="enable the field that lets you input negative prompt", default=False) parser.add_argument("--show-negative-prompt", action='store_true', help="enable the field that lets you input negative prompt", default=False)
parser.add_argument("--ui-config-file", type=str, help="filename to use for ui configuration", default=os.path.join(script_path, 'ui-config.json'))
cmd_opts = parser.parse_args() cmd_opts = parser.parse_args()
......
...@@ -747,7 +747,7 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo): ...@@ -747,7 +747,7 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo):
css=css, css=css,
) )
ui_config_file = os.path.join(modules.paths.script_path, 'ui-config.json') ui_config_file = cmd_opts.ui_config_file
ui_settings = {} ui_settings = {}
settings_count = len(ui_settings) settings_count = len(ui_settings)
error_loading = False error_loading = False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册