Nodes/ComfyUI-JDCN/LogicUtil_Manual Choice Float
ComfyUI Node

LogicUtil_Manual Choice Float

Pick a float from a preset list, no typing in the field

By daxcay·Created 2 years ago·Updated about a year ago· 159
LogicUtil_Manual Choice Float
    • FLOAT
    input_string1.0$2.0$3.0
    separator$
    index0

    Say you have a fixed menu of strengths - 0.6, 0.7, 0.8 - and you want to cycle through them run to run without dragging a slider back and forth. LogicUtil_Manual Choice Float is the node for that: you type the options once as text, it splits them on a separator, and the index input picks which one comes out.

    How it works

    Three inputs do all the work:

    • input_string - your list, written as one line like 0.6$0.7$0.8 (the default is 1.0$2.0$3.0).
    • separator - the character that splits the list, $ by default. Change it to , or ; if you'd rather.
    • index - which element to return, 0-based, defaulting to 0.

    The output is a FLOAT, cast from the string. The neat trick is that index is a real input, so you can wire it to a counter node and step through presets automatically per batch - same idea as the "one variable at a time with a fixed seed" discipline the community beats into everyone's head, but automated.

    Now the gotchas, because there are three and they'll each bite you once. First, index has no bounds checking in the shipped code. choices[index] with an index past the end of the list throws an IndexError and kills the queue - there's no wrap-around, no clamp. Second, every entry must parse as a float. The node is called Manual Choice Float and it will happily split and index a list that contains banana, then die at float('banana'). Keep the list clean. Third, the output is a real float, not a string, so a downstream node expecting text will need a conversion node.

    Where you'd actually reach for this: batch workflows where you want a different denoise or CFG per item, animation-style workflows where a value steps per frame, or anywhere you want a compact "settings menu" without building dropdown machinery. It's one of the quieter members of the LogicUtil family - a port of aria1th's ComfyUI-LogicUtils riding inside the JDCN pack, which itself is mostly known for its file and latent batch nodes. The README doesn't document this family at all, so this page is basically the docs.

    Install

    Install is the standard JDCN routine: ComfyUI Manager → "Install Custom Node" → search JDCN → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/daxcay/ComfyUI-JDCN
    cd ComfyUI-JDCN && pip install -r requirements.txt
    

    Only piexif on the requirements list, no models to fetch. When a workflow errors right at queue time and the traceback mentions IndexError, check your index against your list length before anything else - that's the failure mode this node is best at producing.

    CategoryLogicUtil

    Inputs (3)

    NameTypeDefaultDescription
    input_stringSTRING1.0$2.0$3.0
    separatorSTRING$
    indexINT00–9999999999

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT