ComfyUI Node

Float

A plain number, wrapped

By ljleb·Created 2 years ago·Updated 29 days ago· 101
Float
    • recipe
    value0.00

    Float Mecha Hyper is a one-input, one-output box: you type a number, you get a MECHA_RECIPE. It's the simplest node in the whole Mecha Merge Node Pack, and you'll reach for it constantly without ever thinking about it - because nearly every merge node in this pack takes its strength (alpha), its probability, its ratio as a MECHA_RECIPE input, and something has to turn "0.6" into a recipe.

    In the comfy-mecha model, a recipe isn't a merged model - it's a lazy description of a merge that runs key-by-key later, when Mecha Merger executes it. That's what makes merging here fit in low memory (the whole point of the pack). A "param" like a strength value is itself a recipe: a tiny literal. Float is the literal. Everything else is composition on top of it.

    What you actually set

    One input, value, a FLOAT with a range of roughly ±1.8e19 and a step of 0.01. Default 0. That's it. Feed the recipe output into any param-style input on another Mecha node - the alpha slot on Weighted Sum, Geometric Sum, Add Difference, or the probability slot on Dropout.

    The output is a MECHA_RECIPE, same as every recipe node. Wire it where a param is expected and the merge treats every key in the model the same way: full-strength blend at 1.0, no blend at 0.0.

    When you'd want something else

    The reason this node exists as a recipe instead of letting the pack just take a plain float is that Mecha lets you make parameters vary. If one number for every key isn't what you want:

    • Blocks Mecha Hyper - a different value per architecture block (the SuperMerger "merge block weighted" workflow).
    • Mecha Regex Weights - a different value per key, matched by pattern.
    • Another recipe node - e.g. Get Dtype Mecha Recipe produces a device/dtype string as a param recipe, which you could pipe where a value recipe goes.

    Float is the plain-vanilla case, and it covers most merges. Don't over-engineer a blend that only needs one dial.

    Install

    ComfyUI Manager → search mecha → install Mecha Merge Node Pack, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ljleb/comfy-mecha.git
    pip install -r comfy-mecha/requirements.txt
    

    Restart ComfyUI. The only Python dependency is sd-mecha==1.1.7 - the pack downloads no models; it reads checkpoints and LoRAs from folders you already have.

    Gotchas

    None serious, but two things trip people up. First: the default is 0.0, so a disconnected or forgotten Float reads as "merge at zero strength" - which silently does nothing. If a merge comes out identical to your base model, check the param nodes feeding alpha. Second: because params are recipes, you can accidentally feed a weight-space model recipe into an alpha slot if you're not careful about which wire is which. A float recipe has no weight space at all, so this node is also your sanity check - if you see (delta|param|weight) suffixes on a socket, a Float recipe is always a legal param value for it.

    Categorymecha

    Inputs (1)

    NameTypeDefaultDescription
    valueFLOAT0.00-18446744073709550000–18446744073709550000

    Outputs (1)

    NameTypeDescription
    recipeMECHA_RECIPE