mirror of
https://github.com/vladmandic/automatic
synced 2026-09-06 21:10:45 +02:00
add clip-skip notes
This commit is contained in:
@@ -70,9 +70,8 @@ class StableDiffusionProcessing:
|
||||
self.all_negative_prompts = None
|
||||
self.all_seeds = None
|
||||
self.all_subseeds = None
|
||||
self.clip_skip = int(clip_skip) if shared.backend == shared.Backend.ORIGINAL else clip_skip
|
||||
shared.opts.data['clip_skip'] = self.clip_skip # for compatibility with a1111 sd_hijack_clip
|
||||
|
||||
self.clip_skip = clip_skip
|
||||
shared.opts.data['clip_skip'] = int(self.clip_skip) # for compatibility with a1111 sd_hijack_clip
|
||||
self.iteration = 0
|
||||
self.is_control = False
|
||||
self.is_hr_pass = False
|
||||
|
||||
@@ -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