String to Integers
Turn '10, 20, 30' into a number list the graph can actually use
- INTS
String to Integers (class StringToIntegers) is the smallest node in this pack and it does exactly what the name says: take a text box containing 10, 20, 30 and hand you a proper list of integers on the INTS wire. No more. It exists because ComfyUI's built-in STRING widgets hold text, but the nodes that want coordinates (CropByCoords, PasteByCoords, CombineCoords) want numbers - and someone has to do the conversion in between.
When would you use it? Almost always as plumbing. Type a list of x positions into a text field, run it through this node, and feed the result into CombineCoords to build the COORDS type those crop/paste nodes accept. It's also handy if you want a human-editable list of values in your workflow instead of fighting with a bunch of separate integer widgets - one text string, a comma-separated list, done.
How it works. Nothing clever: it splits the string on commas, strips whitespace around each value, and converts each piece to an int. Two defensive touches in the source are worth knowing. If the string is empty or unparseable (say you typed a, b), it prints a small error to the console and returns [0] rather than crashing your whole graph - a safe default so a half-filled text box doesn't take the workflow down. That's the kind of quiet robustness that makes a utility node pleasant.
The inputs and outputs that matter. One input: text (a STRING, default empty). One output: INTS. That's the entire interface.
Install. Zero dependencies, zero models - it's a few lines of Python:
cd ComfyUI/custom_nodes
git clone https://github.com/einhorn13/ComfyUI-ImageProcessUtilities
Restart ComfyUI. Manager may not find it in search (the pack isn't on the official Comfy Registry as of writing), so the clone is the reliable route.
Common issues. The main gotcha is format: it only accepts comma-separated integers. 10 20 30 (spaces only, no commas) will fail and quietly return [0]. If your list seems to turn into a single zero, check for missing commas. Also note there's no validation warning in the UI - the failure is silent unless you're watching the console, which is a classic "why did my crop land at 0,0" moment.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INTS | INTS | — |