mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
handle clip_skip is none
This commit is contained in:
@@ -295,6 +295,8 @@ class FrozenCLIPEmbedderWithCustomWords(FrozenCLIPEmbedderWithCustomWordsBase):
|
||||
return tokenized
|
||||
|
||||
def encode_with_transformers(self, tokens):
|
||||
if opts.CLIP_stop_at_last_layers is None:
|
||||
opts.CLIP_stop_at_last_layers = 1
|
||||
outputs = self.wrapped.transformer(input_ids=tokens, output_hidden_states=-opts.CLIP_stop_at_last_layers)
|
||||
|
||||
if opts.CLIP_stop_at_last_layers > 1:
|
||||
|
||||
Reference in New Issue
Block a user