Nodes/comfyui_sunxAI_facetools/Select Float (Bool)
ComfyUI Node

Select Float (Bool)

The tiny ternary that makes face workflows conditional

By upseem·Created about a year ago·Updated 11 months ago· 15
Select Float (Bool)
    • value
    cond
    true_value0.50
    false_value0.00

    Select Float (Bool) is the smallest possible idea: a boolean in, one of two floats out. True gives you true_value, False gives you false_value. That's the entire node - literally a ternary operator wearing a UI. It's the least glamorous thing in the comfyui_sunxAI_facetools pack by Sunx.ai, and it's also the glue that makes the pack's conditional workflow pattern click together.

    Why it exists. The whole pack is built on a has_face signal - every "New" node (VAE Encode New, VAE Decode New, the color adjust) has an optional boolean input that tells it whether to do real work or short-circuit. But that boolean has to get to those nodes, and sometimes you need to translate it into a number instead: a denoise strength, a weight, a threshold. That's this node's job. Detect Face By Index emits has_face; this converts it into "use 0.5 when there's a face, 0.0 when there isn't"; the sampler or InstantID node consumes the number. It's the numeric sibling of the boolean gating the rest of the pack does.

    The inputs. Three, all trivial:

    • cond - the boolean decision
    • true_value (FLOAT, default 0.5) - returned when True
    • false_value (FLOAT, default 0) - returned when False

    The defaults are telling: a common pattern is "full-strength face processing when a face exists, zero when it doesn't," and 0.5/0 captures that. Both values are bounded 0–1 by default, which fits anything that's a weight or a strength. Output is a single FLOAT named value.

    Honest take. This is a convenience node, and the thing it does you could wire yourself with any of the switch/if-any nodes from Impact Pack or rgthree - if you already have one of those in your graph, you don't need this. But if you're working inside this pack's face-detection flow, having a node that speaks the same has_face language makes the graph readable at a glance: the boolean comes out of the detector, this node turns it into a number, done.

    Install. With the pack, like everything else: ComfyUI Manager → search comfyui_sunxAI_facetools, or cd ComfyUI/custom_nodes && git clone https://github.com/upseem/comfyui_sunxAI_facetools, then restart. Yes, the pack's install is heavy - insightface, onnxruntime, ultralytics, mediapipe, transformers - for a node this small, but the pack's real payload is the face tooling; this is just the plumbing.

    There's nothing to get wrong with it: the only failure mode is forgetting it exists and reaching for a bigger, heavier switch node when all you needed was a one-line choice between two numbers.

    CategorysunxAI_facetools

    Inputs (3)

    NameTypeDefaultDescription
    condBOOLEAN
    true_valueFLOAT0.500–1
    false_valueFLOAT0.000–1

    Outputs (1)

    NameTypeDescription
    valueFLOAT