mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-03-15 05:57:20 +00:00
Support loading clip_g from diffusers in CLIP Loader nodes.
This commit is contained in:
parent
a9a4ba7574
commit
d3f5998218
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user