Skip to content

Commit

Permalink
Support Stable Cascade in checkpoint format.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Feb 19, 2024
1 parent d91f45e commit 3711b31
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions comfy/supported_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ class Stable_Cascade_C(supported_models_base.BASE):
"shift": 2.0,
}

vae_key_prefix = ["vae."]
text_encoder_key_prefix = ["text_encoder."]
clip_vision_prefix = "clip_l_vision."

def process_unet_state_dict(self, state_dict):
key_list = list(state_dict.keys())
for y in ["weight", "bias"]:
Expand Down Expand Up @@ -355,6 +359,8 @@ class Stable_Cascade_B(Stable_Cascade_C):
"shift": 1.0,
}

clip_vision_prefix = None

def get_model(self, state_dict, prefix="", device=None):
out = model_base.StableCascade_B(self, device=device)
return out
Expand Down

0 comments on commit 3711b31

Please sign in to comment.