Nodes/Comfyui_TTP_Toolset/TTP Smart Tile Loop Collect
ComfyUI Node Runs on cloud

TTP Smart Tile Loop Collect

Catching each tile on its way back

By TTPlanetPig·Created 2 years ago·Updated about a month ago· 1,030
TTP Smart Tile Loop Collect
  • tile_task
  • processed_image
  • tile_set
  • done
  • next_index
  • status

If TTP Smart Tile Loop Source is the node that hands you one tile at a time, Loop Collect is the one standing at the other end of the sampler catching it. It's the second half of a pair, and neither one does anything useful on its own.

Why this exists

Smart Tile 2.0 is TTP Toolset's answer to a real problem with tiled img2img: a plain grid cuts faces and hands in half, and duplicating your sampler chain eight or sixteen times for eight or sixteen tiles is miserable to maintain. So instead the pack runs one sampler chain in a loop - Loop Source feeds it a tile, you sample and decode, Loop Collect stores the result and moves the pointer to the next tile, and you re-queue the same graph until every tile has gone through. It's the same "crop, process, stitch back" shape that inpainting workflows converged on with Inpaint Crop and Stitch, just generalized to an arbitrary set of variable-size tiles instead of one mask.

Loop Collect's whole job is the "stitch back into the ledger" half of that. It doesn't touch pixels beyond storing them - it takes the image your sampler just produced, writes it into the right slot of the tile set, and reports how far along the loop is.

Inputs and outputs that matter

Two required inputs, and that's it: tile_task, which is the token Loop Source handed out identifying exactly which tile this run was for, and processed_image, the image coming out of your VAE Decode. Wire tile_task straight through from Loop Source and processed_image from the end of your sampler chain - there's nothing else to configure here.

The outputs are where the state machine lives. tile_set goes back into Loop Source for the next iteration, carrying the tile you just finished plus everyone still waiting. done is a boolean that flips true once the last tile has been collected - this is the one to pay attention to, because the README's recommended pattern is to wire it into both Output Size Estimate and Assemble's own done input, so those nodes skip doing real work and just return a lightweight preview on every unfinished loop step, then do the expensive final composite exactly once. next_index tells you which tile is up next, and status is a plain-text progress string, handy for a Show Text node while you're debugging a loop that isn't behaving.

Installing it

Easiest path is ComfyUI Manager - search "Comfyui_TTP_Toolset" and install. Manually, it's:

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

then restart ComfyUI. One install gets you the whole pack - Loop Collect, Loop Source, Semantic Rank, the QwenVL prompt builder, the legacy fixed-grid TTP Tile 1.0 nodes, all of it. Loop Collect itself is pure bookkeeping, no model weights or extra Python packages involved, so there's nothing further to download for this specific node.

Where people get tripped up

The biggest one, straight from the pack's own troubleshooting notes: don't finish this chain with ComfyUI's stock Save Image node. It has no idea the loop exists, so it happily writes a file for every single unfinished intermediate preview, not just the final assembled image. That's what Save Final Image is for - it gates on done and only writes once.

If done never flips true, the usual cause is a tile_task that doesn't actually match the tile_set this Loop Collect is tracking - check you haven't accidentally crossed wires between two separate loops in the same workflow, or reset restart_request on Loop Source partway through by mistake. And if Assemble feels sluggish, it's almost always because done isn't wired into it at all, so it's recompositing the full canvas on every single tile instead of once at the end.

CategoryTTP/Smart Tile

Inputs (2)

NameTypeDefaultDescription
tile_taskTTP_SMART_TILE_TASK
processed_imageIMAGE

Outputs (4)

NameTypeDescription
tile_setTTP_SMART_TILE_SET
doneBOOLEAN
next_indexINT
statusSTRING