Nodes/OmniNodes/Prompt List Iterator πŸ“œ
ComfyUI Node

Prompt List Iterator πŸ“œ

Run 50 prompts overnight without touching the queue once

By TensorVizionΒ·Created 3 months agoΒ·Updated about 8 hours agoΒ· 0
Prompt List Iterator πŸ“œ
    • prompt
    • total_prompts
    • is_last
    • summary
    β—„pathβ–Ί
    β—„source_modeβ–Ύβ–Ί
    β—„index0β–Ί
    β—„wrap_aroundtrueβ–Ί

    The classic overnight-batch workflow is: paste prompt 1, queue, wait, paste prompt 2, queue, wait - for fifty prompts, until you hate yourself. Prompt List Iterator πŸ“œ is the "run the whole list while you sleep" node. Point it at a text file (or a folder of text files), wire an index into it, and it hands back the Nth prompt plus bookkeeping outputs that let the graph know when it's done.

    It's a workflow-control node, not a prompt-magic node. Its whole job is to turn a pile of prompts into a wireable sequence.

    How it works

    Two source_modes. single_file reads one .txt file where each non-empty line is a prompt (lines starting with # are skipped as comments - handy for organizing). folder_of_files points at a directory where each .txt file's full trimmed contents is one prompt, files sorted alphabetically so the order is stable.

    index (0–999999) selects which prompt to return - that's the wire you drive with the pack's Batch Counter's index output, which increments every queue run. wrap_around controls the end of the list: True cycles back to prompt 0 and keeps going forever; False clamps at the last prompt and sets is_last=True so a downstream Conditional Gate can stop the loop cleanly instead of repeating.

    Outputs: prompt, total_prompts, is_last, and summary. The is_last output is the one that makes batch automation trustworthy - without it, "run until done" means "watch the folder yourself."

    The inputs that matter

    path, source_mode, index, wrap_around. That's the surface. The canonical setup is: text file of 50 prompts, Batch Counter driving index, Prompt List Iterator into your encoder, is_last gating a stop. Queue once, come back to 50 images.

    Installing it

    It's a Workflow-category node in the OmniNodes pack:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/TensorVizion/OmniNodes
    

    Restart ComfyUI (or search "OmniNodes" in ComfyUI Manager). No extra dependencies - pure Python standard library. Registers under TensorVizion/Workflow. If it doesn't appear, restart completely and check the terminal for [OmniNodes] βœ… Loaded lines.

    The honest gotcha: it returns whatever's in the file, so a file with a typo'd prompt will cheerfully generate a typo'd image. Keep the list file tidy - the node is a faithful servant, not a proofreader.

    CategoryTensorVizion/Workflow

    Inputs (4)

    NameTypeDefaultDescription
    pathSTRINGβ€”
    source_modeCOMBO2 options: single_file, folder_of_files
    indexINT00–999999β€”
    wrap_aroundBOOLEANtrueβ€”

    Outputs (4)

    NameTypeDescription
    promptSTRINGβ€”
    total_promptsINTβ€”
    is_lastBOOLEANβ€”
    summarySTRINGβ€”