ComfyUI Node

ApplyResAdapterUnet

Make your old 512 SD 1.5 checkpoint finally behave at 1024px

By blepping·Created 2 years ago·Updated about a year ago· 31
ApplyResAdapterUnet
  • model
  • MODEL
unet_name
strength1.00

Every SD 1.5 checkpoint has a dirty secret: it was trained at 512x512. Push it to 768 or 1024 in one pass and you get the classic festival of duplicated heads, stretched limbs, and tiling - the model literally doesn't know how to fill a bigger canvas. The usual answer is a hi-res fix, which means rendering twice. This node is the other answer: patch the model itself with ByteDance's ResAdapter so it generates at high resolution directly, in a single pass.

What ResAdapter actually is

ResAdapter is a 2024 ByteDance method (github.com/bytedance/res-adapter) with two pieces: a "resolution normalization" patch for the UNet, and a companion LoRA. The normalization file holds re-parameterized weights that stop the model's feature magnitudes from exploding as the latent gets bigger - that's the instability behind all the duplicated anatomy. The LoRA keeps the style and composition consistent while the resolution changes. Load both and a 512-trained model will happily emit a 1024x1024 image in one denoising pass. No second render, no extra inference time. It even downscales, which is genuinely fun for pixel-art people.

What this node does is narrow but real: it applies the UNet patch. ApplyResAdapterUnet reads a safetensors file from models/unet, converts its Diffusers-style keys to SD 1.5 naming with a hardcoded conversion map, then calls model.add_patches on a clone of your model. The math makes the strength input a blend dial: at 1.0 the patched weights are fully the normalized ones, at 0.0 the model is untouched, and negatives flip the blend. That's why the author says to experiment - you don't have to go all-in.

The inputs that matter

Only three, and two of them are trivial:

  • model - your SD 1.5 checkpoint as a MODEL, straight from a checkpoint loader.
  • unet_name - a dropdown of files in models/unet. It'll be empty until you drop resolution_normalization.safetensors in there, which trips everyone up the first time.
  • strength - FLOAT, default 1.0, goes down to -10. Start at 1.0, drop it toward 0.5 if the style shifts or things get weird.

The single output is a patched MODEL, which you feed into the KSampler exactly like the original. And yes - load resolution_lora.safetensors as a normal LoRA alongside it. They're designed to work together.

Installing it

ComfyUI Manager can probably find it if you search "ApplyResAdapterUnet", but this is a small personal pack, so the bulletproof route is:

cd ComfyUI/custom_nodes
git clone https://github.com/blepping/ComfyUI-ApplyResAdapterUnet

Restart ComfyUI. That's it - no requirements.txt, no heavy deps. The code only imports safetensors and ComfyUI's own folder_paths, both of which you already have. The real install is the models, from the ResAdapter Hugging Face repo:

# sd1.5/resolution_normalization.safetensors -> ComfyUI/models/unet/
# sd1.5/resolution_lora.safetensors          -> ComfyUI/models/loras/

Use the files under the sd1.5/ folder on huggingface.co/jiaxiangc/res-adapter. And read the README's SDXL note before you go down this road: for SDXL you only need the LoRA, so this node is SD 1.5-only territory. The conversion map is hardcoded for the SD 1.5 UNet anyway.

Where people get burned

The most common failure is the empty unet_name dropdown - the node scans models/unet, not models/checkpoints, and it won't populate until the file is there. Second: don't try to load resolution_normalization.safetensors with a checkpoint or LoRA loader; it's not a LoRA and it isn't a full model. Third: the author is upfront that above roughly 1024x1024 at full strength, ResAdapter "may be worse than nothing" - this extends your range, it doesn't make SD 1.5 an 8K generator. Keep expectations realistic.

Honest bottom line: this is a niche 2024-era tool for stubborn old 512-trained checkpoints. Plenty of modern SD 1.5 fine-tunes are already trained at higher resolutions and don't need it, and the official ResAdapter ComfyUI port exists too. But if you're stuck with a beloved 512 checkpoint and hate two-pass upscaling, this is a clean, dependency-free way to get single-pass high-res out of it. Author's words: experimental, no guarantees. Save a comparison workflow, not your hopes.

Categorymodel_patches

Inputs (3)

NameTypeDefaultDescription
modelMODEL
unet_nameCOMBO0 options:
strengthFLOAT1.00

Outputs (1)

NameTypeDescription
MODELMODEL