Nodes/Mickmumpitz-Nodes/Multi Channel Slicer
ComfyUI Node

Multi Channel Slicer

Slices control, plate, and mask in lockstep

By mickmumpitz·Created 8 months ago·Updated 9 days ago· 47
Multi Channel Slicer
  • control_images
  • string_batch
  • seed_batch
  • plate
  • mask
  • control_slice
  • plate_slice
  • mask_slice
  • has_frames
  • string
  • seed
frames_per_iteration81
overlap_frames0
extend_mode

MultiChannelSlicer is ControlImageSlicer's bigger sibling, and the difference is exactly one word: channels. Where the plain slicer cuts one control sequence into per-iteration windows, this one slices three things in lockstep - control images, a plate (the background footage), and a mask - so every iteration of the loop gets a perfectly aligned set. If your pipeline composites generated VFX over a plate using a mask, those three sequences have to stay frame-aligned across the whole loop, and doing that with three separate slicers is how you get drift. This node is the fix.

It lives in the pack's Iterative Video category and, like the other loop nodes, receives a hidden iteration value injected by the pack's prompt handler at submit time - the number increments on every re-queue, and the node slices for whichever pass it's on.

How it works

Same window math as ControlImageSlicer: start index iteration * frames_per_iteration (minus overlap_frames if you set overlap), take frames_per_iteration frames, done. The difference is that the same start/end window is applied to all three batches - control, plate, and mask - so they always stay in sync. Each batch handles the edge cases independently through the shared _slice_batch helper: when the sequence runs out, extend_mode decides whether to return what's left (none), repeat the last frame (repeat_last), or wrap around (loop). If you don't wire a plate, plate_slice falls back to the control slice; if you don't wire a mask, you get an empty (zeroed) mask at the control slice's spatial size - so downstream nodes always get a valid tensor of the right shape.

It also carries per-iteration string and seed selection from string_batch / seed_batch, same as the plain slicer, so your prompt and seed can vary per chunk from one pre-built array.

The inputs and outputs

  • control_images (IMAGE, required) - the conditioning sequence.
  • frames_per_iteration (default 81) - window size; must match the loop's actual per-pass frame count.
  • plate (IMAGE, optional) - background footage, sliced in lockstep.
  • mask (MASK, optional) - the composite mask, sliced in lockstep.
  • overlap_frames, extend_mode - seam handling, as in the single slicer.
  • string_batch, seed_batch - per-iteration prompt/seed arrays.

Outputs: control_slice (IMAGE), plate_slice (IMAGE), mask_slice (MASK), has_frames (BOOLEAN), string (STRING), seed (INT).

Installing it

Part of the Mickmumpitz pack - ComfyUI Manager, search "Mickmumpitz", install, restart:

cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes.git

No models; the pack's numpy/Pillow/opencv baseline covers it.

Common issues

The recurring trap across all the slicers applies here doubly: frames_per_iteration must match what your sampler actually produces, and the plate/mask sequences must be the same length and rhythm as the control sequence. If your plate is a different length than your control footage, the lockstep goes off the rails at the tail - one sequence hits its end while the others still have frames, and extend_mode handles each independently, so the alignment you built the node for silently breaks. Keep all three sequences at the same frame count, or accept that the tail end will be padded by whichever extend mode you picked.

CategoryMickmumpitz/video/iteration

Inputs (8)

NameTypeDefaultDescription
control_imagesIMAGE
frames_per_iterationINT811–9999
string_batchoptSTRING_BATCH
seed_batchoptSEED_BATCH
plateoptIMAGE
maskoptMASK
overlap_framesoptINT00–999
extend_modeoptCOMBO3 options: none, repeat_last, loop

Outputs (6)

NameTypeDescription
control_sliceIMAGE
plate_sliceIMAGE
mask_sliceMASK
has_framesBOOLEAN
stringSTRING
seedINT