Nodes/ComfyUI-ArchAi3d-Qwen/๐Ÿงฎ Smart Tile Calculator V3 (Flux)
ComfyUI Node

๐Ÿงฎ Smart Tile Calculator V3 (Flux)

Tile math that respects Flux's 64-pixel alignment

By amir84ferdosยทCreated 11 months agoยทUpdated 5 months agoยท 70
๐Ÿงฎ Smart Tile Calculator V3 (Flux)
  • image
  • upscaled_image
  • tile_width
  • tile_height
  • overlap
  • output_width
  • output_height
  • tiles_x
  • tiles_y
  • total_tiles
  • upscale
  • efficiency
  • debug_info
โ—„upscale2.0โ–บ
โ—„upscale_methodlanczosโ–บ
โ—„tile_aspect_ratioautoโ–บ
โ—„target_tile_mp1.0โ–บ
โ—„padding_pixels64โ–บ
โ—„optimize_efficiencytrueโ–บ
โ—„mp_tolerance0.5โ–บ
โ—„aspect_freedom1.0โ–บ
โ—„upscale_tolerance0.00โ–บ

SD1.5-era tiled upscalers could get away with sloppy tile sizes. Flux and Qwen-Image can't - they're transformer-based, and they behave badly when your latent dimensions aren't aligned to the model's expectations (64 is the safe divisor). The V3 calculator exists because of that: it's a tile-math node tuned for Flux-class models, and instead of just giving you numbers it hands you the already-upscaled image plus the grid geometry, ready for the SEGS and Detailer side of this pack.

It's part of the "Smart Tile" subsystem in ComfyUI-ArchAi3d-Qwen, Amir Ferdos's pack - the tiling pipeline that sits alongside his better-known Qwen-VL interior-design nodes. V3 is the first of the calculators built around the ideas the later versions refine: pick a target tile size in megapixels, keep the tiles near an aspect ratio you choose, and let the math settle the rest.

Inputs that matter

  • upscale - your target factor (1โ€“8, default 2).
  • tile_aspect_ratio - what shape the tiles should be (auto matches the image's orientation; or pick 1:1, 16:9, 3:2, etc.).
  • target_tile_mp - the big one. How many megapixels per tile; 1.0 โ‰ˆ 1024ร—1024. This is your VRAM lever - drop it on a small card, raise it if you have headroom.
  • padding_pixels - minimum overlap between tiles for blending (default 64).
  • optimize_efficiency - search for a tile size that minimizes wasted edge pixels.
  • mp_tolerance / aspect_freedom / upscale_tolerance - how much the tile MP, tile aspect, and output size may bend to get a better fit. Raise them when the grid won't otherwise align; the defaults (0.5 / 1.0 / 0) are a reasonable starting trade.

Outputs

upscaled_image (already resized with your chosen upscale_method), then the geometry: tile_width, tile_height, overlap, tiles_x, tiles_y, total_tiles, output_width, output_height, plus upscale (the actual factor used), efficiency, and debug_info. These feed the Smart Tile SEGS node's per-tile inputs (or the bundle-based nodes further down the chain).

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/amir84ferdos/ComfyUI-ArchAi3d-Qwen.git
cd ComfyUI-ArchAi3d-Qwen
pip install -r requirements.txt

Or ComfyUI Manager โ†’ "ArchAi3d Qwen". No model files. Free for personal use; the pack's license wants a paid license for commercial work.

The honest take

Between V3, V4 and V5, they're the same search with different personalities: V4 adds a matplotlib heatmap (a debugging nicety), V5 vectorizes the search so it's near-instant and tightens the defaults. V3 is the version to reach for when you want the Flux-aware math without the extra outputs to ignore. Pair its upscaled_image with Smart Tile SEGS + Conditioning + Detailer and you've got a whole guided tiled-detail pipeline from a single calculator - that's where this node actually shines.

CategoryArchAi3d/Upscaling/Smart Tile

Inputs (10)

NameTypeDefaultDescription
imageIMAGEโ€”
upscaleFLOAT2.01โ€“8Upscale factor (e.g. 2.0 = 2x upscale)
upscale_methodCOMBOlanczosInterpolation method for upscaling
tile_aspect_ratioCOMBOautoTile aspect ratio. 'auto' matches image orientation.
target_tile_mpFLOAT1.00.25โ€“4Target Megapixels per tile (e.g. 1.0 = ~1024x1024)
padding_pixelsINT640โ€“512Minimum overlap between tiles for blending
optimize_efficiencyBOOLEANtrueSearch for tile size that maximizes efficiency (less wasted pixels)
mp_toleranceFLOAT0.50โ€“1.5How much tile MP can deviate from target. 0=exact, 0.5=ยฑ50%, 1.0=ยฑ100%
aspect_freedomFLOAT1.00โ€“2How much aspect ratio can change. 0=exact, 0.5=ยฑ50%, 1.0=any aspect
upscale_toleranceFLOAT0.000โ€“0.2Allow output size to vary for better tile fit. 0=exact, 0.05=ยฑ5%, 0.1=ยฑ10%

Outputs (12)

NameTypeDescription
upscaled_imageIMAGEโ€”
tile_widthINTโ€”
tile_heightINTโ€”
overlapINTโ€”
output_widthINTโ€”
output_heightINTโ€”
tiles_xINTโ€”
tiles_yINTโ€”
total_tilesINTโ€”
upscaleFLOATโ€”
efficiencyFLOATโ€”
debug_infoSTRINGโ€”