Skip to content

Commit c67d8bc

Browse files
Merge pull request #5304 from space-nuko/fix/clip-skip-application
Fix clip skip of 1 not being restored from prompts
2 parents 28c79b8 + be2e6de commit c67d8bc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

modules/generation_parameters_copypaste.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ def parse_generation_parameters(x: str):
184184
else:
185185
res[k] = v
186186

187+
# Missing CLIP skip means it was set to 1 (the default)
188+
if "Clip skip" not in res:
189+
res["Clip skip"] = "1"
190+
187191
return res
188192

189193

modules/shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def list_samplers():
371371
"enable_batch_seeds": OptionInfo(True, "Make K-diffusion samplers produce same images in a batch as when making a single image"),
372372
"comma_padding_backtrack": OptionInfo(20, "Increase coherency by padding from the last comma within n tokens when using more than 75 tokens", gr.Slider, {"minimum": 0, "maximum": 74, "step": 1 }),
373373
"filter_nsfw": OptionInfo(False, "Filter NSFW content"),
374-
'CLIP_stop_at_last_layers': OptionInfo(1, "Stop At last layers of CLIP model", gr.Slider, {"minimum": 1, "maximum": 12, "step": 1}),
374+
'CLIP_stop_at_last_layers': OptionInfo(1, "Stop at last layers of CLIP model (CLIP skip)", gr.Slider, {"minimum": 1, "maximum": 12, "step": 1}),
375375
"random_artist_categories": OptionInfo([], "Allowed categories for random artists selection when using the Roll button", gr.CheckboxGroup, {"choices": artist_db.categories()}),
376376
}))
377377

0 commit comments

Comments
 (0)