📏 Convertisseur de Longueur
From millimeters to parsecs, because someone had to
- result
- output_str
Here's the workflow that makes this node click: you're generating a character and you want the prompt to say the subject is 5.9 feet tall, but you think in meters. 📏 Convertisseur de Longueur turns 1.80 meters into 5.906 feet, and - the part that matters - hands you a ready-to-use string you can drop into a prompt assembler. It's a unit converter that lives inside your graph instead of in a browser tab.
What it converts
The from_unit and to_unit dropdowns each carry 23 units, which is where this node is genuinely fun. You get the sensible set - m, cm, mm, km, dm, µm, nm, Å, pm, fm - plus imperial (inch, foot, yard, mile, nautical mile) and then it goes off the rails in the best way: light-years, parsecs, astronomical units, Earth radii, the Planck length, and three French historical units (lieue, toise, aune). The README isn't overselling with "millimeters to parsecs."
The mechanism is the same clean trick all the CalculatorPro converters use: every unit has a fixed factor relative to meters, the value is normalized to meters, then divided by the target unit's factor. No floating lookup tables, no API, just multiplication. value (FLOAT) and the two dropdowns are your only inputs.
How you'd use it
The two outputs are result (FLOAT) and output_str (STRING). result is the bare number - feed it into a math node if you're chaining conversions or computing dimensions. output_str is the formatted sentence (1.8 m = 5.906 ft), and that's the output the README shows off: wire it into a prompt assembler and your character description becomes "a 5.9-foot tall man" computed live from a meter value you can adjust.
Where it beats doing the math yourself: any workflow where a dimension is an input someone might change. Model your character's height as one FLOAT widget in meters, convert to feet for the prompt, and the string updates on every run. It's the "parameters drive everything" habit ComfyUI rewards, minus the arithmetic errors.
Watch out for
The usual suspects apply: the dropdown labels are French, and result is a plain float that doesn't care about rounding - you'll get full precision out of result and the tidier :g formatting on output_str. The two French units (toise ≈ 1.949 m, aune ≈ 1.188 m) are historical and won't match what you'd find in a modern conversion table's "toise," but you're not using those unless you're a historian. If you are, enjoy.
Install
It ships with the rest of CalculatorPro, so install once and you get all eight nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/Calculator_Pro
restart ComfyUI, or search "Calculator_Pro" in ComfyUI Manager. Zero dependencies, zero models, zero setup beyond the clone - a unit converter really shouldn't drag a wheel into your environment, and this one doesn't.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| value | FLOAT | 1.00 | — |
| from_unit | COMBO | 23 options: Mètre (m), Centimètre (cm), Millimètre (mm), Kilomètre (km), Décimètre (dm), Micromètre (µm), +17 | |
| to_unit | COMBO | 23 options: Mètre (m), Centimètre (cm), Millimètre (mm), Kilomètre (km), Décimètre (dm), Micromètre (µm), +17 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| result | FLOAT | — |
| output_str | STRING | — |