Nodes/ComfyUI-ZMongo/09 ZMongo Content Pack Get Int
ComfyUI Node

09 ZMongo Content Pack Get Int

Pull an int out of a content pack for seeds, steps, and sizes

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
09 ZMongo Content Pack Get Int
  • content_pack
  • value
  • field_info_json
  • found
field_alias
strict_typetrue
default_value

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 usually 0-friendly, the default is sensible, but set it deliberately if you want a canary - a missing field silently becoming 0 can hide a real problem.
  • value (INT) - wire this into any int socket: KSampler seed, 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.

CategoryZMongo/09 Content Packs/Get

Inputs (4)

NameTypeDefaultDescription
content_packZMONGO_CONTENT_PACK
field_aliasSTRING
strict_typeBOOLEANtrue
default_valueoptSTRING

Outputs (3)

NameTypeDescription
valueINT
field_info_jsonSTRING
foundBOOLEAN