Nodes/Banana Studio/Single Parameter Dispatcher
ComfyUI Node

Single Parameter Dispatcher

Sweep one number across a queue of runs

By tjcccc·Created 10 months ago·Updated 5 months ago· 1
Single Parameter Dispatcher
    • dispatch_value
    • index
    • output_tag
    • log
    ◄value0.00►
    ◄delta0.00►
    ◄max_value0.00►
    ◄batch0►
    ◄reset_mark0►
    ◄output_tag_format►

    Single Parameter Dispatcher is the node for when you want to vary one number across a batch of runs - CFG going 5, 6, 7, 8, or a denoise strength stepping down each run - without building a whole parameter system to do it. You queue N runs, and each run the node hands you the next value in a sequence. That's the entire job, and it does it without touching pixels.

    It belongs to the plumbing layer of ComfyUI: nodes that don't generate anything but make your workflow behave like a small program. The pattern here is the "sequencer" - state that advances one step per execution - and it's the same idea behind every simple sweep utility in the ecosystem. You'll typically wire its output into a numeric widget you've converted to an input.

    How it works

    Set value (your starting value), delta (how much each next item adds), max_value (the clamp), and batch (how many runs long the queue is). The node builds a sequence value, value+delta, value+2*delta, ... up to batch items, clamped at max_value. Each execution pops one item and advances an internal counter.

    Two details from the source are worth knowing:

    • The queue rebuilds whenever any input changes, or when you bump reset_mark. Change delta mid-sweep and it restarts from the top rather than continuing from where it was - which is usually what you want, and reset_mark is your manual "kick it to rebuild" control for when you don't want to touch a value.
    • The state lives in memory per node, so it's position-tracking rather than anything persisted. Restart ComfyUI and the sequence rebuilds. That's fine for sweeps; it would be a dealbreaker for anything that needed to survive restarts, but that's not this node's job.

    The inputs that matter

    value, delta, and batch are the ones you'll actually set. max_value only matters once the sequence would pass it - the clamp applies whether you're increasing or decreasing, so it doubles as a floor. output_tag_format is the sneaky-useful one: it builds a text label from placeholders %current_value%, %index%, %delta%, %max%, %batch% - so cfg_%index%_%current_value% becomes cfg_3_7.0 on the third run. That's a ready-made filename fragment.

    The outputs

    • dispatch_value (FLOAT) - the current value. Convert a numeric widget on your sampler or node of choice to an input and wire this into it.
    • index (STRING) - the 1-based position in the batch. Note the type: it's a string, not an int. If you need an integer, run it through a conversion node first - a trap worth flagging because the name makes you assume INT.
    • output_tag (STRING) - your formatted label.
    • log (STRING) - debug text showing the current dispatched value; fine to leave unconnected.

    Where people trip

    The most common stumble is expecting this to drive a graph-wide parameter when you've only wired it to one socket - it dispatches one value to wherever you connect it, full stop. Also remember index is 1-based and string-typed. And one subtlety: with batch set below 2, you get a single-item queue, and a delta of 0 repeats the same value for every item - both are easy to hit by accident and look like the node "not working."

    Install

    It ships inside tjcccc/comfyui_banana_studio:

    cd ComfyUI/custom_nodes
    git clone https://github.com/tjcccc/comfyui_banana_studio.git
    

    Restart ComfyUI (or find "Banana Studio" in ComfyUI Manager). No models, no pip dependencies, no API key - pure logic, runs offline. Requires ComfyUI ≥ 0.19.3.

    CategoryBanana Studio

    Inputs (6)

    NameTypeDefaultDescription
    valueFLOAT0.00—
    deltaFLOAT0.00—
    max_valueFLOAT0.00—
    batchINT0—
    reset_markINT0—
    output_tag_formatSTRING—

    Outputs (4)

    NameTypeDescription
    dispatch_valueFLOAT—
    indexSTRING—
    output_tagSTRING—
    logSTRING—