input int 输入整数
One integer in, three types out — and an export flag for API workflows
- int
- float
- text
InputInt (2lab) is the integer sibling of the pack's InputFloat node, and it does the same double duty: a straightforward integer input on your local graph, plus a marked parameter if you ever ship the workflow as an API. Same workflow2Api category, same desc/export fields, same triple-output trick.
Why would you use it over core ComfyUI's own input nodes or a plain INT widget? Because it bundles two things that usually cost you extra nodes: it exposes the value as FLOAT and STRING outputs alongside the INT, and it carries the API-export metadata the pack's hosted flow reads. If you're building a workflow that other people are supposed to run - even locally - having one clearly-labeled input node per tunable value makes the graph readable in a way that scattered widgets don't.
How it works
Required inputs:
- int - the value, an
INTdefaulting to0. - desc - a label/description, the author's nod to whoever will touch this parameter later ("batch size", "steps"...). No functional effect locally.
- export - boolean, default
true. The API-surface switch:trueexposes the parameter,falsekeeps it internal.
Outputs:
- int - the value as an integer, for resolution, batch counts, seeds and friends.
- float - the same value as a float, for anything picky about receiving a
FLOAT. - text - the value as a string, when you need the number inside a text node or prompt.
The usual move is to type the number once and fan it out to every node that needs it. Change it in one place, and the seed, the steps, the batch size, the width - whatever you wired it to - all follow. That's the actual point of an input hub node: fewer places to edit, fewer ways to forget one.
Installing it
It's in the AI2lab/comfyUI-tool-2lab pack. ComfyUI Manager → Custom Nodes Manager → search comfyUI-tool-2lab → Install → restart. The manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/AI2lab/comfyUI-tool-2lab
Restart ComfyUI afterwards. Nothing to download, no Python dependency roulette - the whole pack is lightweight utilities from a Chinese dev whose README is one word long. If you've got a workflow where the same number has to reach four different nodes, this node (and its float cousin) is the tidiest way to do it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| int | INT | 00–18446744073709550000 | — |
| desc | STRING | — | |
| export | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| int | INT | — |
| float | FLOAT | — |
| text | STRING | — |