Nodes/ComfyUI_StarNodes/⭐ Star Model Latent Upscaler
ComfyUI Node

⭐ Star Model Latent Upscaler

The latent upscaler that keeps your hires-fix honest

By Starnodes2024·Created 2 years ago·Updated a day ago· 102
⭐ Star Model Latent Upscaler
  • VAE_INPUT
  • LATENT_INPUT
  • IMAGE
  • OUTPUT VAE
  • IMAGE
  • LATENT
  • WIDTH
  • HEIGHT
VAE_OUTae.safetensors
VAE_Devicecpu
UPSCALE_MODELDefault
UPSCALE_MODEBy Longest Side
OUTPUT_LONGEST_SIDE2048
MEGAPIXELS4
INTERPOLATION_MODEbicubic

You know the drill: you generate at native resolution, then want it bigger, and the stock way is to throw a KSampler at the latent again. That's a hires-fix, and it's fine, but it's also a round trip through pixel space that the Star Model Latent Upscaler (class Starupscale) skips. This node runs an actual upscale model, resizes to a target size, then encodes straight back into latent space with a VAE you choose - all in one box. If you're doing a second diffusion pass at higher resolution, this is the thing sitting between the two samplers.

It's part of the ComfyUI_StarNodes pack (the ⭐StarNodes collection from Starnodes2024), which you'll find under ⭐StarNodes/Image And Latent after install.

How it works

Three paths, picked automatically from whatever you plug in:

  • IMAGE in - it upscales the image directly.
  • VAE_INPUT + LATENT_INPUT in - it decodes the latent to pixels, upscales, then re-encodes. This is the hires-fix path.
  • Nothing in - it just hands you a configured VAE and a tiny default image, which is a way to reuse the node as a VAE provider.

Whatever path you're on, the flow is: optionally run UPSCALE_MODEL (any ESRGAN-family model in your models/upscale_models folder, or "Default" for plain resize), then resize so the longest side lands on OUTPUT_LONGEST_SIDE, keeping aspect ratio and rounding dimensions to multiples of 16 so the VAE doesn't choke. Finally it encodes to latent with the VAE you picked. You get three outputs: OUTPUT VAE, IMAGE, and LATENT - wire the latent into your second sampler.

The inputs that matter

Honestly only three of them:

  • VAE_OUT - which VAE does the encoding. The dropdown lists your installed VAEs and defaults to ae.safetensors, which is the Flux VAE. If you're upscaling SDXL, switch this to your SDXL VAE; using the wrong one here is the classic way to get weird colors on the second pass.
  • UPSCALE_MODEL - an ESRGAN upscaler like 4x-UltraSharp if you want the model to add texture, or Default if you just want a clean resize. This is the "more pixels vs more detail" fork; for most hires-fix work a sharp ESRGAN model is the right call.
  • OUTPUT_LONGEST_SIDE - the target, in pixels. 2048 is a fine default for SDXL second passes.

VAE_Device (cpu vs cuda) and INTERPOLATION_MODE (bicubic is right 95% of the time) you can leave alone.

Installing it

It ships inside the StarNodes pack, so install once for all of them:

  • ComfyUI Manager: search Starnodes and install.
  • Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Starnodes2024/ComfyUI_StarNodes

Then restart ComfyUI. The pack's requirements.txt pulls opencv-python, psd-tools, scikit-learn and friends automatically - none of which this node needs, so don't panic if the installer churns through a few.

Common issues

The big one is VAE mismatch - Flux VAE on an SDXL upscale gives you that sickly green/brown cast on the second pass. Fix is in the VAE_OUT dropdown, not the model. Second: if your output dimensions aren't coming out exactly as typed, that's the /16 rounding doing its job; it's intentional and correct for latent space. And remember the upscale model only adds plausible detail - it can't invent texture that was never there, so don't expect miracles from a 512px source at 4x.

The pack's other upscaler, Star SD Upscale Refiner, is the all-in-one alternative if you want checkpoint+LoRA+ControlNet Tile in one node. This one's the leaner, more composable pick.

Category⭐StarNodes/Image And Latent

Inputs (10)

NameTypeDefaultDescription
VAE_OUTCOMBOae.safetensors1 options: Default
VAE_DeviceCOMBOcpu1 options: cpu
UPSCALE_MODELCOMBODefault1 options: Default
UPSCALE_MODECOMBOBy Longest Side2 options: By Longest Side, By MP
OUTPUT_LONGEST_SIDEINT204816–99968
MEGAPIXELSCOMBO415 options: 1, 2, 3, 4, 5, 6, +9
INTERPOLATION_MODECOMBObicubic4 options: bicubic, bilinear, nearest, nearest exact
VAE_INPUToptVAE
LATENT_INPUToptLATENT
IMAGEoptIMAGE

Outputs (5)

NameTypeDescription
OUTPUT VAEVAE
IMAGEIMAGE
LATENTLATENT
WIDTHSTRING
HEIGHTSTRING