🧩 Image Chunk Cut (OreX)
Split long frame sequences into sampler-sized bites
- images
- image_chunks
- shortfall
- chunk_length
- full_length
In ComfyUI, a video is just an IMAGE tensor with a big first dimension - and models like Wan or SCAIL have hard windows on how many frames you can push through at once. Image Chunk Cut (OreX) is the node that takes a long frame sequence and slices it into chunks of a fixed length, padding the last ragged chunk with reversed frames so nothing goes to waste. It's the front half of a chunked video-processing pipeline, and its sibling in the same pack (Image Chunk Stich) is the back half.
How it works
You feed it images (any IMAGE tensor - frames from a video loader, a frame sequence, whatever) and set chunk_length. It walks the sequence in steps of that length and outputs one chunk per step as a list. The interesting behavior is the padding: if the total frame count isn't a clean multiple of chunk_length, the shortfall is filled by mirroring frames from the end of the sequence (reversed order), so your last chunk is full-size instead of a stub. That reversed-tail padding is a deliberate choice - it gives a video model smooth-ish context instead of a jarring jump cut at the seam.
Outputs: image_chunks (a list of IMAGE chunks), shortfall (how many frames it had to pad), chunk_length (echoed back), and full_length (the padded total frame count). The shortfall/full_length outputs are there so downstream logic can trim the padding after processing.
Where it fits
The natural workflow is Cut → process each chunk (image-to-video, inpainting, frame interpolation) → Stich. The pack's Scail2 node does chunked long-video sampling internally, but this node exists for when you want to chunk your own pipeline - feeding chunks to an img2vid node one at a time, for instance, instead of trying to drive a 300-frame sequence through a model that tops out at 81.
Install
ComfyUI Manager (search "comfyui-OreX") or:
cd ComfyUI/custom_nodes
git clone https://github.com/orex2121/comfyui-OreX
Restart. Pure torch, no extra dependencies.
The honest caveat
Cutting a sequence into chunks means the processing you do on each chunk won't be temporally aware - a model that conditions on previous frames will restart cold at each chunk boundary, which is exactly the cross-chunk consistency problem the video community is always fighting. This node gives you the seams; it doesn't hide them. If your goal is seamless long video, you usually want a chunking sampler (like Scail2) that carries context across boundaries rather than a blunt cut. But for per-chunk processing where seams don't matter, this is simple and does exactly what it says.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| chunk_length | INT | 811–10000 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image_chunks | IMAGE | — |
| shortfall | INT | — |
| chunk_length | INT | — |
| full_length | INT | — |