Nodes/CRT-Nodes/Save Image With Path (CRT)
ComfyUI Node

Save Image With Path (CRT)

Save images exactly where you want them, without ever overwriting

By PGCRT·Created 2 years ago·Updated a day ago· 132
Save Image With Path (CRT)
  • image
    folder_path/tmp/ComfyUI/output
    subfolder_nameimages
    filenameoutput
    suffix
    extensionpng

    ComfyUI's built-in save node dumps everything into its output folder with a timestamp filename, which is fine until you're running batches for a client, a project, or a specific workflow directory - then you're sorting through hundreds of ComfyUI_00001_ files. SaveImageWithPath fixes that with the one feature you actually want: it saves to the exact folder you type, adds a numbered suffix per image, and never overwrites an existing file. That last part is the killer feature.

    The inputs that matter

    • folder_path - base folder, defaults to ComfyUI's output directory.
    • subfolder_name - created under the base folder; leave empty to save directly into the base.
    • filename - base name without extension. Leave it empty and it generates a random name (this is the secrets import at work - a genuinely random one, not timestamp-derived).
    • suffix - optional text appended to the filename, handy for tagging a run (_v2, _final, a date).
    • extension - png or jpg.
    • image - the IMAGE tensor. Batch-aware: every image in the batch gets saved.

    There are no outputs - it's a terminal output node, which is exactly right for a saver.

    The "never overwrites" bit, and why it matters

    This is the difference between a node and a trap. The save logic reserves a path atomically and, if the filename already exists, bumps a counter: output.png, output_1.png, output_2.png. That means re-running a workflow never silently destroys your previous render, and two runs of the same batch don't collide. If you've ever overwritten a good generation by re-queuing, you know why this matters. In a long render farm or an overnight batch it's the difference between losing work and keeping every attempt.

    Where you'd actually use it

    Any workflow where output location is part of the contract: per-project folders, per-client runs, a subfolder_name per style batch, or a fixed filename that's safe to hit repeatedly. It also plays nicely with the CRT pack's other production-style nodes - batch schedulers that generate a folder of prompts, and the crawl loaders that read folders back in - so you can round-trip images through disk with predictable names.

    Gotchas

    • Type the path, don't assume it exists. The node creates the subfolder but expects a valid base path. A typo means a confusing save location, not a friendly error.
    • Filename collisions don't error, they increment. That's a feature, but it means "I asked for output.png" can quietly become output_3.png. If you script around the names, account for it.
    • JPG is lossy, PNG is not. Sounds obvious, but in a batch pipeline it's easy to default to png and double your disk for no reason, or default to jpg and lose quality you needed.

    Install CRT-Nodes via ComfyUI Manager (search CRT-Nodes) or git clone https://github.com/plugcrypt/CRT-Nodes.git into custom_nodes, install requirements.txt, and restart.

    CategoryCRT/Save

    Inputs (6)

    NameTypeDefaultDescription
    imageIMAGE
    folder_pathSTRING/tmp/ComfyUI/outputBase folder path. Defaults to ComfyUI's output folder.
    subfolder_nameSTRINGimagesOptional subfolder within the base folder. Leave empty to save directly into the base folder.
    filenameSTRINGoutputBase file name without extension. Leave empty to generate a random name. Existing files are never overwritten.
    suffixSTRINGOptional suffix appended to filename.
    extensionCOMBOpngImage file extension.

    Outputs (0)

    No outputs