diff --git a/modules/api/endpoints.py b/modules/api/endpoints.py index c6ff5c5c5..e231166eb 100644 --- a/modules/api/endpoints.py +++ b/modules/api/endpoints.py @@ -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 diff --git a/modules/infotext.py b/modules/infotext.py index 483bbd4c3..67390fa82 100644 --- a/modules/infotext.py +++ b/modules/infotext.py @@ -83,6 +83,8 @@ def parse(infotext): params[key] = False elif key == 'VAE' and val == 'TAESD': params["VAE type"] = 'Tiny' + elif key == 'Sampler' and val == 'None': + params[key] = 'Default' # legacy infotexts recorded the keep-current-scheduler sentinel, which is not a dropdown choice elif size is not None: params[f"{key}-1"] = int(size.group(1)) params[f"{key}-2"] = int(size.group(2)) diff --git a/modules/processing_info.py b/modules/processing_info.py index 923dd4d2a..8e6ce4f97 100644 --- a/modules/processing_info.py +++ b/modules/processing_info.py @@ -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}",