Nodes/Tojioo Passthrough/Any Float Switch
ComfyUI Node

Any Float Switch

Pick a float by slot order — strength, denoise, cfg, whatever

By Tojioo·Created 11 months ago·Updated 7 months ago· 13
Any Float Switch
    • float
    float_1

    Any Float Switch is the fallback switch for decimals: it looks at its FLOAT inputs, returns the first one that's connected and live, and sends it out the float output. No selector widget, no dropdown, no typing. The wiring is the choice, and the whole thing is locked to floats so you can't accidentally jam an image into it.

    Floats are the sliders of your workflow - denoise, strength, cfg scale, controlnet weight, upscale factor - and they're exactly the values you want to hand between alternative branches. If you've used rgthree's Any Switch or any first-non-null switch, you know the pattern: it's the "whichever branch is live wins" shape, and it's how you build optional upstream paths without touching a control each run.

    How it works

    The node starts with one socket, float_1, and grows a new one every time you connect another float source. At execution it collects everything that isn't None and returns the lowest-numbered slot that has a live value. That None-skip is the heart of it: mute or bypass an upstream node and its slot delivers None, gets skipped, and the next slot silently wins. If no slots are connected at all it raises an error rather than returning garbage.

    Like the other primitive-typed nodes in this pack, FLOAT is a "force input" type here, so the sockets are wire-only - you can't just type a number into the node, which keeps every value traceable back to a real source.

    Where you'd use it

    • Denoise presets. Draft pass at 0.55 in float_1, upscale pass at 0.35 in float_2, mute whichever you're not running.
    • ControlNet weight routing. Different weights for different control models, one consumer downstream.
    • Fallback logic. Preferred value first, fallback second, graph chooses itself.

    Install

    ComfyUI Manager → search "Tojioo Passthrough" → install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Tojioo/tojioo_passthrough.git
    

    Restart ComfyUI. No models, no pip dependencies - the pack is lean Python plus a bundled frontend and is on the Comfy Registry under publisher tojioo.

    Common issues

    Same two gotchas as every switch in this family. Slot order decides, not recency - a live float_1 always beats float_2, so if the wrong value flows, the earlier slot's upstream is muted or unwired. And an all-empty node throws "no inputs connected" on the canvas. Beyond that it's a box that routes a decimal; there's not much to break.

    CategoryTojioo Passthrough/Dynamic Nodes/Switch Nodes

    Inputs (1)

    NameTypeDefaultDescription
    float_1optFLOAT

    Outputs (1)

    NameTypeDescription
    floatFLOAT