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
padding loops used insert(0) which shifts existing prompt/seed entries
to higher indices, so subsequent index lookups - including the caller's
own p.prompts[i]/p.seeds[i] reads on the same aliased lists - return
values belonging to a different image; append preserves existing
index-to-entry mapping and pads missing slots at the end
https://claude.ai/code/session_01UZT4ypkGQH5fzJ89dXPFYp
Surface YoloRestorer.restore() as a standalone operation: a Detailer
postprocessing script in the Process tab and a thin /sdapi/v1/detail
endpoint, neither requiring a base generation pass.
- modules/postprocess/yolo.py: YoloRestorer.make_processing() builds the
synthetic Img2Img processing object both entry points feed to restore(),
resolving the seed so the inpaint passes are reproducible
- modules/api/process.py: post_detail handler exposes the full detailer
parameter set and returns the detailed image plus optional annotations
as base64
- scripts/postprocessing_detailer.py: reuses shared.yolo.ui('extras') and
runs through make_processing()
- modules/postprocessing.py: run_extras takes a per-script script_args
dict, also letting the extras API drive other scripts such as Remove
background; omitting it leaves existing callers unchanged
- modules/api/models.py: ReqDetail / ResDetail
- modules/processing_info.py: guard create_infotext's Image/Hires CFG
reporting against an unset (None) cfg_image, matching the is-not-None
checks the other cfg_image readers use; the detailer inpaint pass runs
with it unset
- test/test-detailer-api.py: covers both paths; effect tests measure the
diff inside the detected region with extreme isolated parameter values,
and the suite disables model quantization for the run and restores the
original settings afterward
Fixes restoring parameters when your default hires sampler isn't "Same as primary". In those cases, only the main sampler would be updated because there's no value stored for the hires sampler.
While technically you *could* assume that "Same as primary" is meant when other hires settings are loaded without a value for the sampler, it would be a lot more complicated to actually implement. Honestly, it's just better and probably more "expected behavior" to always include the information when using Hires.