๐งฎ Smart Tile Calculator V3 (Flux)
Tile math that respects Flux's 64-pixel alignment
- image
- upscaled_image
- tile_width
- tile_height
- overlap
- output_width
- output_height
- tiles_x
- tiles_y
- total_tiles
- upscale
- efficiency
- debug_info
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 (
automatches 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.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | โ | |
| upscale | FLOAT | 2.01โ8 | Upscale factor (e.g. 2.0 = 2x upscale) |
| upscale_method | COMBO | lanczos | Interpolation method for upscaling |
| tile_aspect_ratio | COMBO | auto | Tile aspect ratio. 'auto' matches image orientation. |
| target_tile_mp | FLOAT | 1.00.25โ4 | Target Megapixels per tile (e.g. 1.0 = ~1024x1024) |
| padding_pixels | INT | 640โ512 | Minimum overlap between tiles for blending |
| optimize_efficiency | BOOLEAN | true | Search for tile size that maximizes efficiency (less wasted pixels) |
| mp_tolerance | FLOAT | 0.50โ1.5 | How much tile MP can deviate from target. 0=exact, 0.5=ยฑ50%, 1.0=ยฑ100% |
| aspect_freedom | FLOAT | 1.00โ2 | How much aspect ratio can change. 0=exact, 0.5=ยฑ50%, 1.0=any aspect |
| upscale_tolerance | FLOAT | 0.000โ0.2 | Allow output size to vary for better tile fit. 0=exact, 0.05=ยฑ5%, 0.1=ยฑ10% |
Outputs (12)
| Name | Type | Description |
|---|---|---|
| upscaled_image | IMAGE | โ |
| tile_width | INT | โ |
| tile_height | INT | โ |
| overlap | INT | โ |
| output_width | INT | โ |
| output_height | INT | โ |
| tiles_x | INT | โ |
| tiles_y | INT | โ |
| total_tiles | INT | โ |
| upscale | FLOAT | โ |
| efficiency | FLOAT | โ |
| debug_info | STRING | โ |