Nodes/ComfyUI-MDSNodes/Ratio Combobox
ComfyUI Node

Ratio Combobox

Picking 50% by Typing 0.5 Is Annoying. This Is the Fancy Version.

By MarwanDSAI·Created about a month ago·Updated a day ago· 1
Ratio Combobox
    • ratio_float
    ratio50%

    Ratio Combobox is a dropdown of percentages - 10%, 15%, 25%, 50%, 75%, 85%, 100% - that spits out the matching decimal as a FLOAT. Pick "50%", get 0.5. That's the entire node.

    It sounds too trivial to install a custom node for, and honestly it is, unless you keep a workflow where a percentage means something and you're tired of mentally converting. This pack grew out of a model-testing workflow, where a "strength" or "denoise" parameter gets swept through a range of values while you compare outputs. In that context a label that reads "50%" instead of "0.5" is a small legibility win every single time you look at the graph - the percentage is the unit you think in, and this node keeps the graph speaking your language.

    How it works

    There's no magic here, which is kind of the point. The source is four lines of arithmetic: take the selected string, strip the %, divide by 100, return the float. "50%"0.5, "100%"1.0. One input (ratio, the dropdown), one output (ratio_float, a plain FLOAT).

    It belongs to the plumbing layer of ComfyUI - the family of value nodes whose whole job is turning a single number into something the graph can fan out to multiple consumers. Same idea as a Primitive node, just pre-shaped for percentage presets.

    Where it fits

    The natural targets are the decimal-sized widgets: denoise on a KSampler (the pack's own docs suggest 0.20–0.60 for img2img/upscaling, 1.0 for fresh txt2img), a strength multiplier feeding a LoRA, or a scale factor you want to sweep. Wire ratio_float into the widget's converted input and you've got a click-through preset instead of a number you retype.

    Installing it

    It ships in MarwanDSAI/comfyui-mdsnodes, so install the pack once and every node in it comes along. ComfyUI Manager: search "ComfyUI-MDSNodes", install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MarwanDSAI/comfyui-mdsnodes
    

    Restart after either route. No extra packages - the pack has an empty requirements.txt and zero declared dependencies.

    The one thing to know

    The presets are fixed. There's no custom entry box, so if you need 63%, this node won't help you - grab a regular FLOAT primitive instead. One small note: the README advertises four presets (10/25/50/100), but the code actually ships seven (adds 15, 75, 85). Trust the dropdown, not the README. If you're only in it for the decimal conversion, this is fine; if you need arbitrary values, you were never going to be satisfied by a combobox anyway.

    CategoryMDSNodes/FLOAT

    Inputs (1)

    NameTypeDefaultDescription
    ratioCOMBO50%Select a predefined percentage option from the list.

    Outputs (1)

    NameTypeDescription
    ratio_floatFLOATThe selected percentage converted into a decimal float value (e.g., 50% becomes 0.5).