aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_hijack.py
diff options
context:
space:
mode:
authorhentailord85ez <112723046+hentailord85ez@users.noreply.github.com>2022-10-10 15:13:47 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2022-10-10 15:54:48 +0000
commitd5c14365fd468dbf89fa12a68bea5b217077273c (patch)
tree830fa0a2a9edf5afcc68f145a33112b80c08087b /modules/sd_hijack.py
parent460bbae58726c177beddfcddf351f27e205d3fb2 (diff)
downloadstable-diffusion-webui-gfx803-d5c14365fd468dbf89fa12a68bea5b217077273c.tar.gz
stable-diffusion-webui-gfx803-d5c14365fd468dbf89fa12a68bea5b217077273c.tar.bz2
stable-diffusion-webui-gfx803-d5c14365fd468dbf89fa12a68bea5b217077273c.zip
Add back in output hidden states parameter
Diffstat (limited to 'modules/sd_hijack.py')
-rw-r--r--modules/sd_hijack.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py
index 3a60cd63..3edc0e9d 100644
--- a/modules/sd_hijack.py
+++ b/modules/sd_hijack.py
@@ -309,7 +309,7 @@ class FrozenCLIPEmbedderWithCustomWords(torch.nn.Module):
batch_multipliers = [[1.0] + x[:75] + [1.0] for x in batch_multipliers]
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:
z = outputs.hidden_states[-opts.CLIP_stop_at_last_layers]