Nodes/ComfyUI_MiraSubPack/Latent Upscale then Crop to Tiles (Advanced)
ComfyUI Node

Latent Upscale then Crop to Tiles (Advanced)

Upscale your latents properly, then tile them — the 'advanced' node that earns the name

By mirabarukaso·Created 8 months ago·Updated 2 months ago· 0
Latent Upscale then Crop to Tiles (Advanced)
  • latent
  • tiled_latents
  • full_latent
  • original_tiled_latents
  • mira_image_tiled_upscaler_pipeline
  • mira_itu_pipeline_info
  • original_tile_size
  • original_width
  • original_height
scale_factor1.25
upscale_methodbislerp
bislerp_strength0.35
variance_matchingtrue
multi_stagetrue
noise_strength0.00
seed0
tile_size1024
overlap128
overlap_feather_rate2.0
adaptable_tile_sizetrue
adaptable_max_deviation_ratio0.25
adaptable_max_aspect_ratio1.33
pixel_alignment8

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_method is bislerp (default), it interpolates twice - nearest-exact for structure, bicubic for smoothness - and mixes them by bislerp_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_size with aspect-ratio guard, and pixel_alignment - the same grid logic as ImageCropTiles.

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.

CategoryMira/SubPack/Image Tiled Upscaler

Inputs (15)

NameTypeDefaultDescription
latentLATENTInput latent to upscale and tile.
scale_factorFLOAT1.250.5–8
upscale_methodCOMBObislerpMethod for upscaling. 'bislerp' combines nearest-exact and bicubic for best results.
bislerp_strengthFLOAT0.350–1Weight of nearest-exact vs bicubic. Higher is sharper.
variance_matchingBOOLEANtrueMaintains latent distribution to prevent color/contrast drift.
multi_stageBOOLEANtrueIterative upscaling for factors > 2.0.
noise_strengthFLOAT0.000–1
seedINT00–18446744073709550000
tile_sizeINT1024512–4096
overlapINT12864–256
overlap_feather_rateFLOAT2.00.1–4Feather width = overlap × rate. rate=2.0 (recommended) for overlap=64 gives feather=128px.
adaptable_tile_sizeBOOLEANtrue
adaptable_max_deviation_ratioFLOAT0.25
adaptable_max_aspect_ratioFLOAT1.33
pixel_alignmentINT88–256Align tile dimensions to multiples of this value (e.g., 8 SDXL, 16 FLUX.2, 32 Qwen Image).

Outputs (8)

NameTypeDescription
tiled_latentsLATENT
full_latentLATENT
original_tiled_latentsLATENT
mira_image_tiled_upscaler_pipelinemira_image_tiled_upscaler_pipeline
mira_itu_pipeline_infoSTRING
original_tile_sizeINT
original_widthINT
original_heightINT