Update forge_clip.py

This commit is contained in:
lllyasviel
2024-01-25 06:18:36 -08:00
parent 0ed2099601
commit 035aca8ad9

View File

@@ -6,7 +6,12 @@ class CLIP_SD_15_L(FrozenCLIPEmbedderWithCustomWords):
class CLIP_SD_21_G(FrozenCLIPEmbedderWithCustomWords):
pass
def __init__(self, wrapped, hijack):
super().__init__(wrapped, hijack)
if self.wrapped.layer == "penultimate":
self.wrapped.layer = "hidden"
self.wrapped.layer_idx = -2
class CLIP_SD_XL_L(FrozenCLIPEmbedderWithCustomWords):