File size: 770 Bytes
695fbf0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# MagicUpscaleModule

Lightweight latent‑space upscaler that keeps shapes aligned to the VAE stride to avoid border artifacts.

## Overview
- Decodes latent to image, resamples with selected filter, and re‑encodes.
- Aligns target size up to the VAE spatial compression stride to keep shapes consistent.
- Clears GPU/RAM caches to minimize fragmentation before heavy resizes.

## Inputs
- `samples` (LATENT)
- `vae` (VAE)
- `upscale_method` in `nearest-exact | bilinear | area | bicubic | lanczos`
- `scale_by` (float)

## Outputs
- `LATENT` — upscaled latent
- `Upscaled Image` — convenience decoded image

## Tips
- Use modest `scale_by` first (e.g., 1.2–1.5) and chain passes if needed.
- Keep the same `vae` before and after upscale in a larger pipeline.