Nodes/Comfyui_TTP_Toolset/TTP Smart Tile Save Final Image
ComfyUI Node Runs on cloud

TTP Smart Tile Save Final Image

Don't let a loop flood your output folder

By TTPlanetPig·Created 2 years ago·Updated about a month ago· 1,030
TTP Smart Tile Save Final Image
  • images
    donetrue
    filename_prefixTTP_Smart_Tile

    Plug a Smart Tile loop into ComfyUI's stock Save Image node and you'll get exactly what you asked for and nothing you wanted: a file for every single intermediate preview the loop spits out on its way to the finished image, not just the one you actually care about. This node exists to fix that one specific annoyance.

    Why the stock node isn't enough here

    A Smart Tile loop runs the same graph over and over, once per tile, and Assemble is normally set to assemble_mode=final_only - meaning it returns a cheap placeholder preview on every unfinished step and only does the real, expensive composite once the last tile is in. ComfyUI's Save Image node has no concept of "unfinished" versus "final" - it saves whatever image tensor lands on it, every time the graph executes. Loop through sixteen tiles and that's sixteen files in your output folder, fifteen of which are half-built previews you'll immediately want to delete. Save Final Image is the pack's own troubleshooting-table fix for exactly this: it gates on the loop's done flag and only writes a file once assembly is actually finished.

    Inputs

    Just three, all required: images (the assembled output, straight from Assemble), done (boolean, defaults to true - but in a loop workflow you want this wired to the same done signal you fed Assemble, usually chained from Loop Collect's done output, so this node stays quiet until the real final image exists), and filename_prefix (defaults to TTP_Smart_Tile, same convention as the stock Save Image node). There's no optional block and no outputs - it's a terminal node, is_output_node in ComfyUI terms, meant to sit at the very end of the chain.

    Installing it

    ComfyUI Manager: search "Comfyui_TTP_Toolset" and install. Manual clone:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TTPlanetPig/Comfyui_TTP_Toolset
    

    then restart. This one node needs nothing beyond the base install - no model files, no extra dependencies. Like ComfyUI's own Save Image, the file it writes carries the workflow metadata embedded in the PNG, so you can drag it back into ComfyUI later to recover the exact graph that produced it.

    Where people get tripped up

    If a run finishes and nothing lands in your output folder, the almost-always cause is that done never actually reached true at this node - trace the chain back to Loop Collect and confirm its done output is wired all the way through, rather than left at this node's own default. If you're still getting a pile of intermediate files despite using this node, check whether a stock Save Image node snuck back into the graph somewhere downstream of Assemble (easy to do if you copy-pasted an older subgraph) - this node only helps if it's the thing actually receiving the final image, not sitting next to a second save node that isn't gated on anything. And if you want a preview of every loop step for debugging purposes, that's a legitimate reason to keep a stock Save Image around temporarily - just remember to pull it back out before a real run, or you're back to the flooded-folder problem this node was built to solve.

    CategoryTTP/Smart Tile

    Inputs (3)

    NameTypeDefaultDescription
    imagesIMAGE
    doneBOOLEANtrue
    filename_prefixSTRINGTTP_Smart_Tile

    Outputs (0)

    No outputs