Nodes/ComfyUI 1hewNodes/Image List Interleave
ComfyUI Node

Image List Interleave

The list version of the riffle shuffle, for mismatched sizes

By 1hew·Created about a year ago·Updated 7 days ago· 33
Image List Interleave
  • image
  • image_list
segment_count2

If you've read the Image Batch Interleave article, this is its list-flavored twin - same segment-and-interleave reordering, but it operates on an image list instead of a batch. The practical difference is that list items can each be a different size, and each one stays its own size through the reorder. No forced resizing, no tensor reshaping. That matters when your frames came from different sources and you just want them in a different order.

It's from ComfyUI 1hewNodes (solo dev 1hew, bilingual README, active v3.x). Like its batch sibling, it's a niche ordering utility - you won't use it daily, but the day you need it, nothing stock does the job.

How it works

Same algorithm as the batch version: split the list into segment_count contiguous chunks, then read them back column-first - first item of each chunk, then second item of each chunk, and so on. A 6-item list with 2 segments ([0,1,2] and [3,4,5]) comes back as 0,3,1,4,2,5. segment_count is clamped to the list length, so a count bigger than the list just degenerates gracefully.

Because it's a list, the node also accepts a single batched IMAGE tensor and splits it into list items internally before reordering - so you can feed it either representation and it normalizes. The output is always an image list, which then feeds list-consuming nodes or goes back through Image List to Batch.

The inputs

  • image - an image list, or a single IMAGE batch (will be split into items).
  • segment_count - how many segments to interleave (default 2, range 1–100000).

Output is image_list - the reordered list. That's the whole interface.

Installing it

ComfyUI Manager → search "1hew" / "ComfyUI 1hewNodes" → install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes

The pack's requirements are heavy overall (opencv, scikit-image, plus detection deps like ultralytics and rembg), so first install takes a few minutes even though this node only needs torch. No model files. Needs a current ComfyUI (the whole pack uses the modern node API).

Gotchas

  • Empty list in, empty list out - it returns [] rather than crashing. Check downstream assumptions.
  • segment_count of 1 is a no-op - reordering one segment changes nothing. If your list "doesn't look interleaved," count your segments.
  • Per-item sizes are preserved - that's the feature, but it also means downstream nodes must handle variable sizes. If you need uniform frames, normalize them before or after with a resize node.
Category1hewNodes/image

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
segment_countINT21–100000

Outputs (1)

NameTypeDescription
image_listIMAGE