Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI_MiraSubPack > Latent Upscale then Crop to Tiles

ComfyUI Node: Latent Upscale then Crop to Tiles

Class Name

LatentUpscaleAndCropTiles_MiraSubPack

Category
Mira/SubPack/Image Tiled Upscaler
Author
mirabarukaso (Account age: 2088days)
Extension
ComfyUI_MiraSubPack
Latest Updated
2026-11-08
Github Stars
0.0K

How to Install ComfyUI_MiraSubPack

Install this extension via the ComfyUI Manager by searching for ComfyUI_MiraSubPack
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_MiraSubPack in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Latent Upscale then Crop to Tiles Description

Upscales image latents and crops them into overlapping tiles for downstream processing.

Latent Upscale then Crop to Tiles:

This node enlarges an image’s latent representation, then divides the enlarged result into overlapping tiles for a tiled processing workflow. A latent is the compact form of an image that a diffusion model works with before decoding it into visible pixels. The node offers several interpolation methods, including a hybrid of nearest-exact and bicubic interpolation that balances defined structure with smoother transitions. It can also match the enlarged latent’s overall statistics to the original, upscale in stages for larger increases, and add a controlled amount of noise. Its tile placement can adapt to the enlarged dimensions, helping you prepare a full latent and corresponding tiles for subsequent processing. The node creates tiles; it does not process or merge them.

Latent Upscale then Crop to Tiles Input Parameters:

latent

The latent to enlarge and divide into tiles. The node reads its samples data and uses its dimensions to calculate the enlarged result and tile positions. This connection is required. No default, minimum, or maximum is specified; provide a compatible LATENT.

scale_factor

The requested enlargement relative to the incoming latent. A value of 1.25 requests a result about 25% wider and taller, while 1.0 requests the original dimensions. The node aligns the resulting dimensions to the selected pixel grid, so the achieved scale can differ slightly from the requested value. Default: 1.25; minimum: 0.5; maximum: 8.0; step: 0.05. Values below 1.0 reduce the dimensions rather than enlarge them.

upscale_method

Chooses how new latent positions are calculated. bislerp blends nearest-exact interpolation, which retains more distinct structure, with bicubic interpolation, which produces smoother transitions. The other choices use their named interpolation methods directly. Default: bislerp; options: bislerp, nearest-exact, bilinear, bicubic, and area. This choice affects the character of the enlarged latent, not the tile layout.

bislerp_strength

Controls the blend only when upscale_method is bislerp. At 0.0, the result is entirely bicubic; at 1.0, it is entirely nearest-exact. Increasing the value gives the nearest-exact result more influence, which can produce a more defined appearance. It has no effect with the other methods. Default: 0.35; minimum: 0.0; maximum: 1.0; step: 0.05.

variance_matching

When enabled, adjusts the enlarged latent’s overall mean and standard deviation to match those of the incoming latent. This is intended to counter changes in the latent’s overall distribution caused by interpolation; it does not guarantee unchanged colors or contrast after later processing and decoding. When multi-stage scaling is active, the adjustment is applied at each stage. Default: true; options: true or false.

multi_stage

When enabled and scale_factor is greater than 2.0, enlarges the latent through successive steps of up to 2×, finishing at the aligned target dimensions. For factors of 2.0 or less, the node uses a single interpolation step regardless of this setting. Multiple steps require additional interpolation work and may produce a different result from one large step. Default: true; options: true or false.

noise_strength

Controls how much random noise is blended into the enlarged latent before it is tiled. The actual blend fraction is noise_strength × 0.2, so the maximum setting mixes in 20% noise rather than replacing the latent entirely. At 0.0, no noise is generated or mixed. Default: 0.0; minimum: 0.0; maximum: 1.0; step: 0.01.

seed

Sets the random seed used to generate noise, making the noise pattern repeatable for the same relevant settings. It has no visible effect when noise_strength is 0.0. Default: 0; minimum: 0; maximum: 18446744073709551615.

tile_size

The requested tile width and height in the node’s calculated pixel-space dimensions. Larger tiles generally mean fewer tiles; smaller tiles generally mean more tiles. If adaptive sizing is enabled, the effective tile width and height may differ from this setting. Default: 1024; minimum: 512; maximum: 4096; step: 64.

overlap

The requested shared area, in calculated pixel-space units, between neighboring tiles. Overlap gives downstream tiled workflows room to handle tile boundaries, though the node itself does not merge or blend tiles. Tile spacing is based on effective tile size minus overlap; edge positioning and alignment can affect the overlap that results at a particular boundary. Default: 128; minimum: 64; maximum: 256; step: 64.

overlap_feather_rate

A feathering value passed through the pipeline metadata for downstream use. Its tooltip describes feather width as overlap × overlap_feather_rate; for example, an overlap of 64 and a rate of 2.0 indicate a feather width of 128. This node does not itself feather or merge the tiles, so changing the rate does not alter its tile samples. Default: 2.0; minimum: 0.1; maximum: 4.0; step: 0.1.

adaptable_tile_size

When enabled, allows the node to choose effective tile widths and heights separately near the requested tile_size. It tries to reduce coverage beyond the enlarged dimensions while respecting its aspect-ratio setting and alignment grid. When disabled, it starts with the requested square tile size. Default: true; options: true or false.

adaptable_max_deviation_ratio

Sets how far adaptive tile dimensions may be considered from tile_size. The node multiplies the tile size by this ratio, then rounds that allowance down to a multiple of pixel_alignment. A larger value gives the tile-size search more flexibility; 0.0 allows no deviation. Default: 0.25; step: 0.05. The source specifies no minimum or maximum for this input.

adaptable_max_aspect_ratio

Limits how rectangular the adaptively selected tile dimensions should be: 1.0 describes a square, while the default 1.33 permits approximately a 4:3 shape. This setting matters only with adaptable_tile_size enabled. Alignment and coverage adjustments occur after the aspect-ratio check, so it should not be treated as an unconditional guarantee about final dimensions. Default: 1.33; step: 0.01. The source specifies no minimum or maximum for this input.

pixel_alignment

Sets the grid used to align calculated dimensions, tile positions, and tile sizes. The node also multiplies the incoming latent’s width and height by this value when reporting original dimensions and calculating the target. Changing it therefore changes the node’s pixel-space calculations, not merely the neatness of tile edges; use a value consistent with the latent and the rest of your workflow. Default: 8; minimum: 8; maximum: 256; step: 8.

Latent Upscale then Crop to Tiles Output Parameters:

tiled_latents

A LATENT containing crops of the enlarged latent, arranged as a batch. Tiles are collected in row-by-row position order for each incoming batch item. This is the output to connect to a compatible downstream tiled-latent processor. Its tile count is the number of tile positions multiplied by the incoming batch size.

full_latent

A LATENT containing the complete enlarged samples before tile cropping. It includes any enabled variance matching and noise blending. Use it when a downstream node needs the whole enlarged latent rather than individual crops.

original_tiled_latents

A LATENT containing reference crops taken from the incoming, unscaled latent. The node scales each enlarged tile’s position and dimensions back toward the original dimensions, then aligns and bounds the crop. These crops are collected in the same batch-item and tile-position order as tiled_latents; they are not themselves upscaled or noise-blended. Their dimensions can differ from those of the enlarged tiles.

mira_image_tiled_upscaler_pipeline

A mira_image_tiled_upscaler_pipeline value containing seven items in this order: enlarged width, enlarged height, effective tile width, effective tile height, overlap, overlap feather rate, and pixel alignment. Pass it to compatible downstream nodes that need this tiling information. The feather rate is metadata here, not an indication that feathering has already been applied.

mira_itu_pipeline_info

A readable STRING summarizing the enlarged dimensions, total number of tiles across the batch, effective tile dimensions, overlap, feather rate, requested tile size, pixel alignment, achieved and requested scale, interpolation method, and tile positions per batch item. It is useful for checking what the node actually calculated, particularly when alignment or adaptive sizing changes the result.

original_tile_size

An INT containing the requested tile_size value, not the effective adaptive tile width or height. Use the pipeline value or information string when you need the effective dimensions.

original_width

An INT containing the incoming latent width multiplied by pixel_alignment. It reports the original width according to this node’s pixel-space calculation; it is not measured from a decoded image.

original_height

An INT containing the incoming latent height multiplied by pixel_alignment. Like original_width, it follows the selected alignment value and is not measured from a decoded image.

Latent Upscale then Crop to Tiles Usage Tips:

  • Start with bislerp, bislerp_strength 0.35, and variance_matching enabled. Adjust the blend toward 0.0 for a smoother interpolated latent or toward 1.0 for more nearest-exact influence, then judge the result after your normal downstream processing.
  • Leave noise_strength at 0.0 when you want interpolation without added randomness. When testing noise, change it gradually and keep the same seed so you can compare settings using a repeatable noise pattern.
  • For an enlargement above 2×, try the default multi_stage setting first. Disable it when you specifically want to compare against a single interpolation step.
  • Check mira_itu_pipeline_info after changing scale_factor, tile_size, or pixel_alignment. It shows the achieved scale and effective tile dimensions, which can differ from your requested settings.
  • Keep pixel_alignment consistent with the latent format expected by the rest of your workflow. Increasing it changes calculated dimensions and can substantially change the tile layout.
  • Use adaptable_tile_size when tile dimensions close to your requested size are acceptable. Turn it off when a square tile size is more important than adapting the layout; still check the resulting edge crops and tile dimensions.
  • Before sending tiles to a downstream node that expects one uniform batch tensor, check that your chosen dimensions produce equally sized tiles. This node stacks its crops into a single tensor, so unequal edge tiles can stop execution rather than produce a usable output.

Latent Upscale then Crop to Tiles Common Errors and Solutions:

Scale factor adjusted for pixel alignment

  • Explanation: This is a log warning, not a failure. The requested enlarged dimensions were rounded down to the selected alignment grid, making the achieved scale differ from the requested scale by more than the node’s 0.01 threshold.
  • Solution: Check the achieved scale in mira_itu_pipeline_info. Use a scale factor that produces aligned dimensions, or keep the adjusted result if it fits your workflow.

stack expects each tensor to be equal size

  • Explanation: Tile crops can have different dimensions near an edge, especially when the full dimensions are smaller than a tile or edge alignment changes a crop. The node attempts to combine all crops into one tensor, which requires matching shapes. This can occur for enlarged tiles or original reference tiles.
  • Solution: Adjust tile_size, scale_factor, or pixel_alignment and try again. Check the effective tile size and full dimensions in the information output; favor settings that produce uniform crops for your image dimensions.

stack expects a non-empty TensorList

  • Explanation: The enlarged-tile list is empty, so the node has nothing to stack. This can happen if the selected alignment and dimensions result in tile widths or heights of zero.
  • Solution: Use an appropriate pixel_alignment for the incoming latent, and check that the calculated full dimensions and tile dimensions are large enough to produce at least one aligned crop.

ZeroDivisionError: division by zero

  • Explanation: Tile placement divides by effective tile size minus overlap. Although the displayed tile_size and overlap ranges normally keep those values apart, an unsuitable adaptive setting could produce an effective tile dimension equal to the overlap.
  • Solution: Disable adaptable_tile_size to test the layout, or adjust the adaptive settings so the effective tile width and height remain larger than overlap.

KeyError: 'samples'

  • Explanation: The incoming value does not contain the samples data that this node reads from a LATENT.
  • Solution: Connect a compatible LATENT-producing node to latent rather than an image or another data type.

Expected ... 4 dimensions or a tensor shape unpacking error

  • Explanation: The node expects latent samples shaped as a batch with channels, height, and width. Data with a different number of dimensions cannot be interpreted by its resizing and cropping steps.
  • Solution: Check the node feeding latent and provide a standard, compatible LATENT.

RuntimeError mentioning a random-number generator and device

  • Explanation: When noise is enabled, the node creates a seeded generator and requests noise on the latent’s device. Some device and generator combinations may not work together.
  • Solution: Set noise_strength to 0.0 to confirm whether noise generation is the cause, then use a compatible execution device or environment before re-enabling noise.

Latent Upscale then Crop to Tiles Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_MiraSubPack
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Latent Upscale then Crop to Tiles