TTP Smart Tile Output Size Estimate
Figuring out how big your canvas actually got
- tile_set
- source_image
- output_scale
- width
- height
- scale_x
- scale_y
- info
Once your Smart Tile loop has upscaled and re-sampled a pile of variable-size tiles, someone has to figure out how big the final assembled image should actually be - and it's not a fixed number, because you probably enlarged different tiles by different amounts. That's this node's entire job: look at the finished tile set and estimate the output canvas size before Assemble commits to one.
Why it's not a trivial calculation
If you're pushing tiles through Image Upscale Prep before sampling, each tile can get scaled by a different factor depending on its content and the megapixel cap you set - a small face tile might hit its target scale cleanly while a huge background tile gets capped and rounded down to stay under budget. Feed that straight to Assemble and you'd need to tell it, by hand, exactly how those mismatched scales should reconcile into one final width and height. Output Size Estimate does that reconciliation for you, and - this matters for a workflow you're chaining after SeedVR2 or another upscaler to hit real 8K/16K deliverables - it's the node that keeps the canvas math honest when every tile came back a slightly different size.
Inputs and outputs that matter
tile_set is the collected result, normally straight out of Loop Collect. scale_strategy picks how mismatched tile scales get combined into one number: median (the default, and it matches what Assemble infers automatically if you don't wire anything in), mean, min, max, or focus_weighted - which leans on the semantic scale weights from Semantic Rank so a bunch of low-detail background tiles can't drag the canvas scale down below what your high-detail face and eye tiles actually earned.
The optional done input is the important one for loop-based workflows: wire Loop Collect's done output here (same as you would for Assemble), and while done=false this node skips scanning tiles entirely and returns a placeholder zero-scale result instead of doing real work on every unfinished loop step. source_image is optional too, for computing the estimate against your original base canvas.
Outputs: output_scale (FLOAT) is the one to wire straight into TTP Smart Tile Assemble.output_scale. width/height are the estimated final canvas dimensions, scale_x/scale_y break that out separately in case your tiles didn't enlarge uniformly on each axis, and info is a per-tile text log - read it if the final size looks off, because it'll show you exactly which tile came back an unexpected scale.
Installing it
Search "Comfyui_TTP_Toolset" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/TTPlanetPig/Comfyui_TTP_Toolset
then restart. This node is plain arithmetic over the tile set's metadata - no models, no extra dependencies, and it comes in with the rest of the pack in one install.
Where people get tripped up
Seeing width/height come back as 0 mid-run isn't a bug - it's the deliberate placeholder behavior when done=false, so don't chase it as an error unless the loop has actually finished and it's still zero (in which case, check done is really wired through from Loop Collect and not left disconnected). If your assembled output looks smaller or blurrier than expected in one region, check the info string before touching scale_strategy - it's usually one specific tile that got capped hard by a megapixel limit upstream, not the estimation logic itself. And if you're doing a portrait where the face needs to set the pace, median will happily let a big low-detail background tile win the tie; switch to focus_weighted (and make sure Semantic Rank actually ran first, since that's where the weighting comes from).
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| tile_set | TTP_SMART_TILE_SET | — | |
| scale_strategy | COMBO | median | 5 options: median, mean, min, max, focus_weighted |
| source_imageopt | IMAGE | — | |
| doneopt | BOOLEAN | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| output_scale | FLOAT | — |
| width | INT | — |
| height | INT | — |
| scale_x | FLOAT | — |
| scale_y | FLOAT | — |
| info | STRING | — |