Nodes/gpu-layerstyles/GPU LayerStyles TwoBatchLoop
ComfyUI Node

GPU LayerStyles TwoBatchLoop

Loop two batches in this order: images_2's tail fades into images_1's head, images_1's middle, images_1's tail fades into images_2's head, images_2's middle. Each batch needs at least 2 * blend_target + 1 frames. Unequal lengths are allowed; RGB or RGBA dimensions must match. All channels, including alpha, fade in float32 without clamping. Output has the combined input length minus 2 * blend_target, plus one if append first frame is enabled. CPU output needs RAM for the complete result.

By lany42·Created 2 days ago·Updated a day ago· 0
GPU LayerStyles TwoBatchLoop
  • images_1
  • images_2
  • images
◄blend_target15►
◄append_first_framefalse►
◄output_devicecpu►
◄batch_size0►
CategoryGPU LayerStyles/Batch

Inputs (6)

NameTypeDefaultDescription
images_1IMAGE—
images_2IMAGE—
blend_targetINT152–2147483647Exact number of frames in each transition, including both endpoints. At least 2; both batches must retain a nonempty middle after removing this many frames from each end.
append_first_frameBOOLEANfalseAppend an exact copy of the completed loop's first frame to enable interpolation from the last frame to the first. After interpolation, remove the redundant endpoint with an external SliceImageBatch node using 0:-1. TwoBatchLoop does not interpolate or trim frames.
output_deviceCOMBOcpuReturn output on CPU (default) after float32 processing on ComfyUI's selected compute device. GPU keeps output on that device to avoid transfers between compatible nodes. ComfyUI CPU mode returns CPU output.
batch_sizeINT00–2147483647Frames per processing chunk. 0 starts at up to 64 frames. Positive values can exceed 64, capped by the output length. Allocation failures halve the chunk size for this run; each run starts fresh. Complete inputs and outputs still need memory. Pass smaller batches through the entire workflow to reduce complete-batch memory.

Outputs (1)

NameTypeDescription
imagesIMAGE—