mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Add back in output hidden states parameter
This commit is contained in:
parent
460bbae587
commit
d5c14365fd
@ -309,7 +309,7 @@ class FrozenCLIPEmbedderWithCustomWords(torch.nn.Module):
|
|||||||
batch_multipliers = [[1.0] + x[:75] + [1.0] for x in batch_multipliers]
|
batch_multipliers = [[1.0] + x[:75] + [1.0] for x in batch_multipliers]
|
||||||
|
|
||||||
tokens = torch.asarray(remade_batch_tokens).to(device)
|
tokens = torch.asarray(remade_batch_tokens).to(device)
|
||||||
outputs = self.wrapped.transformer(input_ids=tokens)
|
outputs = self.wrapped.transformer(input_ids=tokens, output_hidden_states=-opts.CLIP_stop_at_last_layers)
|
||||||
|
|
||||||
if opts.CLIP_stop_at_last_layers > 1:
|
if opts.CLIP_stop_at_last_layers > 1:
|
||||||
z = outputs.hidden_states[-opts.CLIP_stop_at_last_layers]
|
z = outputs.hidden_states[-opts.CLIP_stop_at_last_layers]
|
||||||
|
Loading…
Reference in New Issue
Block a user