Nodes/Comfyui_TTP_Toolset/TTP Smart Tile Image Upscale Prep
ComfyUI Node Runs on cloud

TTP Smart Tile Image Upscale Prep

Enlarge each loop tile before it hits the sampler

By TTPlanetPig·Created 2 years ago·Updated about a month ago· 1,030
TTP Smart Tile Image Upscale Prep
  • image
  • upscale_model
  • image
  • info
scale2.00
round_to8
resamplinglanczos
max_megapixels0.00
use_upscale_modeltrue

Part of the pack's current flagship feature, Smart Tile 2.0 - an object-aware, per-tile img2img loop rather than the older fixed-grid tiling. If you're new to Smart Tile: instead of cutting an image into equal squares, you build variable-size tiles around actual objects (face, hands, text, whatever needs detail), process each one through img2img individually, then reassemble. This node is the step that upscales each tile before it goes through the sampler, so a small, low-res face tile doesn't get sampled at its original tiny resolution.

Where it sits in the loop. The README's recommended flow is Interactive Crop → (prompt/composite/rank steps) → Loop Source → VAE Encode/Sampler/VAE Decode → Loop Collect → ... → Assemble. This node slots in right after Loop Source outputs each tile's image and before that tile hits VAE Encode - its whole job is "make this tile bigger, sensibly, before we sample it."

The inputs that matter. scale (0.1–16, default 2) is the requested enlargement factor. use_upscale_model (default on) decides the method: if you connect an upscale_model (any standard ComfyUI UPSCALE_MODEL, run through the same tiled-upscale-model path the built-in upscale node uses), it uses that; otherwise, or if you flip use_upscale_model off, it falls back to plain resampling via resampling (lanczos, bicubic, bilinear, area, nearest-exact, or nearest - lanczos is the default and generally the right call for photographic content). The one that actually protects your VRAM is max_megapixels (default 0, meaning no cap) - set this and the node will cap each enlarged tile's pixel count, rounding the final size down (via round_to, default 8) so it stays under budget rather than over. That matters a lot here specifically because Smart Tile can generate many small detail tiles via Auto Tile, and upscaling all of them uncapped is a fast way to run out of memory.

Output: image (the prepped tile, ready for VAE Encode) and info (a string report - worth piping into a Show Text node while you're tuning settings, since it tells you what actually happened when the cap kicked in).

A wrinkle worth understanding: tile coordinates are not changed by this node - they stay in original-image space even though the pixels themselves got bigger. That's deliberate: it's what lets TTP Smart Tile Assemble map the processed, enlarged tile back to where it belongs using sample_box and output_scale. This is also why the README pairs this node with TTP Smart Tile Output Size Estimate downstream - since different tiles can get capped by max_megapixels at different actual ratios, Assemble needs that estimate node to figure out the final canvas size correctly rather than guessing from one tile's scale.

Install. ComfyUI Manager, search "Comfyui_TTP_Toolset", or cd ComfyUI/custom_nodes && git clone https://github.com/TTPlanetPig/Comfyui_TTP_Toolset, restart. If you want to use use_upscale_model=true, you need an actual .pth/.safetensors upscale model (ESRGAN-family or similar) loaded through ComfyUI's standard upscale-model loader and connected to this node - the node itself doesn't ship or fetch one.

Common issues. The README's own recommended starting parameters for a "variable-size detail tiles" scenario are scale=2.5, round_to=8, max_megapixels=1.5, use_upscale_model=true - a reasonable default if you're not sure where to start. If your final assembled image comes out the wrong size or looks stretched in places, check TTP Smart Tile Output Size Estimate's info output first - mixed tile scales from an active max_megapixels cap show up there, and that's usually the actual cause rather than a bug in Assemble itself.

CategoryTTP/Smart Tile

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
scaleFLOAT2.000.1–16
round_toINT81–256
resamplingCOMBOlanczos6 options: lanczos, bicubic, bilinear, area, nearest-exact, nearest
max_megapixelsFLOAT0.000–64
use_upscale_modelBOOLEANtrue
upscale_modeloptUPSCALE_MODEL

Outputs (2)

NameTypeDescription
imageIMAGE
infoSTRING