Nodes/CalculatorPro - Node Suite for ComfyUI/💱 Convertisseur Manuel (Taux)
ComfyUI Node

💱 Convertisseur Manuel (Taux)

Currency math in ComfyUI without an API key

By orion4d·Created about a year ago·Updated about a year ago· 0
💱 Convertisseur Manuel (Taux)
    • result
    • output_str
    amount100.00
    manual_rate1.0700
    operation

    ComfyUI doesn't know or care what a dollar is, but sometimes your workflow is about pricing, budgeting, or some other rate-based quantity - and you want that number to feed into a prompt or a parameter instead of living in your head. 💱 Convertisseur Manuel (Taux) is a two-number calculator: an amount, a rate, and a choice of multiply or divide. No API, no live exchange rates, no key. You bring the rate; it does the arithmetic.

    What you set

    Only three inputs, and all of them are things a beginner actually understands:

    • amount (FLOAT, default 100) - the quantity you're converting.
    • manual_rate (FLOAT, default 1.07, step 0.0001) - the rate. The 0.0001 step is there because real-world exchange rates need four decimal places; EUR→USD at 1.07 is the author's default.
    • operation - a dropdown with exactly two choices: "Multiplier par le taux" (multiply) and "Diviser par le taux" (divide).

    That's the entire node. Choose which direction you need, plug in the numbers, and the output is result (FLOAT) plus output_str (STRING) with a formatted line like 100.00 × 1.07 = 107.00.

    When you'd actually reach for it

    Honestly? Most workflows never touch currency. Where this node earns its keep is as a rate calculator for anything that scales by a fixed factor - pricing images per unit, cost-per-step math for a batch run, converting a model size between two systems. The divide direction is the useful one to remember: amount ÷ rate answers "how much base currency is this priced amount in?" without you opening a spreadsheet.

    Because amount is a FLOAT input, you can also wire it from another node - feed in a computed value and the rate stays a manual constant. That's the same "compute, don't hand-type" philosophy as the rest of the CalculatorPro suite, and it's the reason to use this over just doing the math in your head: it stays live and reproducible in the graph.

    The one gotcha

    Set manual_rate to 0 with divide selected and you don't get a crash - you get result = NaN and an error string ("Erreur: Taux ne peut pas être zéro.") on output_str. NaN will then quietly flow downstream, so if you see nan appear in a preview, check you didn't zero the rate. Also note the dropdown labels are French ("Multiplier par le taux"), which matches the author's other nodes but will make you pause the first time.

    Install

    It's one of the eight nodes in the CalculatorPro pack, so a single install gets you all of them:

    cd ComfyUI/custom_nodes
    git clone https://github.com/orion4d/Calculator_Pro
    

    then restart ComfyUI. Or search "Calculator_Pro" in ComfyUI Manager. No requirements.txt, no models, no network calls - pure stdlib Python, which is exactly the sort of dependency-free utility you want sitting in a graph you share with people who don't have your environment.

    CategoryCalculatorPro/Converters

    Inputs (3)

    NameTypeDefaultDescription
    amountFLOAT100.00
    manual_rateFLOAT1.0700
    operationCOMBO2 options: Multiplier par le taux, Diviser par le taux

    Outputs (2)

    NameTypeDescription
    resultFLOAT
    output_strSTRING