Nodes/CalculatorPro - Node Suite for ComfyUI/💾 Convertisseur de Données
ComfyUI Node

💾 Convertisseur de Données

GB vs GiB is the entire point of this node

By orion4d·Created about a year ago·Updated about a year ago· 0
💾 Convertisseur de Données
    • result
    • output_str
    value1.00
    from_unit
    to_unit

    Every ComfyUI user has had this argument: is that 12GB checkpoint actually 12,000,000,000 bytes or 12 × 2³⁰? Hard drives sell you the first one; model download pages and os.path.getsize() hand you the second. 💾 Convertisseur de Données is the CalculatorPro node built around exactly that distinction - SI units (megabyte, 10⁶) and binary units (mebibyte, 2²⁰) kept as separate, honestly-labeled dropdown entries.

    What it converts

    from_unit and to_unit each offer 12 units, split cleanly in half:

    • SI (decimal): Byte, Bit, then kilo-, méga-, giga-, téra-, péta-octet at powers of 10 (KB = 10³ B, MB = 10⁶ B, …).
    • Binary: kibioctet, mébioctet, gibioctet, tébioctet, pébioctet at powers of 2 (KiB = 2¹⁰ B, MiB = 2²⁰ B, …).

    The author even spells it out in the dropdown labels themselves - "Méga-octet (MB, 10⁶ B)" vs "Mébioctet (MiB, 2²⁰ B)" - so there's no ambiguity about which MB you're getting. That's the whole product. The mechanism is the standard normalize-then-divide: everything converts to bytes first, then to the target unit, and value (FLOAT) with the two dropdowns are your only inputs.

    Why it matters in an image-gen context

    The practical moment this node pays for itself: figuring out whether a model fits on a card. ComfyUI model files are measured in binary-ish units when you look at file size, but advertised in round decimal numbers. If you're budgeting VRAM or disk across a batch of checkpoints and LoRAs, "how many GB is 6 GiB" is exactly the kind of off-by-0.0735 error that eats your headroom. This node makes that a widget instead of a fuzzy memory.

    Outputs are the suite standard: result (FLOAT) with the bare number and output_str (STRING) with the formatted line. Feed result into a budget-calc chain or output_str into any human-readable context. And since value is a normal FLOAT input, you can compute the number first and convert it - the "parameters drive everything" pattern the whole pack pushes.

    Gotchas

    The French labels are the only real stumbling block, and they're self-explanatory once you notice the pattern: "-octet" = byte, so "Kilo-octet" is kilobyte. The one trap that isn't French is bit vs byte - remember a bit is 1/8 of a byte, which this node handles correctly but won't warn you about if you click wrong. The dropdown pairs are long enough that it's easy to pick a decimal unit when you meant binary, so read the parenthetical before you click.

    Install

    Part of the CalculatorPro suite - install the pack once:

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

    restart ComfyUI, or search "Calculator_Pro" in ComfyUI Manager. No dependencies, no model downloads, nothing to configure - a converter that doesn't touch your Python environment is the rare ComfyUI custom node that can't break anything else.

    CategoryCalculatorPro/Converters

    Inputs (3)

    NameTypeDefaultDescription
    valueFLOAT1.00
    from_unitCOMBO12 options: Octet (Byte), Bit (b), Kilo-octet (KB, 10³ B), Méga-octet (MB, 10⁶ B), Giga-octet (GB, 10⁹ B), Téra-octet (TB, 10¹² B), +6
    to_unitCOMBO12 options: Octet (Byte), Bit (b), Kilo-octet (KB, 10³ B), Méga-octet (MB, 10⁶ B), Giga-octet (GB, 10⁹ B), Téra-octet (TB, 10¹² B), +6

    Outputs (2)

    NameTypeDescription
    resultFLOAT
    output_strSTRING