Nodes/ComfyUI_NetDist/Save workflow (disk)
ComfyUI Node

Save workflow (disk)

Write the current workflow to disk

By city96·Created 3 years ago·Updated 2 years ago· 507
Save workflow (disk)
  • workflow
    filename_prefixworkflow/ComfyUI

    The write half of ComfyUI_NetDist's workflow-JSON pair: take a workflow, dump it to disk as a JSON file - the same way core Save Image dumps a PNG. Feed it LoadCurrentWorkflowJSON's output and you've got a snapshot you can reload later with LoadDiskWorkflowJSON, instead of rebuilding the graph you feed into RemoteChainStart from scratch every session.

    This is part of the "advanced" side of city96's ComfyUI_NetDist pack - the pattern built for running more than two GPUs, where a workflow gets shipped as a standalone JSON payload rather than read live off the graph each time. It's a small, unglamorous node, but it's what turns "rebuild the advanced setup from scratch every session" into "pick a saved file and go."

    How it works

    It's an output node - no downstream connections, nothing to wire further. It writes the workflow JSON you hand it into your ComfyUI output directory, nested under whatever filename_prefix you set, matching the exact same output-folder convention every other Save node in ComfyUI follows. Nothing special about where it lands beyond that.

    The inputs and outputs that matter

    • workflow (JSON, required) - the graph to save, almost always piped straight from LoadCurrentWorkflowJSON.
    • filename_prefix (STRING, default workflow/ComfyUI) - the default already nests saves under a workflow/ subfolder inside your output directory, so they don't mix in with your generated images and latents.

    No outputs - this is a terminal node, same shape as core Save Image.

    How to install it

    Via ComfyUI Manager: search ComfyUI_NetDist. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/city96/ComfyUI_NetDist
    pip install requests
    

    Restart ComfyUI. requests is the pack's only dependency.

    Common issues & troubleshooting

    Can't find the saved file. Check your ComfyUI output directory under the workflow/ prefix (or wherever you overrode filename_prefix to point) - same base folder as everything else you save, just a JSON file sitting alongside your images.

    Expecting it to save the generated output too. It doesn't - this only captures the workflow graph itself, none of the actual images or latents produced by running it. If you want those preserved as well, pair it with SaveImageUrl or SaveLatentNumpy separately; they're independent nodes with independent jobs.

    Files piling up over time. Like any other Save node in ComfyUI, nothing here gets cleaned up automatically - if you're saving workflow snapshots regularly, expect that folder to grow and prune it yourself when it matters.

    Not sure whether to bother with this at all. If you're only ever running the advanced chain from a live graph you're actively editing, LoadCurrentWorkflowJSON alone covers you and you can skip this node entirely. It earns its place once you've got a stable multi-GPU setup you want to fire off repeatedly without rebuilding it - a batch job you kick off the same way every night, say - where reloading a saved file beats recreating the graph by hand each time.

    Categoryremote/advanced

    Inputs (2)

    NameTypeDefaultDescription
    workflowJSON
    filename_prefixSTRINGworkflow/ComfyUI

    Outputs (0)

    No outputs