Desktop Tools & Mobile Workflows

How to Read and Share a ComfyUI Workflow JSON File

PhoneDiffusion
How to Read and Share a ComfyUI Workflow JSON File

ComfyUI & Tools

To share a ComfyUI workflow, export it as a JSON file (File → Export Workflow) or send an output image that still carries the workflow in its metadata; the other person drags either file onto the canvas. To share it without errors, also list the custom node packs and exact model files it needs, because the JSON holds only the node graph and settings. Saved workflows live in ComfyUI/user/default/workflows on a self-hosted install.

How to share a ComfyUI workflow

Share a ComfyUI workflow by sending its workflow JSON file, or an output image that still carries the workflow in its metadata. Use File → Export Workflow to save a .json copy, or File → Save (Ctrl+S) to keep it in your own workflow library. The recipient loads it with File → Open or by dragging the file onto the canvas.

ComfyUI's documentation describes both routes: a workflow saved as JSON can be shared independently of the generated media, and built-in save nodes can store the workflow inside the output file, so dragging that file back onto the canvas recovers the graph. Comfy Cloud also has a Share button that creates a link; ComfyUI warns that anyone with the link can see the workflow's assets, such as uploaded images and masks.

Where does ComfyUI save workflows?

On a self-hosted or portable install, workflows you save with File → Save go to ComfyUI/user/default/workflows. The ComfyUI server keeps user files in its user directory (ComfyUI/user) under a single user named default unless multi-user mode is on, and the frontend stores saved workflows under a workflows path inside that user's data. ComfyUI Desktop and Comfy Cloud keep the same library in app user data or workspace storage, so the exact path depends on the install type.

To add a workflow to that folder, open the JSON in ComfyUI and save it, or copy the .json file into the workflows folder and press refresh in the Workflows sidebar (shortcut W), which resyncs the saved list from disk. Subfolders appear as folders in the panel's Browse tree. A file you export with Export Workflow is a separate copy outside that library.

How to add or load a workflow from a JSON file

Open ComfyUI and use File → Open, or drag the .json file onto the canvas. The same works for a PNG, animated WebP, MP4, or WebM written by a built-in ComfyUI save node, as long as the file still holds its metadata. When a file contains both the editable workflow and the API prompt, ComfyUI rebuilds the canvas from the workflow.

If a dropped image only loads as an input picture, its workflow metadata is gone: ComfyUI treats files without a workflow as regular media. Image and video editors that re-encode a file can remove the metadata, and outputs saved while ComfyUI ran with --disable-metadata never had it. Send the JSON file when the workflow matters.

How to read a ComfyUI workflow JSON file

A saved workflow JSON is the editable graph. ComfyUI's specification defines a version number, a nodes array, a links array, groups, reroutes, and optional config and extra fields such as the canvas view. Each node records its id, its type, its position and size on the canvas, its inputs and outputs, and widgets_values, which hold the values you set: prompt text, seed, steps, CFG, sampler, and file names such as the checkpoint.

Each link connects an output slot on one node to an input slot on another by node id and slot number. The schema also allows an optional models list giving each file's name, download URL, and target directory, so check for it before hunting for files. Read the graph on the canvas first, then search the raw text for model names, prompts, or paths.

PhoneDiffusion generates on-device on iPhone or iPad, with optional cloud models. Download on the App Store →

Save format vs API format

File → Export Workflow (API) writes a different JSON: nodes keyed by numeric id, each with a class_type and its inputs, without positions, colors, or groups. It is meant for sending to a ComfyUI server's API. It can still be loaded in the interface, but without layout, so share the normal save format with people and the API format with scripts.

ComfyUI's own API-format example is the basic text-to-image graph: Load Checkpoint, two CLIP Text Encode nodes for the positive and negative prompt, Empty Latent Image at 512×512, KSampler, VAE Decode, and Save Image. To convert any saved workflow, open it and choose Export Workflow (API).

What a shared workflow does not include

The JSON does not contain model files, input images, or custom node packages. ComfyUI's documentation notes that a missing, moved, or renamed model, input, or custom node can stop a workflow from running, and a missing node is marked on the canvas. Send a short list with the file: ComfyUI version, custom node packs with repository links, and each model's exact filename and source.

A workflow can also reveal more than you intend. Prompts, seeds, and local file names are stored in the graph, and the same data rides along in every image saved with metadata. Search the JSON before posting it. To stop embedding, start ComfyUI with --disable-metadata, or in ComfyUI Desktop enable Disable saving prompt metadata in files under Settings → Server-Config. Treat workflows from other people as untrusted input and review custom nodes before installing them.

How to share a ComfyUI workflow without errors

Common errors on the other person's machine come from something the JSON points to but does not carry. ComfyUI's support article says missing nodes usually mean the required nodes are not available in that environment. The Manager documentation separates two cases. A missing core node means their ComfyUI is older than the version that made the workflow and needs an update. A missing custom node means a third-party pack is not installed.

On a local install with ComfyUI-Manager, loading a workflow with missing nodes shows a prompt. Install All installs every missing pack at once, and Open Manager lets the recipient review them first. In the legacy Manager, click Open Manager, then Install Missing Custom Nodes to see the list and install each pack. The Manager is built into ComfyUI core but is off until enabled: on portable and manual installs you first install manager_requirements.txt and then start ComfyUI with --enable-manager, and ComfyUI Desktop does both by default. The new Manager installs only from the Comfy registry, so a pack that is not registered needs a manual install from its repository. Comfy Cloud runs a managed set of nodes and models, so a workflow that runs locally can still fail there.

Missing models are the other common error. ComfyUI's template documentation describes a models list under a loader node's properties, with a name, url, and directory for each file. This per-node field is separate from the optional top-level models list in the workflow schema. When such a file is missing, ComfyUI marks the loader node in red and lists the file under Missing Models in the Errors tab. ComfyUI Desktop downloads it into the matching models folder; on other installs, check where the download landed and move it there. The url must be a direct download link from Hugging Face or Civitai, and the file must be a safe format such as .safetensors or .sft. The docs describe this for templates, so still name each model file and its source in your note.

PhoneDiffusion availability and article scope

PhoneDiffusion does not run ComfyUI or import its workflow JSON files, custom nodes, desktop checkpoints, or arbitrary LoRAs. It offers curated local Core ML packs that run privately on the iPhone or iPad and work offline once downloaded, plus optional cloud models from an in-app list that can change. Cloud models send the text prompt online, are text-to-image only, and come with paid monthly or yearly plans.

A manual hybrid workflow is still possible: copy the prompt and negative prompt from the workflow, then rebuild the stage in PhoneDiffusion with its own packs and presets. The app has no seed field or sampler picker, so expect a different image, not the same pixels.

Field notes

  • Share a ComfyUI workflow as an exported JSON file or as an output image that still carries its metadata; the recipient drags it onto the canvas or uses File → Open.
  • Saved workflows live in ComfyUI/user/default/workflows on a self-hosted or portable install; Desktop and Cloud keep them in app or workspace storage.
  • The save format keeps the layout for editing; the API format keeps only nodes and inputs for scripts.
  • Neither format includes models, input images, or custom nodes, so send a dependency list and remove private prompts and paths.
  • To share a workflow without errors, cover the three usual failures: missing custom node packs (ComfyUI-Manager can install them), missing model files, and an older ComfyUI.

Try it on your phone

  1. Finish the graph and save it with File → Save (Ctrl+S) so it appears in the Workflows sidebar.
  2. Export a shareable copy with File → Export Workflow, or Export Workflow (API) if a script will run it.
  3. Search the JSON for private prompts, local paths, and names you do not want to publish.
  4. List the ComfyUI version, custom node packs, and exact model filenames with their sources.
  5. Load the exported file in a clean ComfyUI with File → Open, check that no node or model is flagged as missing, and confirm it runs before you share it.

Sources and verification

Primary and maintainer documentation checked for this guide. Product-specific details were reviewed against the current PhoneDiffusion scope.

  • ComfyUI: what a workflow is, and saving it as JSONOfficial explanation of workflows as node graphs, saving a workflow as a JSON file to share it independently of the media, and recovering a workflow by dragging an output file onto the canvas.
  • ComfyUI: Workflows sidebarOfficial guide to the Workflows panel: saved workflows shown as a folder tree, a refresh button that resyncs the list from disk, and storage paths that differ by install type.
  • ComfyUI: Workflow metadata in output filesOfficial reference for the workflow and prompt fields ComfyUI embeds in PNG, WebP, MP4, and WebM outputs, loading them by drag and drop or File → Open, --disable-metadata, and what a workflow does not include.
  • ComfyUI: Workflow API formatOfficial comparison of the save format (File → Save, Ctrl+S) and the API format (File → Export Workflow (API)), with a full text-to-image example in API format.
  • ComfyUI: Workflow JSON specificationOfficial schema for the saved workflow file: version, nodes (id, type, pos, size, inputs, outputs, widgets_values), links, groups, reroutes, extra, and an optional models list with name, url, and directory.
  • ComfyUI: Share workflows (Comfy Cloud)Official Comfy Cloud guide to creating a share link, including the warning that the link exposes the workflow's uploaded images, masks, and other assets.
  • ComfyUI repository: user data storage (app/user_manager.py)Server code that stores user files inside the ComfyUI user directory (ComfyUI/user, set in folder_paths.py) under the single user 'default' unless multi-user mode is enabled.
  • ComfyUI frontend: saved workflow path (comfyWorkflow.ts)Frontend code that stores saved workflows under the 'workflows/' path of the user's data.
  • ComfyUI frontend: File menu commands (coreMenuCommands.ts)Frontend menu definition listing Open, Save, Save As, Export Workflow, and Export Workflow (API) under File.
  • ComfyUI frontend: file drop handler (app.ts)Frontend code that loads a workflow when a JSON file or a PNG with workflow metadata is dropped onto the window.
  • ComfyUI: Manager pack managementOfficial guide to the new ComfyUI-Manager: the prompt shown when a workflow with missing nodes loads, Install All and Open Manager, and installs from the registry only.
  • ComfyUI: Manager legacy UIOfficial guide to the legacy Manager menu: core node missing means ComfyUI needs an update, custom node missing means a third-party pack is absent, and Install Missing Custom Nodes.
  • ComfyUI: Install ComfyUI-ManagerOfficial install steps: the new ComfyUI-Manager is built into ComfyUI core; portable and manual installs install manager_requirements.txt and start with --enable-manager, which ComfyUI Desktop sets by default.
  • ComfyUI: Templates and missing modelsOfficial guide to the models list (name, url, directory) under a loader node's properties, the Missing Models group in the Errors tab, and the Hugging Face or Civitai and .safetensors or .sft rules for download links.
  • Comfy support: Missing nodes, workflow won't loadOfficial support article: missing nodes mean the required nodes are not available in the current environment, and Comfy Cloud runs a managed set of nodes and models.