Nodes/comfyui-parse-image/Load Float From Image
ComfyUI Node

Load Float From Image

Grab the Exact CFG and Denoise a Good Image Was Made With

By shinich39·Created 2 years ago·Updated about a year ago· 2
Load Float From Image
  • image
  • FLOAT
query
float0.00

The image looks exactly like what you want, and you know the magic was in the settings, not the luck. Load Float From Image pulls the decimal values - CFG scale, denoise, that kind of thing - straight out of the image's embedded workflow metadata, so you can reuse the exact numbers instead of guessing at sliders.

It's one of the five nodes in comfyui-parse-image, shinich39's little metadata-reading pack. Its job is narrow: read a FLOAT out of a PNG and hand it to your graph. The README gives the two queries people actually use it for: KSampler.cfg and KSampler.denoise.

The mechanism

Every image ComfyUI saves carries the generating workflow as JSON in its metadata - that's what makes drag-in-reconstruction work, and it's the culture the whole "workflow included" community runs on. This node reads that metadata and extracts one widget's value. It never looks at the pixels; it reads the recipe.

You feed it an image from a supported loader - core LoadImage, LoadImageMask, Inspire's LoadImage //Inspire, Crystools' "Load image with metadata", and a few others - then set the query.

Three inputs, same shape as its siblings:

  • image - from one of those loaders.
  • query - the dotted path to a widget, e.g. KSampler.cfg.
  • float - the fallback value when the query finds nothing. Defaults to 0.

The output is a single FLOAT, and it wires straight into a KSampler's cfg or denoise input. Matching a good image's settings this way is more reliable than eyeballing the values from a screenshot - the number you get back is the number that was actually used.

Installing it

No downloads beyond the pack itself. This thing has no model files and no Python dependencies beyond what ComfyUI already has - it parses what's already on your disk. Install via ComfyUI Manager (search "comfyui-parse-image") or:

cd ComfyUI/custom_nodes
git clone https://github.com/shinich39/comfyui-parse-image

Restart ComfyUI, and it shows up under Add node > loaders > Load Float From Image.

Common issues

The fallback is your only real failure mode. If the node keeps returning 0, the query doesn't match a widget in that image's workflow, or the image has no metadata to read - images stripped of their workflow data have nothing for this node to parse. Queries are exact-match: node type or title, a dot, then the widget name, like KSampler.denoise. One gotcha unique to floats: if the widget stored 0.7 you get 0.7 back, but if the source workflow computed a value rather than storing a widget, there's nothing to find. Keep the fallback sane and this is a tiny, handy node for chasing reproducibility.

Categoryloaders

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
querySTRING
floatFLOAT0.00

Outputs (1)

NameTypeDescription
FLOATFLOAT