ComfyUI Node

Iterator Item

A ziplock bag for one generation's inputs

By franciscotorrado·Created 7 months ago·Updated 7 months ago· 0
Iterator Item
  • image
  • IMAGE
  • AUDIO_TEXT
  • VIDEO_PROMPT
  • ITERATOR_ITEM
audio_text
video_prompt

Iterator Item is the boring one, and that's the point. Every loop system needs a way to say "here is one thing to process" - and this node is exactly that: it bundles an image, some audio text, and a video prompt into a single ITERATOR_ITEM object that the Iterator List can pick up and hand around. You use it once per item in your batch. There's no logic here, no state, nothing clever. It's a container, and containers are the part of batch pipelines everyone forgets to plan for.

How it works

You feed it an image plus a couple of text prompts, and it returns a plain Python dict - {image, audio_text, video_prompt} - along with passthroughs of each component. That dict is what gets shuttled into one of the List's item1item6 slots. Because the output type is the pack's custom ITERATOR_ITEM, ComfyUI only lets you plug it into places that understand it, which keeps you from accidentally wiring an item bundle into a KSampler.

The statefulness of the whole system lives in the List and the Signal, not here. Iterator Item is pure data plumbing: build it once per scene or variant, and the loop swaps which bundle is active. If you think of the batch as a playlist, this node is one song's metadata.

The inputs that matter

  • image - your source image (or generated frame). The one input that has to be a real image; there's no default.
  • audio_text - a multiline string, intended for audio generation (e.g. a TTS prompt). Empty string by default; leave it blank if you don't need audio.
  • video_prompt - a multiline string for CLIP text encoding or video generation prompts. Also empty by default.

Outputs: IMAGE, AUDIO_TEXT, and VIDEO_PROMPT as straight passthroughs (so you can grab the pieces separately if you need them elsewhere in the graph), plus the ITERATOR_ITEM bundle for the List.

Installing it

One install gets you all five nodes in the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/franciscotorrado/ComfyUI-Automation
pip install -r requirements.txt

Restart ComfyUI afterwards. ComfyUI Manager users can search "ComfyUI-Automation" instead. No model downloads, and the only dependency is ffmpeg-python. One trap in the README: its install block uses a placeholder repo URL, so copy from here, not from there.

Common issues

Not much to troubleshoot in a container node, but a couple of things are worth knowing. First, the item bundle carries no identity of its own - the List selects by slot position, so the order you wire item1, item2, etc. is the order the batch runs. It's easy to wire items in visually and forget that slot order decides sequence.

Second, all three inputs are technically required, even though the two text fields default to empty. You can't leave the image input disconnected. If you're only doing images and don't care about audio or video prompts, just leave those strings empty - that's the intended usage.

And the passthrough outputs can quietly confuse beginners: they're not duplicates to be consumed downstream for anything special, they're just the same values the bundle carries. Use the bundle for the loop and the passthroughs if you want to reference a component directly.

CategoryIterator

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
audio_textSTRING
video_promptSTRING

Outputs (4)

NameTypeDescription
IMAGEIMAGE
AUDIO_TEXTSTRING
VIDEO_PROMPTSTRING
ITERATOR_ITEMITERATOR_ITEM