Nodes/ComfyUI-JakeUpgrade/Float Input Switch JK๐Ÿ‰
ComfyUI Node

Float Input Switch JK๐Ÿ‰

Flip between two CFG scales, denoise strengths, or guidance values with one checkbox

By jakechaiยทCreated 2 years agoยทUpdated 3 months agoยท 147
Float Input Switch JK๐Ÿ‰
    • float_output
    • boolean
    โ—„boolean_valuefalseโ–บ
    โ—„float_false0.0000โ–บ
    โ—„float_true0.0000โ–บ

    Floats are the settings you fiddle with the most - CFG scale, denoise strength, guidance. Float Input Switch JK๐Ÿ‰ lets you park two values in the graph and choose between them with a boolean, so "loose vs strict" or "draft vs final" becomes a checkbox instead of an editing session.

    It's the float sibling of the Int Input Switch and it exists for the same reason: JakeUpgrade's workflows are built to be toggleable, and tuning continuous parameters is the most common toggle of all. The shape will be familiar if you've touched any other CR * Input Switch JK node - same three inputs, same pass-through boolean, different datatype.

    How it works

    if float_true is not None and boolean_value:
        return (float_true, boolean_value)
    else:
        return (float_false, boolean_value)
    

    That's the whole logic. The three inputs:

    • boolean_value - the condition. True โ†’ the "true" float, False โ†’ the "false" float.
    • float_false - required, default 0. Returned when the condition is False.
    • float_true - optional, default 0. Returned when True; leave it unplugged and the node is a harmless pass-through.

    Outputs are float_output (the chosen FLOAT) and boolean (the condition echoed out so you can chain more switches off it). The step is 0.0001 and there's no meaningful min/max, so it'll carry anything from a 0.4 denoise to a 30.0 CFG without complaint.

    Where you'd reach for it

    Denoise strength is the poster child: 0.3 for a light img2img pass, 0.65 for a heavier rewrite, flip between them to compare. CFG/guidance A/B is another - especially with Flux and its guidance values, where "the number that works" changes per model. If you've got a positive and negative conditioning path sharing one KSampler, a float switch can decide which denoise each branch runs with. It's also the switch you'll see inside JakeUpgrade's image-gen and refine workflows, which toggle between draft and refinement settings rather than storing two separate graphs.

    Install

    Part of ComfyUI-JakeUpgrade. ComfyUI Manager โ†’ search ComfyUI-JakeUpgrade, or:

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

    Nothing extra to download. It's under ๐Ÿ‰ JK/๐Ÿ”€ Switch in the palette. The usual pack-level gotchas apply - if Manager flags a conflict with IPAdapter Plus, that's the replacement folder's doing and can be ignored; if the whole switch menu is missing, check that ENABLED_MODULES in config.ini includes switch.

    Category๐Ÿ‰ JK/๐Ÿ”€ Switch

    Inputs (3)

    NameTypeDefaultDescription
    boolean_valueBOOLEANfalseCondition to select between inputs (True=float_true, False=float_false)
    float_falseFLOAT0.0000Float value to return when condition is False
    float_trueoptFLOAT0.0000Float value to return when condition is True (optional)

    Outputs (2)

    NameTypeDescription
    float_outputFLOATโ€”
    booleanBOOLEANโ€”