diff options
author | MrCheeze <fishycheeze@yahoo.ca> | 2023-03-25 02:48:16 +0000 |
---|---|---|
committer | MrCheeze <fishycheeze@yahoo.ca> | 2023-03-26 01:03:07 +0000 |
commit | 8a34671fe91e142bce9e5556cca2258b3be9dd6e (patch) | |
tree | 001fee7c5f149bd9763db74af1355828925cea04 /modules/sd_models.py | |
parent | a9fed7c364061ae6efb37f797b6b522cb3cf7aa2 (diff) | |
download | stable-diffusion-webui-gfx803-8a34671fe91e142bce9e5556cca2258b3be9dd6e.tar.gz stable-diffusion-webui-gfx803-8a34671fe91e142bce9e5556cca2258b3be9dd6e.tar.bz2 stable-diffusion-webui-gfx803-8a34671fe91e142bce9e5556cca2258b3be9dd6e.zip |
Add support for the Variations models (unclip-h and unclip-l)
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r-- | modules/sd_models.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index f0cb1240..c1a80d82 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -383,6 +383,11 @@ def repair_config(sd_config): elif shared.cmd_opts.upcast_sampling:
sd_config.model.params.unet_config.params.use_fp16 = True
+ # For UnCLIP-L, override the hardcoded karlo directory
+ if hasattr(sd_config.model.params, "noise_aug_config") and hasattr(sd_config.model.params.noise_aug_config.params, "clip_stats_path"):
+ karlo_path = os.path.join(paths.models_path, 'karlo')
+ sd_config.model.params.noise_aug_config.params.clip_stats_path = sd_config.model.params.noise_aug_config.params.clip_stats_path.replace("checkpoints/karlo_models", karlo_path)
+
sd1_clip_weight = 'cond_stage_model.transformer.text_model.embeddings.token_embedding.weight'
sd2_clip_weight = 'cond_stage_model.model.transformer.resblocks.0.attn.in_proj_weight'
|