Save Workflow in ComfyUI: JSON, PNG Metadata, and Backup Location
Learn how to save a ComfyUI workflow, where workflow files and output images are stored, and how to back up workflows before changing custom nodes.
Saving a ComfyUI workflow is not the same as saving an image.
The image is your output. The workflow is the node graph that made it: nodes, links, prompts, model choices, and UI state. If you want to reuse, share, debug, or protect a ComfyUI setup, save the workflow separately.
Quick Answer
| Goal | Best Save Method | Where It Goes |
|---|---|---|
| Reopen the same graph later | Save workflow as JSON | The file location you choose or your browser downloads folder |
| Share a generated image with its workflow | Save image with metadata | ComfyUI/output/ |
| Use the workflow with API/cloud tools | Save API format | A JSON file in API prompt format |
| Avoid losing a draft after refresh | Enable workflow auto save | ComfyUI user directory/state |
| Back up important work | Export JSON and copy output PNGs | Your own backup folder or version control |
The Three Workflow Formats Users Confuse
1. Normal workflow JSON
This is the main format for reopening a workflow in the ComfyUI interface. It stores the graph layout, nodes, links, widgets, groups, and related UI information.
Use this when you want to:
- reopen the workflow later
- send the graph to another user
- keep a versioned backup
- debug missing custom nodes
- preserve a working state before changing plugins
Official ComfyUI documentation defines workflow JSON as the schema for a ComfyUI workflow.
2. API format JSON
API format is different. It is designed for programmatic execution through APIs and cloud systems.
Use API format when you want to:
- submit workflows through an API
- automate generation
- use ComfyUI Cloud API style endpoints
- build a tool around ComfyUI
Do not use API format as your only human-editable backup unless you know you need it.
3. PNG metadata
The SaveImage node saves images to ComfyUI/output/. It can embed prompt and workflow metadata inside PNG files.
This is convenient because you can often drag a generated PNG back into ComfyUI to recover the workflow that created it.
But PNG metadata is not a complete backup strategy:
- metadata can be stripped by image optimizers
- screenshots usually do not preserve workflow metadata
- some sharing platforms remove metadata
- video workflows and non-PNG outputs may behave differently
For important work, keep the JSON too.
How to Save a Workflow
Use one of these methods:
| Method | When to Use |
|---|---|
Ctrl+S | Quick save from the interface |
Workflows panel | Manage saved workflows in the sidebar |
Menu Workflows -> Save or Save As | Save a reusable JSON workflow |
Menu Workflows -> Open or Ctrl+O | Load a saved workflow JSON or metadata image |
| Drag a workflow JSON/PNG into the canvas | Fast load from file |
If a browser download dialog appears, choose a clear folder and name the file based on the workflow purpose.
Example:
workflows/
flux-kontext-product-photo-v1.json
flux-kontext-product-photo-v2.json
wan-video-test-lowvram.jsonWhere ComfyUI Saves Workflows
There is no single universal answer because ComfyUI has multiple save paths.
Manual JSON export
If you explicitly save or export a workflow JSON, it goes wherever your browser or file dialog saves it. Many users accidentally leave these in Downloads.
Check:
C:\Users\<you>\Downloadsor the folder you selected in the save dialog.
ComfyUI user directory
ComfyUI also has a user directory for settings, workflow state, and user-specific data.
For portable installs, the default user directory is usually:
ComfyUI_windows_portable/ComfyUI/user/defaultIn our clean SEO Lab portable environment, the user directory is:
E:\ComfyUI_portable\ComfyUI_SEO_Lab\ComfyUI\user\defaultThat folder currently contains settings such as:
comfy.settings.jsonDepending on your ComfyUI version and how you save from the Workflows sidebar, workflow state and saved workflow files may also appear under the user directory. Treat this directory as useful state, but do not rely on it as your only backup.
Generated images
Output images are normally saved to:
ComfyUI/output/If workflow metadata is embedded, those images may be usable for recovery by dragging them back into ComfyUI.
How to Recover a Workflow from an Image
If you still have the generated PNG:
- Open ComfyUI.
- Drag the PNG onto the canvas.
- If metadata is present, ComfyUI should load the workflow.
- Immediately save the workflow as JSON.
- Rename the JSON clearly and keep it with the project.
If dragging the image does nothing, the metadata may have been removed. Try the original file from ComfyUI/output/, not a compressed copy from chat, social media, or a website.
Best Backup Habit
Before installing custom nodes, updating ComfyUI, or changing Python packages:
- Save your current workflow as JSON.
- Copy important JSON files to a backup folder.
- Copy the matching output images if they contain useful metadata.
- Keep a note of required custom nodes and models.
- Test that the JSON opens in a clean ComfyUI environment.
A simple project folder can look like this:
project-name/
workflows/
workflow-v1.json
workflow-v2-before-plugin-update.json
outputs/
ComfyUI_00001_.png
notes/
required-models.txt
required-custom-nodes.txtWhy Workflows Fail After You Save Them
A workflow JSON stores the graph. It does not include every model file, custom node repository, or Python dependency.
Common reasons a saved workflow fails later:
- model files are missing
- checkpoint names changed
- LoRA files moved
- custom nodes are not installed
- a custom node renamed a class
- Python dependencies changed
- the workflow was saved in API format but reopened as a UI workflow
If a saved workflow opens with red or unknown nodes, use How to Fix ComfyUI Plugin Import Failed Errors.
For larger workflow setup, use Workflow Environment Setup.
Save Workflow vs Save Image
| Question | Save Workflow JSON | Save Image |
|---|---|---|
| Can I reopen the node graph? | Yes | Sometimes, if metadata is present |
| Does it preserve the final image? | No | Yes |
| Good for version control? | Yes | Not ideal |
| Good for sharing a preview? | No | Yes |
| Safe against metadata stripping? | Yes | No |
| Best for debugging missing nodes? | Yes | Sometimes |
For serious projects, save both.
How Wonderful Launcher Fits
Saved workflows are only useful if the environment can still run them.
Wonderful Launcher is useful when you need to protect or recover:
- workflow JSON files
- model folders
- custom node setup
- Python dependencies
- a ComfyUI environment that broke after updates
If you have important workflows and your environment keeps breaking after custom node work, download Wonderful Launcher before rebuilding everything from scratch.
FAQ
Where is my ComfyUI workflow saved?
If you exported a JSON file, check the folder you selected or your browser Downloads folder. If you used the Workflows sidebar or auto-save behavior, check the ComfyUI user directory, commonly ComfyUI/user/default in portable installs.
Are ComfyUI workflows saved inside PNG images?
Sometimes. The SaveImage node can embed workflow/prompt metadata into PNG files. If the metadata is still present, dragging the PNG into ComfyUI can reload the workflow.
Why did my PNG stop loading the workflow?
The metadata may have been removed by a website, chat app, image optimizer, or screenshot tool. Use the original file from ComfyUI/output/ when possible.
Should I save workflow JSON or API format?
Save normal workflow JSON for reopening and editing in the UI. Save API format only when you need automation or API execution.
Does a workflow JSON include models?
No. It can reference model names and node settings, but it does not package checkpoint, LoRA, VAE, or custom node files.
Related Guides
- How to Group in ComfyUI
- ComfyUI Interface Guide
- Workflow Environment Setup
- Install Custom Nodes
- ComfyUI Plugin Import Failed
Source References
How to Install ComfyUI Custom Nodes Without Breaking Your Environment
Install ComfyUI custom nodes safely and avoid the plugin import failures and dependency drift that often break environments.
ComfyUI Text to Image: Complete Guide & Troubleshooting
Step-by-step guide to generating AI images from text prompts in ComfyUI — with prompt tips, parameter tuning, and fixes for common issues.
Wonderful Launcher Docs