mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
fix(sampler): record and restore Default instead of the None sentinel
The keep-current-scheduler sentinel leaked into user-facing surfaces: infotexts and filenames recorded Sampler: None, restoring such an infotext pushed an invalid value into the dropdown, and the API samplers list never offered Default at all. - infotext always records the sampler, mapping a stray None to Default - parse maps legacy Sampler: None infotexts to Default - api samplers list leads with Default; the remaining excluded config keys are shared templates, not samplers
This commit is contained in:
@@ -54,7 +54,7 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts=None, all_seeds=No
|
||||
# basic
|
||||
"Steps": p.steps,
|
||||
"Size": f"{p.width}x{p.height}" if hasattr(p, 'width') and hasattr(p, 'height') else None,
|
||||
"Sampler": p.sampler_name if p.sampler_name != 'Default' else None,
|
||||
"Sampler": p.sampler_name if p.sampler_name != 'None' else 'Default',
|
||||
"Scheduler": shared.sd_model.scheduler.__class__.__name__ if getattr(shared.sd_model, 'scheduler', None) is not None else None,
|
||||
"Seed": all_seeds[index],
|
||||
"Seed resize from": None if p.seed_resize_from_w <= 0 or p.seed_resize_from_h <= 0 else f"{p.seed_resize_from_w}x{p.seed_resize_from_h}",
|
||||
|
||||
Reference in New Issue
Block a user