GetAttributeInt
GetAttribute with an INT-typed socket — not a cast
- attributes
- value
Same node as GetAttribute underneath - same dictionary lookup by name - with its output socket declared as INT instead of a wildcard *. That's the whole difference, and it's there so this plugs cleanly into seed inputs, step counts, and other strictly-typed INT sockets that a wildcard connection can be finicky about.
How it works
Reading the pack's actual source: GetAttributeInt is a subclass of GetAttribute where only the declared RETURN_TYPES changes, to INT. The lookup itself - attributes[name] - is identical, and the value handed back is exactly whatever object was stored, with no int() conversion applied. If the underlying value genuinely is an int (which is exactly what Range always produces, and what a Literal box like [1, 2, 3] produces too), this works perfectly and you'll never notice the distinction. If it isn't, you'll get that other type back with an INT label on the wire, and it's on you to have matched the source's type to what you need downstream. These typed variants exist to route around a real ComfyUI wildcard-connection bug the pack's source links directly (comfyanonymous/ComfyUI#770) - they're not a validation or casting layer.
The inputs and outputs that matter
attributes(ATTRIBUTES) - one step's values, from GetJobStep or a JobToList item.name(STRING) - must match the attribute name exactly, set upstream in MakeJob or EnumerateJob.
Output is a single value, typed INT.
The seed input on most sampler nodes is the textbook case: it's an INT socket with a widget attached, and those tend to be among the pickiest about accepting a loose wildcard connection. Route a seed sweep through GetAttributeInt rather than plain GetAttribute and you avoid finding out the hard way, mid-sweep, that a particular ComfyUI build didn't like the wildcard wire.
How to install it
Via ComfyUI Manager: search comfyui-job-iterator, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ali1234/comfyui-job-iterator
then restart. No dependencies.
Common issues & troubleshooting
Seed input rejects the value, or accepts it but produces unexpected results. Check that your source sequence is actually producing ints. Range always does. Literal only does if you typed unquoted numbers - [1, 2, 3], not ["1", "2", "3"] (which parses as strings that happen to look like numbers).
KeyError on queue. The name doesn't exist on that step - same fix as everywhere else in this pack: match it exactly to whatever you named the attribute in MakeJob or EnumerateJob.
You're not sure whether to use this or GetAttribute. If the downstream input you're wiring into is already typed INT (most seed and step-count widgets are) and connecting the wildcard version has ever misbehaved for you, use this one. If you're wiring into something generic or you genuinely don't know the value's type yet, start with plain GetAttribute and check what comes out before locking in a typed variant.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| attributes | ATTRIBUTES | — | |
| name | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | INT | — |