SafeChunkedImageBlend
Safe Chunked Image Blend is a ComfyUI custom node for blending large IMAGE tensors with explicit control over resize behavior, compute device, chunk size, and output placement. It is intended for workflows where the standard image blend path may silently resize one input to match the other, potentially doing a large full-batch CPU resize before blending. The node accepts two ComfyUI IMAGE tensors in standard [B, H, W, C] format and blends them in chunks. It can: - validate image tensor shape, batch size, and channel count - reject mismatched spatial sizes instead of silently resizing - resize image2 to image1 - resize image1 to image2 - run resize/blend on CUDA even when inputs arrive as CPU tensors - return the final result as CPU float32 for normal ComfyUI compatibility - process one or more frames per chunk - preallocate the output tensor instead of concatenating large temporary chunks - print detailed per-step logs for debugging large tensor workflows ComfyUI image tensors are often CPU float32 tensors by the time they reach post-processing nodes. The standard Image Blend behavior follows the device of image1. If image1 is on CPU, then the resize and blend also happen on CPU. If the two inputs have different spatial sizes, the node may resize the second input to match the first before blending. For large upscaling/video workflows, that hidden resize can become expensive or unstable, especially with high-resolution batched tensors. Safe Chunked Image Blend makes that behavior explicit. Main blend node. Inputs: | Input | Description | |---|---| | image1 | First ComfyUI I…
Image/Postprocessing · 2 inputs · 10 parameters · 1 output