From 8d45b3be18f19f800a8f3099a81665435d6e5bd0 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Thu, 1 Sep 2022 21:26:46 +0300 Subject: [PATCH] now things are going to work --- webui.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/webui.py b/webui.py index e56900a1..3bdda039 100644 --- a/webui.py +++ b/webui.py @@ -1974,18 +1974,17 @@ try: except Exception: pass -if False: - sd_config = OmegaConf.load(cmd_opts.config) - sd_model = load_model_from_config(sd_config, cmd_opts.ckpt) - sd_model = (sd_model if cmd_opts.no_half else sd_model.half()) +sd_config = OmegaConf.load(cmd_opts.config) +sd_model = load_model_from_config(sd_config, cmd_opts.ckpt) +sd_model = (sd_model if cmd_opts.no_half else sd_model.half()) - if cmd_opts.lowvram or cmd_opts.medvram: - setup_for_low_vram(sd_model) - else: - sd_model = sd_model.to(device) +if cmd_opts.lowvram or cmd_opts.medvram: + setup_for_low_vram(sd_model) +else: + sd_model = sd_model.to(device) - model_hijack = StableDiffusionModelHijack() - model_hijack.hijack(sd_model) +model_hijack = StableDiffusionModelHijack() +model_hijack.hijack(sd_model) with open(os.path.join(script_path, "style.css"), "r", encoding="utf8") as file: css = file.read()