Nodes/BrainDead Nodes/BD Workflow Version Restore
ComfyUI Node

BD Workflow Version Restore

Get your workflow back from the version timeline

By BizaNator·Created 8 months ago·Updated 3 days ago· 15
BD Workflow Version Restore
    • workflow_json
    • file_path
    • status
    workflow_id
    version_number0
    save_to_filetrue
    output_filename

    This is the "oh thank god" node. The whole point of the BrainDead workflow versioning system is that you can always get back to the state that worked, and BD Workflow Version Restore is the extraction step: it loads a saved version from disk and hands it to you as workflow JSON - either dumped into output/ as a .json file you can drag straight back into ComfyUI, or as a string output you can pipe somewhere else.

    It pairs with BD Workflow Version Cache (which saves the snapshots) and BD Workflow Version List (which shows you what you have). The normal flow is: list → note the version number you want → set it here → restore → drag the exported JSON into ComfyUI. Done.

    The inputs

    • workflow_id - whose history to pull from. Wire it from Cache's workflow_id output for consistency; an empty ID just errors out.
    • version_number - which version to restore. 0 means "latest" (that's the default and a common foot-gun if you assumed 0 was invalid). Set it to a specific number - like the one you saw in List - to go back to a particular snapshot.
    • save_to_file (default true) - export the workflow JSON into your output/ folder so you can download or drag it into the UI. Turn off and you get the JSON only on the workflow_json output.
    • output_filename (optional) - override the default <workflow_id>_v<version>.json name. Useful when you're about to drag several versions into the UI and want them distinguishable.

    Outputs: workflow_json (the restored workflow as a JSON string), file_path (where it was saved, if save_to_file was on), and status (a summary naming the version, timestamp, and node count - a nice sanity check that you grabbed the right one).

    Installation

    Part of ComfyUI-BrainDead:

    cd ComfyUI/custom_nodes
    git clone https://github.com/BizaNator/ComfyUI-BrainDead
    cd ComfyUI-BrainDead
    pip install -r requirements.txt
    

    Or ComfyUI Manager → search "BrainDead". No models, no extra dependencies.

    Common issues

    • "No versions found" - you're asking for a workflow that was never snapshotted, or the ID doesn't match what the Cache node saved. Double-check the ID (auto-generated ones change when the structure changes).
    • Restored a blank/stale workflow - check version_number. If it's 0, you got the latest, which may be the broken one you're trying to escape. List the versions, pick the actual number, set it explicitly.
    • Drag-into-ComfyUI doesn't restore my images - the JSON is the graph, not your cached outputs. It recreates the workflow structure; you may need to re-run (or rely on the pack's cache nodes) to regenerate the results.
    Category🧠BrainDead/Cache

    Inputs (4)

    NameTypeDefaultDescription
    workflow_idSTRING
    version_numberINT00–9999Which version to restore (0 = latest)
    save_to_fileBOOLEANtrueExport to output/ folder for download
    output_filenameoptSTRINGCustom filename (optional)

    Outputs (3)

    NameTypeDescription
    workflow_jsonSTRING
    file_pathSTRING
    statusSTRING