diff --git a/scripts/model_mixer.py b/scripts/model_mixer.py index 8eeb707..f0d96d9 100644 --- a/scripts/model_mixer.py +++ b/scripts/model_mixer.py @@ -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: