Int Literal
A plain integer source for steps, seeds and counts
- INT
Int Literal is the most no-frills node in the pack: a box you type a whole number into, and it outputs that number as an INT. No math, no logic. Its reason to exist is the same as the rest of these little "literal" nodes - it lets one integer be a single source of truth that you wire into more than one place. The obvious use inside this pack is steps: feed the same Int Literal into your KSampler's step count and into the Save Image w/Metadata node's steps, and the number that ran is the number that gets recorded. It also works fine for any other integer field a workflow exposes.
How it works
Type an integer, the node hands it out, you connect it wherever an INT is wanted. To plug it into a KSampler's steps (or any other value that shows up as a widget), convert that widget to an input first - right-click, "Convert steps to input", or drag the wire straight onto the field on newer ComfyUI frontends. Split the wire to send the same value to the metadata node too. Inside this pack it's not only steps - the Save Image w/Metadata node also has a counter field for numbering a batch, and an Int Literal is a clean way to drive that from one place.
The input and output
- int (
INT, default0, range0-1000000) - the number. Note the ceiling is one million, which is generous for step counts (you'll never want more than ~50) but means this isn't the node for a full-range random seed - a uint64 seed goes well past a million. Use Seed Generator for seeds; use this for steps, counts and other modest integers.
The single output is INT - the value.
Installing it
It's part of the pack, so one install covers it. ComfyUI Manager: search Save Image with Generation Metadata, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/giriss/comfy-image-saver
cd comfy-image-saver
pip install -r requirements.txt
Restart ComfyUI. No models, no heavy dependencies.
Where people get tripped up
First, the wiring - if there's no port to connect to on your target node, its integer is still a widget; convert it to an input. This trips up every literal node in the pack the same way.
Second, don't over-reach with it. Because its range stops at a million, it's the wrong tool for seeds, and it holds a single value, so it won't do arithmetic or increment on its own. If you find yourself wanting to add two numbers or generate a sequence, that's a job for a math or logic node from a utility pack, not this. Int Literal has exactly one talent: being one integer, in one place, that feeds several. For steps and other small counts inside a metadata-saving workflow, that's precisely enough.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| int | INT | 00–1000000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |