Latent Upscale then Crop to Tiles (Advanced)
Upscale your latents properly, then tile them — the 'advanced' node that earns the name
- latent
- tiled_latents
- full_latent
- original_tiled_latents
- mira_image_tiled_upscaler_pipeline
- mira_itu_pipeline_info
- original_tile_size
- original_width
- original_height
Plain latent upscaling has a dirty secret: torch.nn.functional.interpolate flattens the latent's variance, which is why naive latent upscales come out washed-out and low-contrast. Latent Upscale then Crop to Tiles (Advanced) does the upscale properly and then slices the result into overlapping tiles - one node doing the two steps your tiled hi-res-fix pipeline needs before the KSampler.
The "Advanced" in the display name is fair, not marketing. It bundles three things the naive approach skips: a hybrid interpolation that keeps structure sharp, statistical correction that stops contrast drift, and multi-stage stepping so big upscale factors don't smear. If you've ever upscaled latents and wondered why the colors went flat, this node is the answer to that specific question.
How it works, from the source
- bislerp upscaling. When
upscale_methodisbislerp(default), it interpolates twice -nearest-exactfor structure,bicubicfor smoothness - and mixes them bybislerp_strength(0.35 default, higher = sharper). That's the "combines nearest-exact and bicubic for best results" the tooltip promises. - variance_matching (default on). Before upscaling it records the latent's mean and std; after, it rescales so the upscaled latent has the original distribution back. This is what prevents the color/contrast drift that makes naive upscales look flat.
- multi_stage (default on). For scale factors above 2.0, it steps up in ≤2× increments rather than one giant jump - so a 4× upscale doesn't turn into a blurry single interpolation.
- noise_strength (default 0) - optional latent noise injection with a seed, using lerp mixing so it doesn't blow out variance. Leave at 0 unless you want texture variation.
- Then the tiling:
tile_size,overlap,overlap_feather_rate,adaptable_tile_sizewith aspect-ratio guard, andpixel_alignment- the same grid logic asImageCropTiles.
The inputs that matter
- latent - the input latent.
- scale_factor (default 1.25, up to 8) - how much bigger. Note it gets adjusted to the pixel-alignment grid, with a console warning if the adjustment is >1%.
- pixel_alignment (default 8) - this is set via the tooltip's cheat sheet: 8 SDXL, 16 FLUX.2, 32 Qwen Image. Set it before anything else.
- upscale_method / bislerp_strength - leave bislerp on; tune strength only if you see softness vs. ringing.
The outputs are the generous part: tiled_latents (what the tiled KSampler eats), full_latent (the whole upscaled latent, untiled), original_tiled_latents (the input tiles, handy as reference for color correction), the mira_itu_pipeline descriptor + its readable mira_itu_pipeline_info string, and the original tile size/width/height as ints.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/mirabarukaso/ComfyUI_MiraSubPack
or search "MiraSubPack" in ComfyUI Manager and restart. Pure PyTorch + ComfyUI internals, no extra deps.
When to reach for it
This is the "stay in latent space the whole way" alternative to upscaling pixels and re-encoding - great for FLUX.2-style models where a decode-encode round trip can cost you. For SDXL it pairs with ImageTiledKSamplerWithTagger the same way. If you just need a quick latent upscale without tiling, you're paying for features you don't use; if you're building a real tiled hi-res-fix, this is one of the few nodes that does both halves with actual quality control. The variance-matching toggle alone is worth the pack install if you've been fighting washed-out latent upscales.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | Input latent to upscale and tile. | |
| scale_factor | FLOAT | 1.250.5–8 | — |
| upscale_method | COMBO | bislerp | Method for upscaling. 'bislerp' combines nearest-exact and bicubic for best results. |
| bislerp_strength | FLOAT | 0.350–1 | Weight of nearest-exact vs bicubic. Higher is sharper. |
| variance_matching | BOOLEAN | true | Maintains latent distribution to prevent color/contrast drift. |
| multi_stage | BOOLEAN | true | Iterative upscaling for factors > 2.0. |
| noise_strength | FLOAT | 0.000–1 | — |
| seed | INT | 00–18446744073709550000 | — |
| tile_size | INT | 1024512–4096 | — |
| overlap | INT | 12864–256 | — |
| overlap_feather_rate | FLOAT | 2.00.1–4 | Feather width = overlap × rate. rate=2.0 (recommended) for overlap=64 gives feather=128px. |
| adaptable_tile_size | BOOLEAN | true | — |
| adaptable_max_deviation_ratio | FLOAT | 0.25 | — |
| adaptable_max_aspect_ratio | FLOAT | 1.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 (8)
| Name | Type | Description |
|---|---|---|
| tiled_latents | LATENT | — |
| full_latent | LATENT | — |
| original_tiled_latents | LATENT | — |
| mira_image_tiled_upscaler_pipeline | mira_image_tiled_upscaler_pipeline | — |
| mira_itu_pipeline_info | STRING | — |
| original_tile_size | INT | — |
| original_width | INT | — |
| original_height | INT | — |