Skip to content

Commit

Permalink
Support loading clip_g from diffusers in CLIP Loader nodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jul 9, 2023
1 parent a9a4ba7 commit d3f5998
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions comfy/sdxl_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def clip_layer(self, layer_idx):
def load_sd(self, sd):
if "text_projection" in sd:
self.text_projection[:] = sd.pop("text_projection")
if "text_projection.weight" in sd:
self.text_projection[:] = sd.pop("text_projection.weight").transpose(0, 1)
return super().load_sd(sd)

class SDXLClipGTokenizer(sd1_clip.SD1Tokenizer):
Expand Down

0 comments on commit d3f5998

Please sign in to comment.