diff options
author | Zac Liu <liuguang@baai.ac.cn> | 2022-12-06 08:16:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 08:16:29 +0000 |
commit | 9a5c689c4960259f32cf627384ef5691ded5c017 (patch) | |
tree | 67ff3ae6cbe774c40ade0aa440ca1e4e15eca06e /modules | |
parent | a25dfebeed5b3411f2dc0f558c2b87a7c1cda420 (diff) | |
parent | 965fc5ac5a6ccdf38342e21c97183011a04e799e (diff) | |
download | stable-diffusion-webui-gfx803-9a5c689c4960259f32cf627384ef5691ded5c017.tar.gz stable-diffusion-webui-gfx803-9a5c689c4960259f32cf627384ef5691ded5c017.tar.bz2 stable-diffusion-webui-gfx803-9a5c689c4960259f32cf627384ef5691ded5c017.zip |
Merge pull request #4 from 920232796/master
add hash and fix undo hijack bug
Diffstat (limited to 'modules')
-rw-r--r-- | modules/sd_hijack.py | 6 | ||||
-rw-r--r-- | modules/shared.py | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index 9b5890e7..9fed1b6f 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -112,7 +112,11 @@ class StableDiffusionModelHijack: self.layers = flatten(m)
def undo_hijack(self, m):
- if type(m.cond_stage_model) == sd_hijack_clip.FrozenCLIPEmbedderWithCustomWords:
+
+ if shared.text_model_name == "XLMR-Large":
+ m.cond_stage_model = m.cond_stage_model.wrapped
+
+ elif type(m.cond_stage_model) == sd_hijack_clip.FrozenCLIPEmbedderWithCustomWords:
m.cond_stage_model = m.cond_stage_model.wrapped
model_embeddings = m.cond_stage_model.transformer.text_model.embeddings
diff --git a/modules/shared.py b/modules/shared.py index 522c56c1..8419b531 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -22,7 +22,7 @@ demo = None sd_model_file = os.path.join(script_path, 'model.ckpt')
default_sd_model_file = sd_model_file
parser = argparse.ArgumentParser()
-parser.add_argument("--config", type=str, default="configs/altdiffusion/ad-inference.yaml", help="path to config which constructs model",)
+parser.add_argument("--config", type=str, default=os.path.join(script_path, "v1-inference.yaml"), help="path to config which constructs model",)
parser.add_argument("--ckpt", type=str, default=sd_model_file, help="path to checkpoint of stable diffusion model; if specified, this checkpoint will be added to the list of checkpoints and loaded",)
parser.add_argument("--ckpt-dir", type=str, default=None, help="Path to directory with stable diffusion checkpoints")
parser.add_argument("--gfpgan-dir", type=str, help="GFPGAN directory", default=('./src/gfpgan' if os.path.exists('./src/gfpgan') else './GFPGAN'))
|