diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-01-14 20:12:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-14 20:12:31 +0000 |
commit | beeec2b59833abe7ab6f90bdf99c65796a10bca0 (patch) | |
tree | fd47a9fce98c61bf081473131118e73d0debf043 /modules | |
parent | 86359535d6fb0899fa9e838d27f2006b929331d5 (diff) | |
parent | 5f8685237ed6427c9a8e502124074c740ea7696a (diff) | |
download | stable-diffusion-webui-gfx803-beeec2b59833abe7ab6f90bdf99c65796a10bca0.tar.gz stable-diffusion-webui-gfx803-beeec2b59833abe7ab6f90bdf99c65796a10bca0.tar.bz2 stable-diffusion-webui-gfx803-beeec2b59833abe7ab6f90bdf99c65796a10bca0.zip |
Merge pull request #6728 from bbc-mc/exclude_clip_index_from_merge_target
Exclude clip index from merge
Diffstat (limited to 'modules')
-rw-r--r-- | modules/extras.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/extras.py b/modules/extras.py index a03d558e..22668fcd 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -326,8 +326,14 @@ def run_modelmerger(primary_model_name, secondary_model_name, tertiary_model_nam print("Merging...")
+ chckpoint_dict_skip_on_merge = ["cond_stage_model.transformer.text_model.embeddings.position_ids"]
+
for key in tqdm.tqdm(theta_0.keys()):
if 'model' in key and key in theta_1:
+
+ if key in chckpoint_dict_skip_on_merge:
+ continue
+
a = theta_0[key]
b = theta_1[key]
@@ -352,6 +358,10 @@ def run_modelmerger(primary_model_name, secondary_model_name, tertiary_model_nam # I believe this part should be discarded, but I'll leave it for now until I am sure
for key in theta_1.keys():
if 'model' in key and key not in theta_0:
+
+ if key in chckpoint_dict_skip_on_merge:
+ continue
+
theta_0[key] = theta_1[key]
if save_as_half:
theta_0[key] = theta_0[key].half()
|