Nodes/WAS Node Suite v3/Constant Number
ComfyUI Node Runs on cloud

Constant Number

Hold one value in one place

By WASasquatch·Created 3 years ago·Updated 2 days ago· 1,843
Constant Number
    • NUMBER
    • FLOAT
    • INT
    number_type
    number0.00
    number_as_text

    WAS's own documentation lists this node by name only - no further description - which is honestly fine, because the behavior isn't in doubt given how the rest of WAS's Number family works. This is the simple end of that family: a source node that holds one fixed numeric value you set, and outputs it wherever you wire it. No math, no randomness, no logic - just a number you typed once, available to as many downstream nodes as need it.

    What it's actually for

    The value of a node this simple is entirely about workflow hygiene. If the same number - a resolution value, a repeated multiplier, some constant your graph uses in several places - needs to reach multiple nodes, you have two options: retype it everywhere and hope you never need to change it, or set it once in a Constant Number and wire that single output to everywhere it's needed. Change the value in one place, and every node downstream picks up the new number automatically. That's the entire pitch, and it's a real one - the same discipline that makes a variable better than a magic number scattered through code applies just as much to a node graph.

    It pairs naturally with WAS's other Number nodes: feed a Constant Number into a Number Operation for math, a Number to Int or Number to Seed converter if you need a different numeric type downstream, or a Number Input Switch if you want to toggle between this fixed value and something else.

    A small but real benefit worth naming: because it's a dedicated node rather than a number typed directly into every downstream widget, it also shows up clearly when you're reading someone else's shared workflow - a labeled Constant Number node in the graph tells you at a glance "this value is intentional and reused," which a bare number buried in three different widgets doesn't.

    Installing it

    Bundled with the full WAS Node Suite pack:

    • ComfyUI Manager - search WAS Node Suite, install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui/, then pip install -r requirements.txt from inside that folder, then restart ComfyUI.

    Common issues

    There's genuinely not much to troubleshoot on a node this simple once it's installed. The one mix-up worth flagging: don't confuse it with WAS's Random Number node, which shares the same general shape (a number source with nothing wired in) but produces a different value every run by design. Constant Number is the one guaranteed not to change - if your "constant" keeps drifting between runs, you've got the wrong node.

    Beyond that, the pack-wide caveat applies here as it does across all of WAS Node Suite: it's been unmaintained since December 2023, and "Import Failed" errors after a ComfyUI update are a real, recurring complaint tied to older pinned dependencies colliding with newer ones. Reinstalling requirements.txt inside your ComfyUI venv is the usual fix if the whole suite stops loading.

    CategoryWAS Suite/Number

    Inputs (3)

    NameTypeDefaultDescription
    number_typeCOMBOHow the value is read. `integer` cuts off any fraction, so 8.7 becomes 8; `float` keeps it as typed; `bool` collapses it to 1 when it is above 0.5 and to 0 otherwise.
    numberFLOAT0.00-18446744073709550000–18446744073709550000The value to send on, before number_type is applied: 8.7 leaves as 8 in `integer` and 8.7 in `float`. Ignored while number_as_text holds anything.
    number_as_textoptSTRINGThe number in digits, used instead of the widget above. `integer` keeps every digit, past what the widget holds: 9007199254740993. `float` also takes a point or an exponent: -12.5, .5, 1e6. `bool` takes a word: true, 1, yes, on, or false, 0, no, off. Digits, not a sum: 2^53+1 is refused. Use Number Expression for a sum.

    Outputs (3)

    NameTypeDescription
    NUMBERNUMBERThe value in the chosen type: whole in `integer` and `bool` mode, decimal in `float` mode.
    FLOATFLOATThe same value as a float, so 8 leaves here as 8.0.
    INTINTThe same value as a whole number, cut off rather than rounded, so 8.7 leaves here as 8.