Nodes/Bjornulf_custom_nodes/๐Ÿ’พ๐Ÿ–ผ Save Image (exact path, exact name) โš ๏ธ๐Ÿ’ฃ
ComfyUI Node

๐Ÿ’พ๐Ÿ–ผ Save Image (exact path, exact name) โš ๏ธ๐Ÿ’ฃ

Write to a fixed filename, no auto-numbering

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
๐Ÿ’พ๐Ÿ–ผ Save Image (exact path, exact name) โš ๏ธ๐Ÿ’ฃ
  • image
    โ—„path./output/default.pngโ–บ

    ComfyUI's built-in Save Image node auto-increments filenames - ComfyUI_00001.png, 00002, and so on - which is exactly right when you want to keep every result. It's the wrong tool the moment something else is watching a fixed filename: a preview widget polling latest.png, another process reading from a known path, a script that expects the same name every time. This node is that other case. You give it an exact path, and it writes there. Every time. No numbering.

    How it works

    There's no folder logic, no counter, no collision handling - just a literal path string you control directly, and the node writes the incoming image to exactly that location. The pack's own README doesn't soften this: it flags the node with a warning and bomb emoji and says outright that the file will be overwritten if it already exists. That's not a caveat, it's the design. If two runs use the same path, the second run destroys the first run's output with no confirmation and no backup.

    Use it when overwriting is the point - a "current preview" file another tool reads live, a fixed handoff path between processes, a thumbnail that should always reflect the latest state - and avoid it entirely when you actually want to keep a history of outputs, which is what ComfyUI's standard Save Image node is for.

    The inputs and outputs that matter

    • image (required, IMAGE) - the image to save.
    • path (required, STRING, default ./output/default.png) - the exact file location, extension included. Nothing here auto-creates a unique name for you.
    • No outputs. It's a terminal node - the write is a side effect, and nothing continues downstream from here.

    How to install it

    ComfyUI Manager โ†’ search Bjornulf_custom_nodes โ†’ install โ†’ restart. Manual:

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

    Nothing special this node needs beyond ComfyUI's own image handling - it works regardless of whether the pack's heavier optional dependencies are installed.

    Common issues & troubleshooting

    My earlier result vanished. That's the overwrite behavior working exactly as documented, not a malfunction - the same path on a second run replaces the first run's file with no warning. If you need to keep history, don't reuse the same path; build a unique one per run (a timestamp, a loop index, a seed value) using the pack's text nodes, or switch to a standard auto-incrementing save node.

    The folder doesn't exist and it fails. Unlike ComfyUI's built-in save nodes, which handle the standard output/ structure for you, a literal path here needs its containing folder to actually exist first - this node doesn't create directories automatically. Create the target folder ahead of time or point the path at a folder ComfyUI already manages.

    I want a fixed filename and to keep every version. Those two goals conflict by definition - a fixed path can only hold one file at a time. Combine a fixed prefix with a varying suffix (a run counter from one of the pack's loop nodes, for instance) if you want predictable naming without the overwrite.

    Why does this exist when Save Image already works? Save Image is deliberately unpredictable in its exact filename (auto-incrementing), which is wrong when some other process needs to find your output at a name it already knows in advance. That's the entire reason this node is separate rather than just an option on the standard one.

    CategoryBjornulf

    Inputs (2)

    NameTypeDefaultDescription
    imageIMAGEโ€”
    pathSTRING./output/default.pngโ€”

    Outputs (0)

    No outputs