pi (3.14159)
The constant you don't need to memorize
- FLOAT
The pi node from Basic data handling does one thing: it hands you π ≈ 3.14159 as a FLOAT, on demand, with no input widgets. That's it. You drag it in, a number comes out the FLOAT socket, and you wire it wherever you need a circle constant.
It reads as the most pointless node in the pack - until the day you need pi in a workflow and realize you'd rather grab a named node than trust yourself to type 3.1415926535 correctly into a value widget. Constants are exactly the kind of thing that's trivial until it's wrong, and this is the "never get it wrong" option.
Where pi actually shows up in ComfyUI
More often than you'd think, once you start doing any geometric math:
- Circumference and arc length - building rotation schedules, circular camera paths, anything where you compute
2 * pi * r. - Angle conversion -
180 / piis the radians-to-degrees constant; the pack'sdegreesandradiansnodes use it internally, and pi is what you'd feed a formula if you wanted the conversion yourself. - Periodic functions - sine and cosine curves with a period of
2π. TheMathSinandMathTannodes take angles directly, but if you're synthesizing a wave from a step counter,2 * piis the multiplier that makes the math work.
How it works
There's no mechanism to speak of - the node returns math.pi from Python's standard library, full double precision (~15 significant digits). It's a constant generator with zero inputs and one FLOAT output.
One interaction worth knowing: the pack's MathFormula node has its own pi, but there you have to call it as a function - pi() - because a bare pi is treated as a variable name. If you ever write pi in a formula and get an "unknown identifier" error, that's why. This node sidesteps the whole thing by being a plain value on a wire.
Installing it
Same install story as every node in this pack: Basic data handling is dependency-free, downloads no models, and requires nothing but a restart. ComfyUI Manager → search "Basic data handling" → install → restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
Restart and find pi under Basic/maths.
The honest take
Will you use this node weekly? Probably not. But it's part of a larger math toolkit that costs you nothing extra to install, and on the day you're building a circular-motion workflow at 1am, being able to grab a correctly-rounded pi without looking it up is quietly delightful. That's the whole pitch, and it's a fair one.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |