Number ++
The math node that hands you strings and booleans too
- pre_add
- override_number
- multiplier
- output_number
- output_int
- bool>0
- float_string
- int_string
- pre_add
- multiplier
- post_add
The boring reason to reach for this node: it's the arithmetic you do a hundred times per workflow - add something to a seed, scale a strength, offset a step count - wrapped in one node. The actual reason: it hands back the same value in five different shapes (float, int, boolean, and two formatted strings) from a single computation. That's the part ComfyUI's basic primitives make you build by hand, with extra nodes and converters, every single time. Number ++ collapses that whole routine into one box.
It's part of the DRMBT nodes family in the drmbt/comfyui-dreambait-nodes pack, and it's an output node - it displays its values in the UI, so it doubles as a quick debugger while you're building.
How it works
It's a four-stage pipeline, and the order matters: pre_add → optional override_number → multiplier → post_add. So the value you get is ((number + pre_add) * multiplier) + post_add, with override_number replacing number entirely if you wire it in. The optional inputs are typed any_typ, meaning they'll happily accept an int, a float, or even a string that wraps to a legal number - useful when a value comes out of a text-ish node and you don't want to add a converter step.
Then everything downstream gets computed once: the rounded integer (round/floor/ceiling per the integer dropdown), a boolean for > 0, and formatted string versions of both the float and the int. Those strings are the sleeper feature - they drop straight into filename templates, prompt text, or SaveText without a cast.
The inputs and outputs that matter
- number - the main value. This is the one you'll set or wire most often.
- integer - rounding method:
round,floor, orceiling. Defaults to round. - pre_add / multiplier / post_add - optional, all defaulting to no-op values (0, 1, 0). Wire only what you need.
- override_number - optional; replaces
numberentirely if connected.
Outputs:
- output_number (FLOAT) and output_int (INT) - the computed value.
- bool>0 (BOOLEAN) - true if the result is above zero. Great for driving a switch.
- float_string and int_string (STRING) - formatted text versions.
- pre_add / multiplier / post_add (FLOAT) - pass-through echoes of what you put in.
Installing
This node is one of several in the drmbt/comfyui-dreambait-nodes pack - you install the pack, not the node. ComfyUI Manager: search comfyui-dreambait-nodes. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/drmbt/comfyui-dreambait-nodes
# restart ComfyUI
Pure Python, no model downloads, no heavy deps for this one.
Where it earns its keep
The classic pattern: a seed node's output goes in, you pre_add an offset for an "explore variations around this seed" run, and the int_string goes into your save filename while bool>0 gates a switch. Another one: scale a cfg or strength value with multiplier, and use float_string to stamp the actual value into the prompt text so it's visible in the generated metadata. The echo outputs look like clutter but they're there so you can route the inputs onward without extra passthrough nodes - wire the whole node as a routing hub and it pays for itself in graph cleanliness. The trap, if there is one: the any_typ inputs accept a string that "wraps to a legal float," but a non-numeric string will error, not silently pass through - so if a value is coming from an LLM, make sure it parses. Otherwise it's the least dramatic node in the pack, and that's a compliment.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| number | FLOAT | 0.00 | Main number parameter |
| integer | COMBO | round | rounding method |
| pre_addopt | * | 0 | pre-add any type float int or legal float wrappable string value to number |
| override_numberopt | * | override any type float int or legal float wrappable string value to number | |
| multiplieropt | * | 1 | multiply the main number |
| post_addopt | FLOAT | 0.000 | add to value after multiplying |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| output_number | FLOAT | — |
| output_int | INT | — |
| bool>0 | BOOLEAN | — |
| float_string | STRING | — |
| int_string | STRING | — |
| pre_add | FLOAT | — |
| multiplier | FLOAT | — |
| post_add | FLOAT | — |