Nodes/qq-nodes-comfyui/Axis To FLOAT
ComfyUI Node

Axis To FLOAT

The converter for CFG, denoise, and every number with a decimal

By kenjiqq·Created 3 years ago·Updated about a year ago· 76
Axis To FLOAT
  • axis
  • FLOAT

Axis To FLOAT is the workhorse converter of kenjiqq's XY grid pack. It takes the AXIS_VALUE output from XY Grid Helper and re-declares it as a FLOAT, which is the type every sampler-ish parameter in ComfyUI wants: CFG scale, denoise strength, prompt weight, upscale amount. If you're sweeping any of those across a grid, this is the converter you'll wire on the row or column output.

It's a one-to-one node - input axis, output FLOAT, pure pass-through at runtime - but it's the piece that makes a numeric grid connect, because ComfyUI won't let an unknown AXIS_VALUE into a FLOAT socket otherwise. The pack generates it (along with Axis To INT, STRING, MODEL, and the rest) from axis-config.json.

The numbers game: what's actually in your list

The converter declares the type, it doesn't convert the value. This is the single most important thing to understand about all the Axis To X nodes:

  • The value in your list has to already be a float for this to behave. If you built the axis with Any List and typed 7.5, you're fine.
  • If the value is an int (7) or a string ("7.5"), it comes out as that - and a string CFG silently produces nonsense (or an error deep in the sampler).
  • Text Splitter gives you strings. If you split "6.0,7.0,8.0" into a list, the axis holds strings, not floats. This is the classic "my CFG grid came out weird" bug, and it's on the list-building side, not the converter.

If you're building numeric axes by hand, the reliable move is Any List with real numbers, or a list of ints piped through an int-to-float node before the grid.

When you'd use it

  • CFG sweeps - the canonical grid. Row: prompt. Column: 6.0, 7.0, 8.0. This converter on the column output, straight into the sampler's cfg input.
  • Denoise sweeps for img2img or hires passes.
  • Any percentage/strength knob that takes a decimal.

The family note

You may see this node listed as both "Axis To FLOAT" and "Axis To Float" in node directories - same generated node, captured with different casing over the pack's versions. The current pack registers the converters from axis-config.json as Axis To FLOAT etc. (STRING, MODEL, INT, NUMBER, FLOAT, BOOLEAN, VAE, CLIP), and you can add your own types to custom-axis-config.json to spawn more.

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. Found under QQNodes/XYGrid Axis.

CategoryQQNodes/XYGrid Axis

Inputs (1)

NameTypeDefaultDescription
axisAXIS_VALUE

Outputs (1)

NameTypeDescription
FLOATFLOAT