The “Workflow-in-a-PNG” Trick in ComfyUI 🧾✨
How to steal (and share) recipes the good way, via drag-and-drop
ComfyUI has a feature that feels like a trapdoor to a secret kitchen: it can embed the entire workflow inside the image you generated. Then later, you (or anyone else) can drag that image back into ComfyUI and the whole node graph pops back into existence.
This is one of the most useful “how did I ever live without this?” mechanics in the ComfyUI ecosystem, and it’s perfect for Civitai sharing… if you understand what gets saved, what gets stripped, and why sometimes it mysteriously doesn’t work.
What’s actually happening?
When ComfyUI saves a PNG (and sometimes other formats depending on saver nodes/extensions), it can store workflow JSON in the file’s metadata. ComfyUI officially supports loading those images by dragging them into the canvas or using Workflows → Open (Ctrl+O).
So the image becomes both:
Art (the pixels you see), and
A blueprint (the nodes + connections + settings that made it)
Think of it like a spell scroll: the picture is the illustration, and the metadata is the incantation.
Why this is huge.
On Civitai, people constantly ask:
“What workflow did you use?”
“What sampler/settings/CFG/steps?”
“How did you wire that ControlNet / IPAdapter / upscaler chain?”
If you can provide an image that still contains the workflow metadata, anyone can “rehydrate” the full pipeline in seconds.
But the catch is simple and cruel:
If the site/app re-encodes the image (WebP/JPG conversion, compression, resizing), it often strips metadata.
Even the ComfyUI wiki warns that when you send images through compression or over the network, metadata can be lost.
The core how-to.
✅ Loading a workflow from an image (the magic move)
Get the original file (ideally PNG).
Open ComfyUI in your browser.
Drag the image file onto the ComfyUI canvas.
ComfyUI reconstructs the workflow automatically (if metadata exists).
Alternate method
In ComfyUI: Workflows → Open (Ctrl+O) and select the image file.
Step-by-step
1) Download the image.
Browsers and platforms often serve WebP previews or recompressed downloads. Those often do not preserve the workflow metadata people expect. Community discussions specifically mention Civitai downloads sometimes being WebP and missing the embedded workflow.
Best practice:
Look for a download option that gives you the original file (preferably PNG).
If you only get WebP/JPG, assume workflow metadata is gone unless the uploader used a special saver method.
2) Drag the downloaded file into ComfyUI
If it works, you’ll see the whole node graph appear.
3) If nothing loads: it’s almost always one of these
The file is JPG/WebP without workflow metadata (common)
The file was re-encoded by a platform/app (metadata stripped)
The image was not generated/saved with workflow metadata to begin with
ComfyUI dev discussions/issue threads are blunt about it: workflows load only from images that actually contain the embedded workflow metadata created by ComfyUI.
The “Plan B” that works even when metadata is stripped (Civitai → clipboard)
Sometimes Civitai provides a nodes/workflow copy button that puts the workflow data onto your clipboard.
The basic flow described by users (and echoed in ComfyUI issue discussion) is:
On Civitai, click the node/workflow copy control (copies workflow to clipboard)
In ComfyUI, Clear your canvas
Press Ctrl+V to paste the workflow into ComfyUI
This is incredibly handy when:
the downloaded image is WebP/JPG,
metadata was stripped,
or you’re working from a post where the “download original” isn’t available.
“It loaded, but it’s yelling at me” (missing nodes and missing models)
Even when the workflow imports perfectly, two things commonly happen:
A) Missing custom nodes
If the workflow uses third-party nodes you don’t have installed, ComfyUI can warn you. Some ComfyUI UI settings even include options like Show Missing Nodes Warning and can offer to install missing plugins.
Fix: install ComfyUI-Manager (recommended)
Official docs cover installing custom nodes using the Manager button and warn to be cautious about what you install.
Typical recovery steps:
Click Manager
Use features like “install missing custom nodes” (wording varies by version/UI)
Restart ComfyUI
B) Missing checkpoints / LoRAs / VAEs
The workflow usually contains references to model filenames, but it cannot conjure models you don’t have.
So you’ll need to:
download the missing checkpoint/LoRA/VAE,
place it in the right ComfyUI folder,
then reselect it in the relevant nodes.
Some UIs/settings mention warnings for missing models and may offer download attempts, depending on your setup.
How to share your own images so others can drag-and-load the workflow
Option 1: The simplest, most “native” method
Generate your image normally.
Save the output PNG from ComfyUI.
Upload that PNG (without running it through resizers/compressors).
The ComfyUI wiki explicitly describes saving the workflow’s image output as an export path and warns metadata can be lost if the image is processed.
The Civitai-specific gotcha: “My image loads in ComfyUI, but Civitai shows no gen info”
This is a common confusion:
Workflow metadata (ComfyUI’s internal JSON) is great for reconstructing nodes.
Civitai “Generation Data” often expects A1111-style parameter strings (and sometimes hashes/resource references).
So you can have a PNG that loads perfectly in ComfyUI but still doesn’t populate Civitai’s generation info the way you want.
Solution: use a “Civitai-compatible metadata saver” node
Popular saver extensions/nodes exist that embed:
ComfyUI workflow (for PNG), plus
A1111-style “parameters” metadata (for Civitai auto-detection),
model/LoRA hashes for proper resource linking
For example, ComfyUI-Image-Saver explicitly states it saves metadata compatible with Civitai detection and that PNG can store both full Comfy workflow plus A1111-style parameters.
Similar projects like comfy-image-saver describe the same goal: Civitai and geninfo auto-detection across PNG/JPEG/WebP.
If your goal is “I want people to drag this into ComfyUI” then native PNG workflow metadata is enough.
If your goal is also “I want Civitai to display prompts/resources cleanly” then use one of these saver nodes.
References
ComfyUI docs: drag PNG to load workflow (Image-to-Image tutorial)
https://docs.comfy.org/tutorials/basic/image-to-image
ComfyUI docs: exporting workflows (First generation / getting started)
https://docs.comfy.org/get_started/first_generation
ComfyUI docs: install custom nodes via Manager
https://docs.comfy.org/installation/install_custom_node
ComfyUI Wiki: importing/exporting workflows + metadata can be lost
https://comfyui-wiki.com/en/interface/workflow
Civitai → ComfyUI clipboard workflow paste discussion
https://github.com/comfyanonymous/ComfyUI/issues/1069
ComfyUI-Image-Saver (Civitai-compatible metadata)
https://github.com/alexopus/ComfyUI-Image-Saver
comfy-image-saver (Civitai & geninfo auto-detection)


