Nodes/ComfyUI-ArchAi3d-Qwen/Simple Tile Cropper (Batch)
ComfyUI Node

Simple Tile Cropper (Batch)

Crop the whole tile grid in one node

By amir84ferdos·Created 11 months ago·Updated 5 months ago· 70
Simple Tile Cropper (Batch)
  • image
  • tile_params
  • cropped_tiles
  • tiles_info
  • total_tiles
tile_width512
tile_height512
tiles_x2
tiles_y2
overlap64

The single-tile cropper is a great teacher, but a lousy employee. On a 3×3 upscale you'd wire nine of them. Simple Tile Cropper (Batch) does the same job for the whole grid in one node and hands you a batch of cropped tiles plus a JSON geometry file the compositor reads - which is how you'd actually run a real upscale without your graph turning into a spreadsheet.

It belongs to the "Simple USDU" tiling subsystem in ComfyUI-ArchAi3d-Qwen (Amir Ferdos's pack; the tiling side is the half of it the README doesn't document). The pipeline shape: Batch Cropper → sampler(s) → Batch Blend Mask → Batch Compositor. Everything downstream that wants "the whole grid" takes these batched outputs.

What it does differently

Under the hood it loops the single cropper over every tile_idx, which means all the edge-tile behavior carries over - tiles that extend past the image boundary get cropped smaller. Then there's one extra step that matters: edge tiles are resized back up to the full tile size (Lanczos) so they can be stacked into one uniform batch. That keeps the batch rectangular, which the sampler and compositor need. The geometry of where each tile really lives is preserved in the JSON.

Inputs

  • image - required.
  • tile_width / tile_height / tiles_x / tiles_y / overlap - the grid, all optional with defaults because of the next input.
  • tile_params - a TILE_PARAMS bundle from Smart Tile Solver V6.2. Connect it and it overrides the individual inputs. This is the intended wiring: the solver computes the grid, the cropper follows it, and your tile size can never drift from the solver's math.

Outputs: cropped_tiles (IMAGE batch, [total_tiles, H, W, C]), tiles_info (STRING, the JSON geometry for the compositor), and total_tiles (INT).

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 via ComfyUI Manager, search "ArchAi3d Qwen". No model downloads. Free for personal/non-commercial use; commercial use needs a license.

The honest take

This is the node that makes the Simple USDU pipeline usable at scale. The one thing to watch: because edge tiles get Lanczos-resized to the full tile size, they contain a bit of stretched context at the borders. That's fine - the blend masks and overlap handling downstream absorb it - but if you're pixel-peeping, that's the trade you accepted for a uniform batch. If you'd rather avoid the resize entirely, the Smart Tile SEGS path in the same pack crops tiles at their true sizes instead.

CategoryArchAi3d/Upscaling/Simple USDU

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
tile_paramsoptTILE_PARAMSBundle from Smart Tile Solver V6.2 (overrides individual inputs)
tile_widthoptINT51264–4096
tile_heightoptINT51264–4096
tiles_xoptINT21–100
tiles_yoptINT21–100
overlapoptINT640–512

Outputs (3)

NameTypeDescription
cropped_tilesIMAGE
tiles_infoSTRING
total_tilesINT