Nodes/ComfyUI_Dynamic_TagLoader/🔄 Dynamic Tag Iterator
ComfyUI Node

🔄 Dynamic Tag Iterator

The node that turns a tag list into actual images

By NineKey1028·Created 8 months ago·Updated 5 days ago· 4
🔄 Dynamic Tag Iterator
  • model
  • clip
  • conditioning
  • model
  • clip
  • positive
  • prompt
prompt
output_modeIterate (One by One)
sample_limit0
seed0

⚡Dynamic Tag Loader hands you lists - a list of models, clips, conditionings and prompts, one entry per tag combination. 🔄 Dynamic Tag Iterator is the node that decides what actually gets sampled. Sit it right after the loader and pick one of two philosophies: one image per queue run, or every combo at once.

Iterate (One by One) - the default

This is the mode you'll use for a batch you actually want to look at. The iterator emits exactly one combination per execution, chosen by seed: index = seed % total_combos. Run the queue with seed 0 and you get combo 0; bump the seed to 1 and you get combo 1. ComfyUI's queue mechanism does the rest - each time you hit Queue with a changed seed, you step through the list. That's the whole trick, and it's why the README calls it "one by one."

The two other knobs matter:

  • Sample Limit - set to 0 for "use all." Set it above 0 and the node shuffles the combo indices with random.Random(seed) and keeps the first N. So you can draw a random subset of, say, 10 combos from a 125-combo list and step through those with the seed.
  • ♻️ Reuse Last Seed - the UI records the seed from your last successful run and offers a one-click button to paste it back. This is your "reproduce that exact combo" button, and it's genuinely handy when a specific seed produced a keeper.

Batch (List)

Flip output_mode to Batch (List) and the iterator passes every combination (or the filtered subset) straight through as lists. Downstream nodes that understand lists - list-aware samplers, or anything in the batch-handling family - can then process the whole sweep in one go. The catch is that core KSampler is not list-aware out of the box, so Batch mode usually means you're pairing it with nodes designed for list input or an advanced sampler that handles batches. If you're just getting started, Iterate mode plus the queue is the smoother path.

The inputs that matter

All four data inputs - model, clip, conditioning, prompt - are lists coming from the loader, and the node expects them wired in that exact chain. Then the controls:

  • output_mode: Iterate (One by One) (default) or Batch (List).
  • sample_limit: 0 = use everything; >0 = random N based on seed (the author's own tooltip: "If > 0, randomly select N items based on seed").
  • seed: drives both iteration order and the random sampling.

Outputs mirror the inputs - model, clip, positive, prompt, all lists - so whatever it emits can feed a sampler or another list-processing stage.

Gotchas

The iterator does not create variation on its own. In Iterate mode you must change the seed between runs or ComfyUI's cache will hand you the same combo every time - same seed, same index, every queue click. If you want a true sweep, drive the seed from an external source or a seed-cycling node rather than leaving it randomize with the same value. And remember the pack-level caveat: this is a small, single-maintainer pack. The concept is sound and the code is readable, but don't expect forum posts bailing you out when something's off - the README and the workflow examples in the repo are your docs.

Install

It ships in the same pack, so one install gets you everything:

cd ComfyUI/custom_nodes/
git clone https://github.com/NineKey1028/ComfyUI_Dynamic_TagLoader.git

Restart ComfyUI afterward. No extra Python packages, no model downloads - it's just Python and the bundled UI.

CategoryCustom/TagLoader

Inputs (7)

NameTypeDefaultDescription
modelMODEL
clipCLIP
conditioningCONDITIONING
promptSTRING
output_modeCOMBOIterate (One by One)2 options: Iterate (One by One), Batch (List)
sample_limitINT00–999990 = Use All. If > 0, randomly select N items based on seed.
seedINT00–18446744073709550000

Outputs (4)

NameTypeDescription
modelMODEL
clipCLIP
positiveCONDITIONING
promptSTRING