Nodes/ComfyUI Image Saver/Workflow Input Value (Image Saver)
ComfyUI Node Runs on cloud

Workflow Input Value (Image Saver)

Pull a value out of another node by its ID

By alexopus·Created 3 years ago·Updated 23 days ago· 190
Workflow Input Value (Image Saver)
    • value
    node_id
    input_name

    This is the pack's escape hatch for when you can't (or don't want to) run a wire across your whole graph. It reads an input value from any node in the workflow by that node's ID and the name of the input you want, and hands it back - no visible connection required. In a metadata-accurate pipeline that's occasionally exactly what you need: grab the steps out of your KSampler by its ID and feed it to the saver, without dragging a link across a crowded canvas.

    It's the most "power user" node in the pack. Most people won't need it, but when your graph is a spaghetti bowl it can be a lifesaver.

    How it works

    ComfyUI assigns every node a numeric ID (visible in the node's properties or title). You give this node that ID plus the name of the input on that node - say steps on your KSampler - and at run time it looks into the workflow graph, finds that node's input, and returns its current value. The output is typed * (any type), because what comes back depends entirely on what you pointed it at: it might be an INT, a FLOAT, a string, whatever that input holds.

    The appeal in a metadata context is that it works even when the value you want lives on a node that never got wired out for the saver. Your KSampler already holds its cfg and steps; rather than converting those widgets to outputs and dragging links across the canvas, you can reach in by ID and pull the value where you need it. It's a read, not a rewire.

    The inputs and outputs that matter

    • node_id - the target node's ID, as text.
    • input_name - the exact name of the input on that node (e.g. cfg, seed, steps).

    The single output is value, typed * - route it wherever that value belongs, typically into a saver's matching metadata field.

    Installing it

    ComfyUI Manager: search ComfyUI Image Saver, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alexopus/ComfyUI-Image-Saver
    cd ComfyUI-Image-Saver
    pip install -r requirements.txt
    

    Restart, hard-refresh. No downloads.

    Where people get tripped up

    The obvious fragility: it's keyed on a node ID and an input name, so it breaks silently if either is wrong. Delete and recreate the target node and its ID changes; mistype the input name and you get nothing back. Because there's no drawn wire, that breakage is easy to miss - nothing on the canvas looks disconnected. Double-check the ID against the actual node, and use the exact internal input name.

    Honestly, for most workflows the explicit approach - a literal or selector node feeding both the sampler and the saver - is easier to reason about and far less brittle. Reach for Workflow Input Value when a real wire genuinely isn't practical (very large graphs, values buried deep in a subgraph), not as your default way to get parameters into metadata.

    CategoryImageSaver/utils

    Inputs (2)

    NameTypeDefaultDescription
    node_idSTRINGThe ID of the node to extract from
    input_nameSTRINGThe name of the input to extract

    Outputs (1)

    NameTypeDescription
    value*Input value from the specified node