The vendored encode_prompt copies in the PAG, APG, ControlNet-XS and differential
diffusion pipelines dereference the .text_model wrapper that transformers 5.6
removed from CLIPTextModel, so their clip-skip path crashes on SD1.5 and SDXL TE1.
Apply the same getattr(te, 'text_model', te) fix as the core parser.
Mirrors upstream diffusers, which still carries this deref in pipeline
encode_prompt; only the single-file loader was fixed there.
Reorder samplers_data_diffusers into recognizable solver-family groups (Euler, DPM/DPM++, UniPC/DEIS, Heun/KDPM2, ER-SDE, Classic, Distilled, Misc), each ending with its FlowMatch variants, and Res4Lyf as a fenced experimental section, so the dropdown is scannable.
Dividers are SamplerData sentinels with U+2500 names: create_sampler keeps the current scheduler when one is selected, get_sampler_name falls back to Default, set_samplers and validate_sampler_name exclude them, and a visible_samplers() helper drops them from the xyz axes, detailer, and folder pickers. The main and refine dropdowns render them as section labels. No sampler is removed or renamed, so saved infotexts, styles, and API calls keep resolving.
Seven 'list = None' / 'list[...] = None' parameters lacked the | None
annotation required by PEP 484; ruff RUF013 flagged them in CI.
Co-Authored-By: Claude <noreply@anthropic.com>
Same except-path as the previous commit: jobid is begun before the
try block but never ended on the error return, mirroring the
xyz_grid.py fix.
Co-Authored-By: Claude <noreply@anthropic.com>
Both options inspected pp.image (the original input, normally RGB)
instead of the background-removed RGBA result, so the checkboxes did
nothing. merge_alpha also discarded the convert('RGB') return value.
Operate on the rembg output and keep the converted image.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
hasattr() on the task_args dict checked for an attribute instead of a
key, so it was always False and images passed via task_args were
ignored. Use dict.get instead.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
A stale or renamed upscaler name fell through after the debug log and
dereferenced None in upscale(), raising AttributeError. Return early
like the standard upscale class does.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
errors.display received the literal string 'e' instead of the caught
exception, losing the traceback on adapter load failures. The restore
debug log also nulled loaded_adapter before printing it, so it always
showed adapter=None.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
PIL Image.resize returns a new image; the result was discarded, so the
final output stayed at the snapped aspect-ratio bucket size instead of
being restored to the original input size.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
Enabling FreeU called len() on the checkbox bool instead of the parsed
preset list, raising TypeError and aborting the run. Even without the
crash, all four FreeU parameters were passed the same value. Use the
parsed freeu_preset values, and log the invalid input before clearing it.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
When negative_prompt arrived as a list, the unwrap assigned it to
p.prompt instead of p.negative_prompt, replacing the user's prompt with
the negative prompt text and passing an unsupported list to the
pipeline.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
The framework passes the script's ui values positionally, but after()
only accepted keyword args, so every run raised TypeError after
processing and the original pipeline was never restored. Accept *args
like sibling scripts.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
The unsupported-model warning fell through and switched non-SDXL models
into PixelSmithXLPipeline with an SDXL VAE, corrupting the pipeline.
Return early like every sibling script does after this check.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
draw_xyz_grid inserts one sub-grid per Z value whenever the main grid
or sub-grids are enabled, but have_subgrids only counted them when
'Include sub grids' was checked. With main grid on and sub grids off,
the Z sub-grids leaked into the results as ordinary images (shown in
the gallery, fed into video creation, misaligning infotexts) and the
removal branch was unreachable since its condition contradicted itself.
Count sub-grids based on the same condition that inserts them.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
The always-on variant returned from its parse-error handler without
resetting the module-level active flag, silently disabling the XYZ grid
for every later generation until restart. The selectable variant
likewise returned without ending the job state it had begun.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
Operator precedence made 8 * w * x // 8 cancel out, so fractional scale
factors produced resolutions not divisible by 8 and broke the SDXL
latent shape requirements. Apply the same idiom as pixelsmith_ext.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
The sub-1024 early return happened after init_images was nulled,
task_args were injected and the sampler overridden, so the fallback to
normal processing ran with a broken img2img setup. Check the resolution
before mutating the processing object.
https: //claude.ai/code/session_014QWKWgKvMevcuvfCnsYoT2
Co-Authored-By: Claude <noreply@anthropic.com>
The script concatenated each per-line result's images and infotexts INCLUDING the per-line grid, while all_seeds/all_prompts hold only real images and the final Processed gets index_of_first_image=0. With batch count > 1 the interleaved grids shift every index, so the manual save button writes neighboring images' metadata and filenames (and indexes past the end of infotexts for the last image). Slice each per-line result from proc.index_of_first_image so grids never enter the combined result and all lists stay 1:1 with the gallery. Fixes#2385.
Co-Authored-By: Claude <noreply@anthropic.com>
tile_width/tile_height and tile_col_overlap/tile_row_overlap were cross-assigned from p.height/p.width, transposing output geometry for every non-square tile size. Fixes#4902.
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