mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
add clip-skip notes
This commit is contained in:
@@ -240,7 +240,8 @@ class FrozenCLIPEmbedderWithCustomWords(FrozenCLIPEmbedderWithCustomWordsBase):
|
||||
return tokenized
|
||||
|
||||
def encode_with_transformers(self, tokens):
|
||||
clip_skip = opts.data['clip_skip'] or 1
|
||||
clip_skip = int(opts.data['clip_skip']) or 1
|
||||
print('HERE', type(clip_skip), clip_skip)
|
||||
outputs = self.wrapped.transformer(input_ids=tokens, output_hidden_states=-clip_skip)
|
||||
if clip_skip > 1:
|
||||
z = outputs.hidden_states[-clip_skip]
|
||||
|
||||
Reference in New Issue
Block a user