create INT
Create INT parses number strings
- value
- INT
ComfyUI will hand you numbers as text all the time - a filename with a frame number in it, a wildcard, a JSON value - and most math nodes will look at the string "42" and shrug. create INT is the pack's answer: a box where you type a number and get a real integer out, with a genuinely clever bonus nobody expects.
What it does
You type a string into the value field, and the node runs Python's int(value, 0) on it. The 0 there is the interesting part - it tells Python to auto-detect the base from the prefix. So:
"42"→ 42"0b1010"→ 10 (binary)"0o17"→ 15 (octal)"0x1F"→ 31 (hex)
Type 0x1F into a box, get 31 out the other side. That's the whole reason this node exists separately from a plain cast: it's the only INT node in the pack that parses prefixed number strings for you, which is invaluable if you're dealing with hex-encoded values from files, configs, or APIs.
The one thing it won't do is decode ones' complement notation - the README and the source are explicit that it doesn't handle it, because the data size is unknown. Don't expect ~5 style input to work.
Inputs and outputs
value- a string widget (technically the wildcard*type, default"0"). Type your number, prefix and all.- Output
INT- the parsed integer.
If the string isn't a valid integer in the detected base, the node raises an error. "hello" or "12.5" will fail loudly rather than guess.
Install
From the Basic data handling pack. ComfyUI Manager → search "Basic data handling" → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
then restart ComfyUI. No dependencies, no models.
Where you'll actually use it
Two spots. First, converting text fields to math-able integers - create INT feeding an IntAdd or a comparison node. Second, the hex path: parse 0x-prefixed values from a config or a file, and pair it with to bytes / from bytes when you're shuffling binary data around. If you only ever need base-10 parsing, the plain cast to INT is enough; reach for this one the moment prefixes enter the picture.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | * | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |