From 035aca8ad91c9434f554ec54951d29e514f192b6 Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Thu, 25 Jan 2024 06:18:36 -0800 Subject: [PATCH] Update forge_clip.py --- modules_forge/forge_clip.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules_forge/forge_clip.py b/modules_forge/forge_clip.py index c1b36ad6..06ca4474 100644 --- a/modules_forge/forge_clip.py +++ b/modules_forge/forge_clip.py @@ -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):