Nodes/ComfyUI-fastblend/reBatch Image
ComfyUI Node

reBatch Image

Chop a huge image batch into VRAM-sized chunks

By AInseven·Created 3 years ago·Updated 2 years ago· 228
reBatch Image
  • image
  • IMAGE
batch_size5

This one's a plumbing node, not a creative one, and it exists for a very specific reason: FastBlend's SmoothVideo and InterpolateKeyFrame process frames as one big batch, and the bigger that batch, the more VRAM it needs - linearly, on top of an already expensive patch-matching pass. reBatchImage takes a giant image batch and slices it into a list of smaller batches so you can push each chunk right up to your card's practical ceiling instead of either running out of memory or crawling along with tiny batches out of caution.

The author's own numbers, straight from the README: at 720p on 24GB of VRAM, batch sizes up to 40 render simultaneously, and doing it this way is about 40% faster overall than the naive alternative. That's the whole pitch - it's not a visual effect, it's a throughput fix for anyone running FastBlend on a real clip instead of a five-frame test.

How it works

It's a straightforward re-chunking operation: take one IMAGE input (your full sequence, as a single batch) and a batch_size, and split it into a list of smaller batches of that size. Note the output type here - is_list: true. That's a meaningful distinction in ComfyUI: a batch is one tensor with N images stacked together, while a list is N separate items the graph runs through one at a time (or hands to a node built to consume a list directly). reBatchImage crosses from the first shape to the second, which is exactly what you want feeding into a per-chunk FastBlend pass instead of one enormous all-at-once batch.

The inputs and outputs that matter

  • image (IMAGE) - your full sequence, as a batch.
  • batch_size (INT, default 5, range 0–100) - how many frames go into each chunk. The README's own benchmark (720p, 24GB VRAM) used up to 40; your ceiling depends on your resolution and card, so treat that as a reference point, not a rule.
  • Output: IMAGE, but as a list (is_list: true), not a single batch - worth knowing before you wire it up, since downstream nodes expecting a plain batch tensor won't accept a list without something to iterate or recombine it first.

How to install it

Ships in the same pack as every other node here. Via ComfyUI Manager: search "ComfyUI-fastblend," install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/AInseven/ComfyUI-fastblend

Restart ComfyUI. Nothing to download - it's pure Python batching logic, no models involved.

Common issues & troubleshooting

A downstream node complains it wants a batch, not a list. That's the list/batch distinction biting you - reBatchImage's output is explicitly a list. If you need a single batch back out the other end (say, to hand to Save Image or Video Combine after processing each chunk), use the pack's own Merge_Image_List node to flatten it back down.

Still running out of VRAM. Drop batch_size further - the 720p/24GB/40-frame figure in the README is one specific data point, not a universal number. Higher resolution or a smaller card means a smaller chunk size, and FastBlend's own knobs (window_size, minimum_patch_size, num_iter) all add their own VRAM and time cost on top of whatever chunk size you land on.

Frames end up in the wrong order after processing. Check that whatever you're using to iterate the list (a For Loop, or ComfyUI's automatic list fan-out) preserves order through your FastBlend nodes before you recombine - this node itself just slices sequentially, it doesn't reorder anything.

CategoryAInseven

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
batch_sizeINT50–100

Outputs (1)

NameTypeDescription
IMAGEIMAGE