From ab0a79cdf40a149442a759226cf990b7f3033b01 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Mon, 12 Sep 2022 09:00:11 +0300 Subject: keep interrogate models not in vram by default --- modules/shared.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/shared.py') diff --git a/modules/shared.py b/modules/shared.py index d828aa34..a78c7f89 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -127,7 +127,7 @@ class Options: "multiple_tqdm": OptionInfo(True, "Add a second progress bar to the console that shows progress for an entire job. Broken in PyCharm console."), "face_restoration_model": OptionInfo(None, "Face restoration model", gr.Radio, lambda: {"choices": [x.name() for x in face_restorers]}), "code_former_weight": OptionInfo(0.5, "CodeFormer weight parameter; 0 = maximum effect; 1 = minimum effect", gr.Slider, {"minimum": 0, "maximum": 1, "step": 0.01}), - "interrogate_keep_models_in_memory": OptionInfo(True, "Interrogate: keep models in VRAM"), + "interrogate_keep_models_in_memory": OptionInfo(False, "Interrogate: keep models in VRAM"), "interrogate_use_builtin_artists": OptionInfo(True, "Interrogate: use artists from artists.csv"), "interrogate_clip_num_beams": OptionInfo(1, "Interrogate: num_beams for BLIP", gr.Slider, {"minimum": 1, "maximum": 16, "step": 1}), "interrogate_clip_min_length": OptionInfo(24, "Interrogate: minimum descripton length (excluding artists, etc..)", gr.Slider, {"minimum": 1, "maximum": 128, "step": 1}), -- cgit v1.2.3 From 655ef8e8cb3db06cccf8a43e583918ce5aa38ef1 Mon Sep 17 00:00:00 2001 From: Stephan Reinwald Date: Mon, 12 Sep 2022 08:44:45 +0200 Subject: Added cmd arg to load custom ui settings file --- modules/shared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/shared.py') diff --git a/modules/shared.py b/modules/shared.py index a78c7f89..64861016 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -13,8 +13,6 @@ from modules.devices import get_optimal_device import modules.styles import modules.interrogate -config_filename = "config.json" - sd_model_file = os.path.join(script_path, 'model.ckpt') if not os.path.exists(sd_model_file): sd_model_file = "models/ldm/stable-diffusion-v1/model.ckpt" @@ -42,6 +40,7 @@ parser.add_argument("--listen", action='store_true', help="launch gradio with 0. 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) parser.add_argument("--ui-config-file", type=str, help="filename to use for ui configuration", default=os.path.join(script_path, 'ui-config.json')) +parser.add_argument("--ui-settings-file", type=str, help="filename to use for ui settings", default=os.path.join(script_path, 'config.json')) cmd_opts = parser.parse_args() @@ -50,6 +49,7 @@ device = get_optimal_device() batch_cond_uncond = cmd_opts.always_batch_cond_uncond or not (cmd_opts.lowvram or cmd_opts.medvram) parallel_processing_allowed = not cmd_opts.lowvram and not cmd_opts.medvram +config_filename = cmd_opts.ui_settings_file class State: interrupted = False -- cgit v1.2.3 From 9bb20be09092bb6c568f676b63105fb85b0c05cf Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Mon, 12 Sep 2022 11:55:27 +0300 Subject: memory optimization for CLIP interrogator changed default cfg_scale to a higher value --- modules/shared.py | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/shared.py') diff --git a/modules/shared.py b/modules/shared.py index a78c7f89..c7e60706 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -132,6 +132,7 @@ class Options: "interrogate_clip_num_beams": OptionInfo(1, "Interrogate: num_beams for BLIP", gr.Slider, {"minimum": 1, "maximum": 16, "step": 1}), "interrogate_clip_min_length": OptionInfo(24, "Interrogate: minimum descripton length (excluding artists, etc..)", gr.Slider, {"minimum": 1, "maximum": 128, "step": 1}), "interrogate_clip_max_length": OptionInfo(48, "Interrogate: maximum descripton length", gr.Slider, {"minimum": 1, "maximum": 256, "step": 1}), + "interrogate_clip_dict_limit": OptionInfo(1500, "Interrogate: maximum number of lines in text file (0 = No limit)"), } def __init__(self): -- cgit v1.2.3 From ddc86f2edb1db6ac3b708cf4a6ad6da5601d778c Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Mon, 12 Sep 2022 12:40:55 +0300 Subject: --gradio-debug for collab users --- modules/shared.py | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/shared.py') diff --git a/modules/shared.py b/modules/shared.py index 03478020..cae6a0bc 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -41,6 +41,7 @@ parser.add_argument("--port", type=int, help="launch gradio with given server po parser.add_argument("--show-negative-prompt", action='store_true', help="does not do anything", 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')) 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") cmd_opts = parser.parse_args() -- cgit v1.2.3