Set Float Extra
Stash a number in your image metadata, and get it back later
- extras
- extras
Set Float Extra is one of a family of tiny nodes in this pack that all do the same useful job: write a key → value pair into the image's metadata "extras" - the extra parameter lines that ride along inside the A1111 infotext when you save with the pack's Image Saver. This one stores a float.
Why would you want that? Because the pack's whole design philosophy is that your generation settings should survive saving and loading. Prompt, model, LoRAs, sampler - those get stored natively. But the arbitrary numbers you care about - a custom strength, a crop offset, a blend factor, any "I'll remember what this was" value - have no natural home in infotext. Extras are that home. Save an image with cfg written as an extra, load it back with Image Reader, and the number comes back intact, ready to drive your workflow again.
Inputs and outputs
- key - the parameter line key (the label stored in metadata). Make it memorable and consistent; you'll retrieve by this name.
- value - the float itself.
- decimals (default 2, 0–10) - how many digits after the decimal point get written. This is the subtle one: the value is rendered as text for the metadata, and
decimalscontrols the precision you store, not the precision of the value itself. Store 1.0 withdecimals: 0and it comes back as1; keep the default and it's1.00. - extras (optional) - an existing extras bundle to build on. This is what lets you chain nodes:
Set Float Extra→Set Int Extra→Set String Extra, each one merging into the accumulated set.
The single output, extras, is the merged bundle - pass it on to the next Set node or into Image Info Context so it lands in the image_info that gets saved.
The mechanics worth knowing
Every Set node in this family behaves identically: if you give it an existing extras bundle it copies it and adds your pair; if you don't, it starts fresh. Duplicate keys overwrite - later values win, no merge of sub-keys. So if you set my_strength twice in a chain, the second one silently replaces the first. Keep keys unique per chain, or you'll debug a "why is my metadata wrong" hunt later.
The extras dict is also a real, living part of image_info, not a dead string. The pack merges it into image_info.extras and it flows through the same context/fallback machinery as the "official" fields - which is why you can use extras for settings that drive behavior, not just documentation. Store a denoise value as an extra, and nothing stops a later workflow from reading it back and using it.
Install
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/kinorax/comfyui-info-prompt-toolkit.git
cd comfyui-info-prompt-toolkit
pip install -r requirements.txt
Or ComfyUI Manager → search "ComfyUI-Info-Prompt-Toolkit" → install → restart. No models or extra dependencies.
Where people get burned
Two things. First, an extra only matters if something saves it - if your workflow ends at a plain Save Image, your extras evaporate with the queue. The pack's Image Saver (or Referenced Image Saver) is what embeds them into the file. Second, extras are stored as text, and floats come back as text too - the pack's matching Get Float Extra node parses them back to numbers, so pair the Set with the Get when you plan to reload and use the value.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| key | STRING | Parameter line key | |
| value | FLOAT | 0.00 | Parameter line value |
| decimals | INT | 20–10 | Number of digits after decimal point |
| extrasopt | IPT-ImageInfoExtras | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| extras | IPT-ImageInfoExtras | — |