mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-22 07:43:58 +00:00
Update forge_clip.py
This commit is contained in:
@@ -26,7 +26,8 @@ class CLIP_SD_XL_L(FrozenCLIPEmbedderWithCustomWords):
|
||||
super().__init__(wrapped, hijack)
|
||||
|
||||
def encode_with_transformers(self, tokens):
|
||||
outputs = self.wrapped.transformer(input_ids=tokens, output_hidden_states=self.wrapped.layer == "hidden")
|
||||
outputs = self.wrapped.transformer(input_ids=tokens, attention_mask=None,
|
||||
output_hidden_states=self.wrapped.layer == "hidden")
|
||||
|
||||
if self.wrapped.layer == "last":
|
||||
z = outputs.last_hidden_state
|
||||
@@ -45,7 +46,8 @@ class CLIP_SD_XL_G(FrozenCLIPEmbedderWithCustomWords):
|
||||
self.wrapped.layer_idx = -2
|
||||
|
||||
def encode_with_transformers(self, tokens):
|
||||
outputs = self.wrapped.transformer(input_ids=tokens, output_hidden_states=self.wrapped.layer == "hidden")
|
||||
outputs = self.wrapped.transformer(input_ids=tokens, attention_mask=None,
|
||||
output_hidden_states=self.wrapped.layer == "hidden")
|
||||
|
||||
if self.wrapped.layer == "last":
|
||||
z = outputs.last_hidden_state
|
||||
|
||||
Reference in New Issue
Block a user