Update sd_hijack_clip.py
This commit is contained in:
parent
00e09382cd
commit
91ecc750be
|
@ -353,10 +353,10 @@ class FrozenCLIPEmbedderForSDXLWithCustomWords(FrozenCLIPEmbedderWithCustomWords
|
|||
def encode_with_transformers(self, tokens):
|
||||
outputs = self.wrapped.transformer(input_ids=tokens, output_hidden_states=self.wrapped.layer == "hidden")
|
||||
|
||||
if self.wrapped.layer == "last":
|
||||
z = outputs.last_hidden_state
|
||||
elif opts.sdxl_clip_l_skip is True:
|
||||
if opts.sdxl_clip_l_skip is True:
|
||||
z = outputs.hidden_states[-opts.CLIP_stop_at_last_layers]
|
||||
elif self.wrapped.layer == "last":
|
||||
z = outputs.last_hidden_state
|
||||
else:
|
||||
z = outputs.hidden_states[self.wrapped.layer_idx]
|
||||
|
||||
|
|
Loading…
Reference in New Issue