Commit d3f59982 authored by comfyanonymous's avatar comfyanonymous
Browse files

Support loading clip_g from diffusers in CLIP Loader nodes.

parent a9a4ba75
......@@ -35,6 +35,8 @@ class SDXLClipG(sd1_clip.SD1ClipModel):
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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment