XYZ String to Number
The Boring Node That Makes the Grid Work at All
- int_value
- float_value
Here's the dirty secret of this whole pack: XYZ Grid Input only outputs strings. You can wire x_value straight into a prompt because prompts are text. But a sampler's steps, cfg, and denoise inputs are numbers, and ComfyUI will not accept "20" where it wants 20. XYZ String to Number is the adapter that closes that gap - a single-input, two-output conversion node and the least glamorous, most necessary piece of the grid workflow.
How it works
You give it a string and pick a target type; it gives you both numeric forms back. Parse "7.5" as FLOAT and you get 7.5; parse it as INT and you get 7 (it runs int(float(...)), so it truncates rather than rounding). Whitespace is stripped, which matters because the grid's values come out of a comma-split with no guarantees about spacing.
text- the string to convert. Wire this to Grid Input'sy_valueorz_value. It's markedforceInput, which is what lets another node's string output plug into it at all - that's why the grid wiring works.output_type-INTorFLOAT. Choose INT for steps, FLOAT for CFG and denoise strength.
Outputs: int_value and float_value, both always present regardless of your choice - so you can wire the same node into a steps input and a CFG input at once if you're testing both.
The trap: silent zero
If the string can't be parsed, the node doesn't error - it prints a warning to the console and returns (0, 0.0). A steps value of 0 will send the sampler off the rails, and a CFG of 0.0 will too, and neither failure announces itself. If a grid run produces garbage or errors deep in the sampler, this node is the first place to look: type a stray comma in your Y list and one combination suddenly feeds a 0 into your sampler. For a 2×2 grid that's a quarter of your images wasted.
It's also the node that makes the pack's "X = text, Y = number, Z = number" pattern click: one converter per numeric axis, X wired direct. Nothing fancy, but skip it and the whole grid falls apart.
Installing
Same pack as everything else, so it installs the same way. ComfyUI Manager → search "XYZ Grid", or:
cd ComfyUI/custom_nodes/
git clone https://github.com/psdwizzard/Comfyui-XYZ-stitch.git
Restart ComfyUI and it shows up under "XYZ Grid". No requirements.txt, no model downloads - torch, PIL, and numpy, all already present.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | 10 | String value to convert to number |
| output_type | COMBO | INT | Convert to integer or float |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| int_value | INT | — |
| float_value | FLOAT | — |