Files
wildminder-ComfyUI-KEEP/tests
WildAi d5f93e64d5 Round 12: chunk the background upscaler into VRAM-aware frame groups
The bg upscaler's whole-clip tiled_scale call materialised the x4
intermediate of the entire clip (~0.37 GiB per 720p frame - two float32
stacks of the scaled size plus the uint8 one) and OOMed a 16 GB card on
a 48-frame 720p clip before the first paste; the owner measured the
video path unusable with the bg upscaler alone (worse than face x4 or
both x4).

batched_bg_frames now runs the tiled_scale calls over bg_chunk_size
frame groups sized from the x4 intermediate's bytes (27 B per scaled
pixel, the staging budget), each group resized to its target before the
next group starts - the x4 intermediate dies with its group instead of
materialising for the whole clip. The model work is unchanged
(tiled_scale still processes every image on its own); the no-model and
CPU branches keep their exact resize routes through the extracted
_resize_bg_frames. New pins: grouped == whole-batch pixels across the
host, device-staging and canvas variants, and the bg group budget math.
Gate: 557 passed (555 + 2), 0 failed.

GPU throughput stays owner-measured; the CUDA Lanczos resize's batch
composition is the design's disclosed owner-gated residual.
2026-11-03 01:30:21 +03:00
..