Nodes/Comfyroll Studio/βš™οΈ CR Value
ComfyUI Node Runs on cloud

βš™οΈ CR Value

One number, both as a FLOAT and an INT

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,296
βš™οΈ CR Value
    • FLOAT
    • INT
    • show_help
    β—„value1.00β–Ί

    The simplest node in this whole batch: one number widget, two typed outputs. Set value once, and you get it back as both a FLOAT and an INT - no separate "Int" and "Float" primitive nodes needed when you want the same number available as both types.

    Why this earns a place in your graph

    ComfyUI's native primitive nodes are typed - you pick Int or Float when you create one, and if a later part of your graph needs the other type, you're adding a converter or a second primitive that you now have to keep in sync by hand. CR Value sidesteps that: type the number once, wire the FLOAT output where a float is expected and the INT output where an integer is expected, and there's only ever one widget to change. A batch size (integer) and a related float parameter that should track the same underlying number are the kind of pairing this is built for.

    Worth being clear about the INT output's behavior: it's derived from the same value you typed, which is a FLOAT field by default. If you type 2.7, don't expect the INT output to also carry 2.7 - expect it to be rounded or truncated to a whole number. If you need the exact fractional value preserved anywhere downstream, that's what the FLOAT output is for; treat the INT output as a whole-number-only reading of the same input.

    The inputs and outputs that matter

    • value - a single FLOAT widget, default 1. That's the entire input.

    Outputs: FLOAT (the value as typed) and INT (the same value, converted to a whole number), plus the standard show_help link.

    How to install it

    ComfyUI Manager - search "Comfyroll Studio", install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git
    

    then restart. No models, no dependencies - it's a number in a box.

    Common issues

    There isn't much that goes wrong with this node specifically - it's about as low-risk as they come. The one thing to actually watch is exactly the rounding behavior above: if a downstream node is receiving the INT output and behaving like it got a different number than you typed, that's expected, not a bug - you typed a fractional value and the integer output rounded it.

    If the node itself is missing from your search, that's the pack-wide failure mode: Comfyroll loads its entire node set from one file, so a single broken import takes every CR node down. Check your ComfyUI console for Comfyroll Studio: Failed to load ... nodes, commonly caused by a Pillow version conflict from another custom node, and reinstall Pillow (pip install --upgrade --force-reinstall pillow) or update Comfyroll through Manager.

    Category🧩 Comfyroll Studio/πŸ› οΈ Utils/βš™οΈ Other

    Inputs (1)

    NameTypeDefaultDescription
    valueFLOAT1.00β€”

    Outputs (3)

    NameTypeDescription
    FLOATFLOATβ€”
    INTINTβ€”
    show_helpSTRINGβ€”