Image Crop to Tiles
The front door of the Mira tiled upscaler — crop a big image into overlap-feathered tiles
- image
- tiled_images
- mira_itu_pipeline
- mira_itu_pipeline_info
- cropped_full_image
Tiled upscaling has one job: run diffusion on a huge image without the VRAM bill for the whole thing at once. You slice it into overlapping tiles, sample each one, stitch them back. Image Crop to Tiles is the slicing step - and unlike the generic tile nodes floating around, it's built to hand its results to the rest of this pack's pipeline, which is what makes it worth knowing.
It's the front door of the "Mira ITU" (Image Tiled Upscaler) loop this pack is organized around. The flow looks like: ImageCropTiles → VAEEncode_MiraSubPack → ImageTiledKSamplerWithTagger → VAEDecode_MiraSubPack → OverlappedImageMerge. This node feeds tiles and a descriptor of how they were cut, so the merge side can put them back exactly. That descriptor is the clever part - see below.
How it works
The source is worth summarizing because it explains the knobs. First it center-crops the image so its dimensions land on the pixel_alignment grid - that matters because a latent that isn't aligned to your model's VAE grid (8 for SDXL, 16 for FLUX.2, 32 for Qwen Image) will produce garbage at the edges. Then it computes a grid of overlapping tiles, honoring your tile_size and overlap. If adaptable_tile_size is on (it is by default), it adjusts tile dimensions per-axis so tiles stay near square and within adaptable_max_aspect_ratio - so a 21:9 image doesn't get long skinny tiles that hurt sampling quality. Finally it returns the tiles plus the pipeline descriptor.
The outputs - read these carefully
- tiled_images - the IMAGE batch, one entry per tile, in a deterministic order (left-to-right, top-to-bottom).
- mira_itu_pipeline - the custom descriptor type: full width/height, tile width/height, overlap, feather rate, pixel alignment. This is what the merge nodes consume. Don't feed this to anything that doesn't know it.
- mira_itu_pipeline_info - the same info as human-readable text, for debugging.
- cropped_full_image - the center-cropped source, useful as the color-reference input for
TiledImageColorCorrection.
The inputs that matter
- tile_size (default 1024) - target tile edge. Sized for your model and VRAM.
- overlap (default 128) - how much tiles share at the edges. More overlap = smoother seams, more redundant compute.
- overlap_feather_rate (default 2) - the feather (blend) width = overlap × rate. 2.0 extends the feather one full overlap past the boundary for smooth blending; 1.0 feathers only inside the overlap.
- adaptable_max_aspect_ratio (default 1.33) - the shape guard; 4:3 = 1.33, 16:9 = 1.78.
- pixel_alignment (default 8) - set it to your VAE's grid before anything else.
Install
Part of ComfyUI_MiraSubPack:
cd ComfyUI/custom_nodes
git clone https://github.com/mirabarukaso/ComfyUI_MiraSubPack
or Manager → "MiraSubPack", restart. No extra dependencies.
Gotchas
- The source silently center-crops the image to the alignment grid and prints the crop amount - check the console if your output looks slightly tighter than your input.
tile_sizemust exceedoverlap; if you set it smaller, the node auto-adjusts with a warning.- The tiles come back as one flat batch. If you're going to inspect or reorder them, you need the tile grid math from the pipeline descriptor - which is exactly why the descriptor output exists. It's a design decision: this pack expects you to treat tiles as opaque until the merge.
- If you want tile sizing in megapixels rather than a fixed edge, the pack's
ImageCropTilesByPixelsvariant is the same node with a pixel-budget input instead.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| tile_size | INT | 1024512–4096 | — |
| overlap | INT | 12864–256 | — |
| overlap_feather_rate | FLOAT | 2.00.1–4 | Feather width = overlap × rate. rate=1.0: feather only within overlap zone; rate=2.0 (recommended): extends 1× overlap beyond the boundary for smooth blending. |
| adaptable_tile_size | BOOLEAN | true | — |
| adaptable_max_deviation_ratio | FLOAT | 0.250.1–0.5 | — |
| adaptable_max_aspect_ratio | FLOAT | 1.331–2 | Max aspect ratio (W/H or H/W) for adaptable tile sizing. 5:4=1.25, 4:3=1.33, 16:9=1.78, 21:9=2.33. |
| pixel_alignment | INT | 88–256 | Align tile dimensions to multiples of this value (e.g., 8 SDXL, 16 FLUX.2, 32 Qwen Image). |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| tiled_images | IMAGE | — |
| mira_itu_pipeline | mira_image_tiled_upscaler_pipeline | — |
| mira_itu_pipeline_info | STRING | — |
| cropped_full_image | IMAGE | — |