mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +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:
@@ -15,9 +15,9 @@ def _format_tags(raw_tags):
|
||||
|
||||
def get_samplers():
|
||||
from modules import sd_samplers_diffusers
|
||||
all_samplers = []
|
||||
all_samplers = [{'name': 'Default', 'options': {}}] # restores the model's own scheduler; first to match the ui dropdown order
|
||||
for k, v in sd_samplers_diffusers.config.items():
|
||||
if k in ['All', 'Default', 'Res4Lyf']:
|
||||
if k in ['All', 'Default', 'Res4Lyf']: # remaining keys are shared config templates, not samplers
|
||||
continue
|
||||
all_samplers.append({'name': k, 'options': v})
|
||||
return all_samplers
|
||||
|
||||
Reference in New Issue
Block a user