Nodes/Vantage-NodesV2/Float Value Switch (VantageV2)
ComfyUI Node

Float Value Switch (VantageV2)

Map a decimal range onto a value you pick

By vantagewithai·Created 15 days ago·Updated 11 days ago· 3
Float Value Switch (VantageV2)
    • value
    ◄value0.00►
    ◄output_type▾►
    ◄conditions[{"name":"Condition 1","operator":"=","value":0,"output":false}]►

    Denoise 0.35 means something different from denoise 0.9, and you already have opinions about what each deserves. This node lets you write those opinions down once and stop re-tuning by hand.

    What it is

    One of four value switches in the pack - the float-flavoured one. A FLOAT goes in on value; a literal you typed on the node comes out. Between them sits an ordered list of named conditions, each with one of the six numeric operators (=, !=, <, <=, >, >=) and a decimal constant.

    You configure it from the title-bar gear: pick the output type (BOOLEAN, INT, FLOAT or STRING), add conditions with unique names, choose each operator and constant, save, then fill in a result field per condition on the node body. The first matching condition returns its field's value; no match returns None.

    The output socket is a single value, typed to whatever output type you selected. That's the neat part - the rules are about the input, the type is about the use. Same three ranges can produce step counts today and prompt strings tomorrow, and you only rewrite the rules if the breakpoints change.

    Where this beats the branch switch

    Float Switch, its socket-slinging sibling, swaps between connected branches - only the winning branch executes. This node swaps between numbers. If your intent is "when denoise drops below 0.4, run 20 steps instead of 30", you don't want to duplicate a sampler into two branches; you want one sampler whose step count changes. That's this.

    Two things it does well:

    • Setting ladders. Below 0.4 denoise → 20 steps; 0.4 to 0.75 → 25; above → 35. Wire a strength or denoise value in, wire the output into the sampler's steps (convert the steps widget to an input first), and your compute now tracks the edit instead of ignoring it.
    • Naming for humans. "Barely touched", "moderate", "full redo" beats reading three decimals in a rule list.

    Equality on floats is exact, same as everywhere else in this pack - no tolerance. Use ranges. It's not a limitation so much as a law of the universe; 0.1 + 0.2 has never equalled 0.3 anywhere.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/vantagewithai/Vantage-NodesV2.git
    

    Restart, hard-refresh, then find it in Vantage/Utils or search "Float Value Switch". ComfyUI Manager should also carry Vantage-NodesV2; the git clone is what the README documents.

    Nothing to install in pip terms - no requirements file, no declared dependencies, and pyproject.toml lists no packages because the whole pack runs on ComfyUI's own stack. The requirement that actually bites is freshness: the config UI depends on the newer frontend title-button and widget APIs, so an old ComfyUI gives you a node with no gear and no way in.

    Troubleshooting

    None output means no condition matched. Given float inputs drift, that's a normal first-time result - widen a range or add a catch-all. Remember the ranges are evaluated in order and the first hit wins, so an over-broad rule at the top will shadow everything below it.

    Results coming back as True/False when you expected numbers means the output type is still BOOLEAN; the converter runs on every result field, so float(True) is 1.0. Change the selector before you start wondering why your steps count is 1.

    Changing output type resets the result fields and disconnects links that no longer fit. Restoring an unchanged saved workflow keeps its links - but if you're mid-experiment, expect to re-enter the values after you flip the type.

    Finally, the pack-wide rule: names, conditions and entered results save with the workflow, but an updated pack with a changed schema wants a freshly created instance, not the one you've had on the canvas since last month.

    CategoryVantage/Utils

    Inputs (3)

    NameTypeDefaultDescription
    valueFLOAT0.00—
    output_typeCOMBO4 options: BOOLEAN, INT, FLOAT, STRING
    conditionsSTRING[{"name":"Condition 1","operator":"=","value":0,"output":false}]—

    Outputs (1)

    NameTypeDescription
    value*—