Set Size Extra
Save the canvas size into image metadata so reloads get the dimensions right
- size
- extras
- extras
Set Size Extra stores a width-and-height size into the pack's metadata extras. Where the float/int/string versions stash a single value, this one stores a complete IPT-Size - the same "width x height" bundle the pack's size nodes produce and consume - under a key.
Why would the canvas size need to ride in metadata? Because in the pack's philosophy, an image is a reusable spec. When you load an image back with Image Reader, you get the prompt, the model, the LoRAs, the sampler settings - and if the workflow was built to save it, the size too. That matters more than it sounds once you're doing anything iterative: you generate at one resolution, tune a detailer, upscale, and if the size isn't persisted you're re-entering dimensions from memory on every reload. A saved size means "reload this image and get exactly the canvas it was made with."
Inputs and outputs
- key - the parameter line key.
- size (default 512×512, 16–16384 per side) - the
IPT-Sizeto store. You can type it, but the interesting path is wiring it from a size-computing node -Aspect Ratio to Size,Scale (width x height), or another size-producing source - so the stored dimensions always match what the graph actually used. - extras (optional) - the incoming extras bundle to merge into.
Output is the merged extras bundle, chaining into the other Set nodes or into Image Info Context.
The value is serialized for the metadata as a compact width×height representation, and the pack's Get Size Extra node parses it back into a real IPT-Size on the other side - so the round-trip preserves the typed value rather than leaving you to split a string.
The one thing that makes this node pay off
Set it from a computed size, not a typed one. The whole reason size travels as an IPT-Size bundle is that it can be produced, transformed, and consumed programmatically - Aspect Ratio to Size derives it from a ratio, Scale (width x height) multiplies it, Split (width x height) unpacks it. Feed the same bundle into both your Empty Latent and this node, and the metadata can never drift from what you actually sampled. Type the size by hand in both places and you've recreated the exact bug this system exists to kill: the workflow remembers 1024×1024, the graph was actually running 896×1152.
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, no extra dependencies.
Where people get burned
Beyond the usual extras rules (a pack saver must write the file; duplicate keys overwrite), the trap here is believing the stored size and trusting it more than the graph. The metadata is a record of intent - if you edit the workflow after saving, the image remembers the old size and there's no automatic reconciliation. That's fine as long as you treat reloaded size as "what this image was made with," not "what the current graph should do."
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| key | STRING | Parameter line key | |
| size | IPT-Size | [object Object]16–16384 | — |
| extrasopt | IPT-ImageInfoExtras | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| extras | IPT-ImageInfoExtras | — |