Files
tackandClaude Opus 4.7 9dc7e2dbe8 fix(sampler): round panel dims to %8 for latent, crop VAE output back
Panels whose width_px/height_px weren't multiples of 8 were silently
replaced with the red-X placeholder: ComfyUI's EmptyLatentImage floors
dims to the nearest /8, so the VAE-decoded image came back 1-7 px shy
of the requested size, tripping the strict shape equality check in
ComicBatchGenerator and sending all retry attempts down the
retry_then_skip branch.

run_panel_sampler now rounds (w, h) UP to the nearest multiple of 8
before calling empty_latent and crops the decoded image back to the
exact requested (h, w). The now-redundant shape check in
batch_generator is dropped in favour of an at-least-as-large check
inside run_panel_sampler.

Adds RoundedShapeBackend (mimics ComfyUI's /8 rounding) and a
regression test for a 301x150 panel to prevent the bug returning.
WrongShapeBackend now returns a too-small image so halt-mode still
catches genuinely broken backends.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 17:16:42 +08:00
..