09 ZMongo Content Pack Get Int
Pull an int out of a content pack for seeds, steps, and sizes
- content_pack
- value
- field_info_json
- found
Seeds, steps, width, height, batch counts - the most commonly stored numbers in a ComfyUI setup are integers, and this is the node that pulls them back out of a content pack by alias. It's the direct counterpart to Get String: same inputs, same behavior, but it returns a typed INT that plugs straight into a KSampler or Empty Latent Image without any string-to-number conversion on your end.
The mechanism is identical to its siblings. It looks up field_alias inside the content_pack (matching alias first, then source path, label, or numeric index), checks the stored comfy_type is INT, and coerces the value. strict_type defaults to true; leave it on and a field that was stored as a string will be rejected with found: false rather than silently parsed. default_value (a string, default "0") supplies the fallback whenever the lookup fails.
Inputs and outputs worth knowing
field_alias- the alias of the int field. This is the one you type.default_value- the fallback. Given that seeds are usually0-friendly, the default is sensible, but set it deliberately if you want a canary - a missing field silently becoming0can hide a real problem.value(INT) - wire this into any int socket: KSamplerseed,steps,width/height, an image batch counter, you name it.field_info_json- the field's metadata record for debugging.found(BOOLEAN) - whether the lookup actually matched a stored INT.
The honest caveats
Unlike Get Float, this node does not accept a stored FLOAT - an int field is required when strict_type is on, because ComfyUI distinguishes the two and a float on an int socket is a type error. So store ints as ints in your packs: when you Build from JSON, make sure the value doesn't have a trailing .0, or the classifier will call it a FLOAT and this node will refuse it. If you're dealing with packs that mix things up, Get Selected with data_type set to INT is the more forgiving path. No session or network needed here - it's a pure in-memory read, which keeps the round trip of build → get → feed-the-sampler fully offline.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| content_pack | ZMONGO_CONTENT_PACK | — | |
| field_alias | STRING | — | |
| strict_type | BOOLEAN | true | — |
| default_valueopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| value | INT | — |
| field_info_json | STRING | — |
| found | BOOLEAN | — |