Axis To Float
The CFG-sweep converter, under its older spelling
- axis
- FLOAT
Axis To Float is the same converter as Axis To FLOAT - the pack's node that takes an AXIS_VALUE from XY Grid Helper and re-declares it as a float so you can wire a grid row or column into a decimal parameter. "Axis To Float" and "Axis To FLOAT" are one node; the two spellings just got picked up by node listings at different points in the pack's life. If you searched for this, what you're looking for is the float converter, and here's everything that matters about it.
The reason you want it: the classic grid is prompt × CFG. CFG is a float. The grid hands you an unknown-type AXIS_VALUE. ComfyUI refuses to connect unknown types to a FLOAT socket. Axis To Float makes the connection legal, and the value passes through untouched.
What it does
- axis (required) - the
AXIS_VALUE, usually therow_valueorcolumn_valuefrom XY Grid Helper (or from Any List Iterator if you're stepping a list by hand). - FLOAT (output) - the same value, typed.
That's the whole interface. There's no conversion arithmetic - the converter's job is type declaration, and whatever your list actually holds is what arrives at the sampler.
The one rule that saves you an hour
The value must already be a float at the source. Three ways people get burned:
- Text Splitter lists hold strings. Splitting
"6,7,8"gives you"6","7","8"- strings. The converter passes a string through; the sampler either errors or treats it as garbage. - Ints stay ints. A list built from
6, 7, 8ints stays integer-typed. Fine for CFG in most samplers, but if you need6.5, you need an actual float in the list. - The number of decimal places is on you. Grid labels come from whatever the list holds -
6.0labels as "6.0",6labels as "6".
Build numeric axes with Any List using real floats, or from a file where each line is a proper number. Then the converter just works.
Installing it
Part of qq-nodes-comfyui:
cd ComfyUI/custom_nodes
git clone https://github.com/kenjiqq/qq-nodes-comfyui
Restart, or install qq-nodes-comfyui via ComfyUI Manager. Under the pack's QQNodes/XYGrid family. For custom converter types beyond the stock set (STRING, MODEL, INT, NUMBER, FLOAT, BOOLEAN, VAE, CLIP), add your type to custom-axis-config.json and restart.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| axis | AXIS_VALUE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |