Nodes/Quality of Life Nodes for ComfyUI/JSON Chain Float Pair (Soze)
ComfyUI Node

JSON Chain Float Pair (Soze)

Decimals belong here — adding a FLOAT to the JSON chain

By SozeInc·Created 2 years ago·Updated 8 days ago· 10
JSON Chain Float Pair (Soze)
  • chain_in
  • chain_out
name
value0.000

Some numbers in your payload carry decimals - CFG scale, denoise strength, the width of a crop as a fraction, a temperature for a text model - and if you route those through a node that truncates to INT, you've just silently changed the meaning of the request. JSON Chain Float Pair (Soze) is the pair node that keeps the decimal point: wire a FLOAT in, name it, and it lands in the final JSON as a proper number like 6.5, not 6 and not "6.5".

It works exactly like its siblings in the Soze JSON family - the same linked chain of JSON_PAIRS tuples flowing between pair nodes, ending in JSON Generate - so if you've used the String or Int Pair, you already know this one. You'll want it anywhere an API expects a float: sampler configs, strength parameters, anything that's a slider value on your side and a typed field on the API's side.

How it works

Read the incoming chain (or start fresh), append (name, float(value)), pass the new chain out. Same forceInput rule as the other pair nodes: the value input has no inline widget, so a FLOAT has to arrive over a wire from a number/range node or a CSV reader. A blank name skips the pair entirely. The node's value range is enormous (up to ±1e18) and steps by 0.001, which is more than enough for any real parameter.

Inputs and outputs

  • name - required string widget, the JSON key.
  • value - required FLOAT input, forced. Wire it in.
  • chain_in - optional JSON_PAIRS; the previous pair's chain_out, or nothing to start a new chain.

Output: chain_out. A typical chain:

Float Pair("cfg", 7.5) → Float Pair("denoise", 0.35) → JSON Generate

{"cfg":7.5,"denoise":0.35}.

Installing it

It ships in the Soze pack:

cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze.git
pip install -r ComfyUI_Soze/requirements.txt

Restart ComfyUI, or search ComfyUI_Soze in ComfyUI Manager. No models or credentials involved.

Gotchas

The only real trap is feeding this node an INT upstream - it will faithfully coerce to a float like 7.0, which is usually fine but can look odd if the API is picky about it. The inverse mistake is worse: shoving a FLOAT into the Int Pair truncates the decimal and loses information. If your payload has any decimals at all, route them through this node. And if you're hardcoding values rather than wiring them, remember the value port is a forced input - you'll need a constant node on the other end of the wire.

CategorySoze Nodes/JSON

Inputs (3)

NameTypeDefaultDescription
nameSTRING
valueFLOAT0.000-1000000000000000000–1000000000000000000
chain_inoptJSON_PAIRS

Outputs (1)

NameTypeDescription
chain_outJSON_PAIRS