Nodes/Quality of Life Nodes for ComfyUI/Save File To Output (Soze)
ComfyUI Node

Save File To Output (Soze)

Copy Any File Into ComfyUI's Output Folder — the 'Make It Persist' Node

By SozeInc·Created 2 years ago·Updated 8 days ago· 10
Save File To Output (Soze)
    • saved_filepath
    • saved_filename
    • status
    source_filepath
    filename_path
    overwrite_filefalse

    ComfyUI is great at saving the things it creates and surprisingly bad at saving the things it touches. Download a video with an API node and it lands in a temp-ish spot with a random name. Copy a config file into a batch directory and it's a manual step. Save File To Output is the two-cent fix: give it an absolute path to any file on disk and a name, and it copies that file into ComfyUI's output/ directory with the name you chose. That's it. It's the "make it persist" node.

    It's dead simple, which is the point. source_filepath is the file you want to copy - it's marked forceInput, so it can be wired from another node rather than only typed. filename_path is the destination, a filename or a subpath under the output directory (so scenes/final.mp4 creates a scenes subfolder for you). overwrite_file decides what happens if the destination already exists: off (default) appends the standard ComfyUI _00001-style counter, on overwrites in place.

    The extension handling is the subtle part. The node always derives the extension from the source file and replaces whatever you typed if they disagree. Type out.mp4 but your source is a .mov? You get out.mov, and the status output tells you the real path. It's opinionated, but the opinion is sensible: it's much safer to match the source than to lie in the filename.

    Two behaviors are worth knowing before they confuse you. First, it always runs, every execution - there's no caching on this node, so the copy is refreshed each run (which is what you want for a final-output step). Second, it refuses to let the destination escape the output directory: a filename_path like ../secret/leak.txt errors out with a clear message instead of writing outside your sandbox. That's a guardrail, not a bug.

    When you'd actually use it

    • After an API video node (MiniMax, Seedance, FAL) drops a clip somewhere awkward - copy it to a stable, human-named location in output/.
    • To stash a generated config or JSON artifact alongside the images it produced, so everything from one run lives in one folder.
    • As a poor man's archive step: copy a workflow's source file or a downloaded LoRA into your outputs at the end of a batch.

    It pairs neatly with the pack's sibling Save Image Batch With Filenames if you want images and loose files in the same organized output tree.

    Install

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

    No keys, no models, no ffmpeg - pure standard-library file copy. The failure modes are all friendly: empty inputs skip cleanly, a missing source raises FileNotFoundError with the path in the status, and a same-file copy (source already equals destination) is detected and skipped rather than corrupted.

    Categorysoze

    Inputs (3)

    NameTypeDefaultDescription
    source_filepathSTRINGAbsolute path to the source file to copy.
    filename_pathSTRINGDestination filename (or subpath) under the output dir. Extension is derived from the source file and will be appended (or replaced) automatically.
    overwrite_fileBOOLEANfalse

    Outputs (3)

    NameTypeDescription
    saved_filepathSTRING
    saved_filenameSTRING
    statusSTRING