Skip to content

Commit

Permalink
fix another bug found at #95
Browse files Browse the repository at this point in the history
 * simple check acceptable keys in the partial update routine
  • Loading branch information
wkpark committed Dec 28, 2023
1 parent 13e4b15 commit ef50c40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/model_mixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3681,7 +3681,8 @@ def fake_checkpoint(checkpoint_info, metadata, model_name, sha256, fake=True):
for k in weight_changed[prefix]:
# remove prefix, 'cond_stage_model.' or 'conditioner.' will be removed
key = k[len(prefix):]
base_dict[key] = theta_0[k]
if k in theta_0:
base_dict[key] = theta_0[k]
if isxl:
shared.sd_model.conditioner.load_state_dict(base_dict, strict=False)
else:
Expand Down

0 comments on commit ef50c40

Please sign in to comment.