Skip to content

Commit

Permalink
Fix for single CLIP Loader
Browse files Browse the repository at this point in the history
  • Loading branch information
city96 committed Aug 20, 2024
1 parent 65c0ab1 commit 1ebce77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ def load_patcher(self, clip_paths, clip_type, clip_data):
clip.patcher = GGUFModelPatcher.clone(clip.patcher)

# for some reason this is just missing in some SAI checkpoints
if hasattr(clip.cond_stage_model, "clip_l"):
if getattr(clip.cond_stage_model, "clip_l", None) is not None:
if clip.cond_stage_model.clip_l.transformer.text_projection.weight.tensor_shape == None:
clip.cond_stage_model.clip_l.transformer.text_projection = comfy.ops.manual_cast.Linear(768, 768)
if hasattr(clip.cond_stage_model, "clip_g"):
if getattr(clip.cond_stage_model, "clip_g", None) is not None:
if clip.cond_stage_model.clip_g.transformer.text_projection.weight.tensor_shape == None:
clip.cond_stage_model.clip_g.transformer.text_projection = comfy.ops.manual_cast.Linear(1280, 1280)

Expand Down

0 comments on commit 1ebce77

Please sign in to comment.