Nodes/Pipedream/πŸ’­ PD Wedge
ComfyUI Node

πŸ’­ PD Wedge

Iterate a prompt, seed, or CFG across a list β€” and auto-queue the whole run

By TheOnlyAaronΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 4
πŸ’­ PD Wedge
    • wedge
    • current_value
    • wedge_index
    β—„namewedgeβ–Ί
    β—„typeβ–Ύβ–Ί
    β—„valuesβ–Ί
    β—„modeβ–Ύβ–Ί
    β—„auto_queuefalseβ–Ί

    The most useful habit in image generation is also the most tedious: lock the seed, change one variable, compare. Now do it twenty times. πŸ’­ PD Wedge automates exactly that. You give it a name, a type, and a list of values - one per line - and on each execution it emits one value from the list. Enable auto_queue and it keeps going, queueing the remaining iterations against your local ComfyUI server until the whole list has run. It's a focused little iteration engine, and it pairs perfectly with the pack's output nodes: your filenames can carry the wedge value so nothing gets mixed up.

    How it works

    The node holds a list, tracks a current_index, and on execution returns three things:

    • wedge (the WEDGE type) - the full state dict (name, values, current index). This is what you feed to other Pipedream nodes that understand wedges.
    • current_value (STRING) - this run's value, cast to your chosen type. Wire it into the parameter you're iterating: a prompt, a seed, a CFG, a sampler choice.
    • wedge_index (INT) - which iteration this is.

    In sequential mode it walks the list in order. In random mode it shuffles deterministically per index, so every iteration still gets a reproducible draw rather than a fresh random pick.

    The headline feature is auto_queue: on the first execution, the node POSTs modified copies of the current prompt to ComfyUI's API - one per remaining value - with the wedge index injected, so the whole list runs back to back. You press Queue once, walk away, and come back to a finished iteration set. It talks to http://127.0.0.1:8188 by default (override with the COMFYUI_SERVER_URL environment variable).

    The inputs that matter

    • name - the wedge's identifier. This becomes a token: a wedge named prompt is referenced as {wedge_prompt} in output templates, which is how the file naming tracks which iteration produced what.
    • type - STRING, INT, or FLOAT. Determines how values are cast; an unparseable value falls back to string with a console warning.
    • values - one per line. Empty lines are skipped.
    • mode - sequential or random.
    • auto_queue - on/off. Off, you step through manually by re-queueing; on, it runs the list unattended.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/TheOnlyAaron/comfyui-pipedream
    

    Restart ComfyUI, or install "Pipedream" via ComfyUI Manager. No dependencies, no model downloads.

    Gotchas

    • auto_queue needs the ComfyUI API reachable on localhost:8188. If you run ComfyUI behind a reverse proxy, on another port, or remotely, set COMFYUI_SERVER_URL - otherwise the queue silently stops after the first iteration with an error in the console.
    • Each wedge iterates on its own. If you connect two wedges into one workflow, they don't automatically combine into a cartesian run - that's what πŸ’­ PD Rasterizer previews and why you check total_iterations before you start.
    • The empty-wedge warning ("no values to iterate") is a clue, not a crash: the node emits a harmless empty value. Double-check the values field isn't just whitespace.
    • Iterating over seeds is the classic use, but remember iteration discipline: change one variable per list, or your comparisons are worthless no matter how many renders you queue.
    CategoryPipedream

    Inputs (5)

    NameTypeDefaultDescription
    nameSTRINGwedgeβ€”
    typeCOMBO3 options: STRING, INT, FLOAT
    valuesSTRINGβ€”
    modeCOMBO2 options: sequential, random
    auto_queueBOOLEANfalseβ€”

    Outputs (3)

    NameTypeDescription
    wedgeWEDGEβ€”
    current_valueSTRINGβ€”
    wedge_indexINTβ€”