CDA Int Create
Hand a typed integer to any node in the pack
- INT
CDA Int Create is the integer half of the pack's "typed scalar" pair: you type a whole number into a single-line text field, and out comes a properly typed Python int on an INT socket. It's a one-liner of a node, and its value is the same as its float sibling - giving the graph's integer inputs a clean, reusable, wireable source instead of a buried widget.
Part of the CDA (ComfyUI Data Analysis) family in HowToSD's ComfyUI-Data-Analysis pack, this is the node you reach for when an integer matters enough to be visible - a fill value, a row count, a slice bound - or when a downstream node's INT widget is awkward to use. The pack uses INT inputs everywhere (fill-NA, slice indices, dimension positions), and this node is the intended way to feed them from a dedicated, labeled spot on the canvas.
How it works
The implementation is int(data) - Python's integer conversion, nothing more. "42" becomes 42. "3.7" becomes 3 (Python truncates toward zero), and "abc" raises a ValueError. Worth knowing: there's no validation that what you typed is a clean integer literal, so the text-to-int conversion rules are the ones in charge. If you want a float, use CDA Float Create; this node is strictly whole numbers.
Inputs and outputs
- data (required,
STRING, single-line) - the integer as text. - INT output - the parsed value.
When you'd use it
The realistic pattern: an integer value you'll change while experimenting, wired into several places. Say you're slicing a DataFrame with a row position - build the index with CDA Int Create, wire it into the slice node, and tweak one node instead of hunting widgets. It also plays the verification game: run the output into CDA Show Int and you can see the value on screen as part of debugging a chain.
Installing it
Standard pack install. ComfyUI Manager: search "Data analysis", install ComfyUI-Data-Analysis, restart, reload the browser tab. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis
mv ComfyUI-Data-Analysis data-analysis # README: examples depend on this folder name
pip install -r data-analysis/requirements.txt
That requirements file is the real install surface: pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, lxml - none shipped with ComfyUI. No GPU, no model downloads. The PyTorch-tensor nodes moved out to ComfyUI-Pt-Wrapper in the March 2025 update.
Gotchas
- Truncation, not rounding.
int("3.9")gives3. If you need rounding, do it elsewhere. abccrashes. Python'sint()throws on anything non-numeric; the error surfaces in ComfyUI's console log.- It's just an int. No unit, no range checking - garbage in, integer garbage out. Pair with CDA Show Int if you want to eyeball the result.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| data | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |