Nodes/comfyui-job-iterator/GetAttributeFloat
ComfyUI Node Runs on cloud

GetAttributeFloat

GetAttribute with a FLOAT-typed socket — not a cast

By ali1234·Created 3 years ago·Updated 3 months ago· 130
GetAttributeFloat
  • attributes
  • value
name

This node does exactly what GetAttribute does - pull a named value out of a job step's attributes - with one difference: its output socket is declared FLOAT instead of wildcard. That matters because some ComfyUI inputs, CFG scale sliders and the like, refuse to accept a wildcard * connection cleanly, and this is the node that sidesteps that.

How it works, and the one thing worth being precise about

Reading the pack's own source, GetAttributeFloat is a subclass of GetAttribute that changes nothing about the lookup logic - it's the exact same attributes[name] dictionary access, returning the exact same value, untouched. The only thing that differs is the declared output type on the node's socket. It does not call float() on your value. If what's actually stored under that name is a string or an int, you get that string or int back, wearing a FLOAT label on the wire - not a converted float.

These typed getters exist specifically to work around a documented ComfyUI bug (linked directly in the pack's source, comfyanonymous/ComfyUI#770) where a wildcard output socket doesn't always connect properly to a strictly-typed input. They're a connectivity fix, not a formatting convenience.

The inputs and outputs that matter

  • attributes (ATTRIBUTES) - one step's values.
  • name (STRING) - the attribute to pull, matching exactly what you named it upstream.

Output is a single value, typed FLOAT.

This is the one you reach for when sweeping CFG scale, denoise strength, or any LoRA weight - none of those come out of Range, since Range only produces ints, so they'll always trace back to a Literal box typed with explicit decimals. Feed it into ProgressBar's progress input too, if you're computing a fraction rather than pulling a raw attribute straight through.

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

Downstream errors about the value not actually being a float. Since this node hands back the raw stored value with no conversion, make sure whatever produced the sequence in the first place - usually a Literal box - actually contains real Python floats: [4.5, 5.0, 5.5], not ["4.5", "5.0", "5.5"]. A string that merely looks like a number won't get magically fixed by this node's type label.

KeyError at queue time. Same cause as GetAttribute: the name you typed doesn't match an attribute that exists on that step. Check it against whatever MakeJob or EnumerateJob node created it.

Which typed getter to reach for. If your sequence source naturally produces floats (Literal with decimal numbers), use this one. Range always produces ints - use GetAttributeInt for that. If you're not sure what type came out, GetAttribute (wildcard) followed by a print/debug step, or Interact, will tell you exactly what Python object you're actually holding.

Categoryali1234/job

Inputs (2)

NameTypeDefaultDescription
attributesATTRIBUTES
nameSTRING

Outputs (1)

NameTypeDescription
valueFLOAT