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

09 ZMongo Content Pack Get Float

Pull a float out of a content pack for CFG and denoise values

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

CFG scale, denoise strength, strength of models - the knobs that make or break a render are floats, and this node pulls them out of a content pack by alias. It's the sibling of Get Int with one meaningful difference in behavior: it accepts a stored INT as a float-compatible value, which makes it the more forgiving of the two numeric getters.

The lookup works like the rest of the family. content_pack holds the pack, field_alias names the field (alias first, then source path, label, or numeric index), and strict_type (default true) gates the type check. default_value is a string, default "0.0", used whenever the lookup comes up empty or the type mismatches.

The inputs that matter

  • field_alias - the float field you want.
  • default_value - the fallback. Worth setting intentionally: if a pack stores denoise and you default it to 0.0, a missing field means "no denoise at all" rather than a crash, which is probably the safe direction.
  • strict_type - on by default. Note the asymmetry: this node treats a stored FLOAT or INT as compatible (since an int is trivially a float), so strict_type: true won't reject integer fields. The reverse isn't true - Get Int rejects floats.

Outputs

value (FLOAT) is what you wire into CFG/denoise/strength sockets. field_info_json is the field's metadata record - useful when a lookup returns found: false and you want to see what the pack actually stored for that alias. found (BOOLEAN) tells you whether the field existed and matched; treat it as your "am I on the fallback path?" signal.

Practical notes

No session, no credentials, fully offline - like every inline Get node, it just reads the pack object in memory. The one thing that trips people up: floats and ints look identical in JSON, so whether a Build classifies a value as FLOAT or INT comes down to that trailing .0. If you stored 3 and this node refuses it with a type mismatch under strict mode, it's because the classifier saw an int - the fix is either 3.0 in the source JSON or flipping strict_type off. For the grab-bag case where you're not sure what type a field is, Get Selected with data_type: FLOAT gives you the same lenient behavior in one node.

CategoryZMongo/09 Content Packs/Get

Inputs (4)

NameTypeDefaultDescription
content_packZMONGO_CONTENT_PACK
field_aliasSTRING
strict_typeBOOLEANtrue
default_valueoptSTRING

Outputs (3)

NameTypeDescription
valueFLOAT
field_info_jsonSTRING
foundBOOLEAN