Image_UpscaleModel
An upscale-model pass and a pixel resize pass, in one node
- image
- image
Two upscale mechanisms most people bolt together with two separate nodes - an ESRGAN-family model pass for real detail, and a plain pixel resize for hitting an exact final size - collapsed into one. The node's own logic is refreshingly explicit about the order: run the model scale first if a model is selected, then apply the pixel resize on top of whatever the model produced. Skip the model and you get a pure pixel resize; skip the pixel step and you get a pure model upscale.
Why you'd combine the two
An upscale model like a 4x-UltraSharp ESRGAN checkpoint is a fixed multiplier - you don't get to ask it for 1.37x, you get 4x (or whatever the model was trained at) and that's it. If your actual target size isn't a clean multiple of what the model gives you, you need a second pass to land on the exact number - and doing that with the model's own output as the source (rather than resizing your original first, then running the model) keeps the detail the model actually added intact for as much of the pipeline as possible. This node's whole reason to exist is doing that two-step in one place instead of two nodes and a wire.
The inputs and outputs that matter
upscale_model- a dropdown reading fromComfyUI/models/upscale_models. It'll showNoneif nothing's installed there - this node doesn't ship a model, you have to put one in yourself (a.pthor.safetensorsESRGAN-family checkpoint, e.g. 4x-UltraSharp).pixel_upscale- the interpolation algorithm for the pixel pass:None(skip it - pure model upscale),nearest-exact,bilinear(default),area,bicubic,lanczos.pixel_mode-rescale(multiply by a factor) orresize(target the long edge directly, default).pixel_rescale(FLOAT, 0.1–64, default 1) - the multiplier used inrescalemode.pixel_resize_long_side(INT, 1–48000, default 1024) - the target long-edge size used inresizemode.rounding_modulus(INT, 0–1024, default 8) - rounds the final dimensions to a multiple of this, matching the VAE downsample factor most diffusion pipelines expect.
One output: image, the result of whichever combination of passes you configured.
How to install it
ComfyUI Manager: search ComfyUI-Apt_Preset, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
pip install -r requirements.txt
install.bat is Windows-only; on Linux (comfy.icu's executor included) run pip install -r requirements.txt directly. The model side needs an actual upscale checkpoint - nothing ships with the pack - drop one into ComfyUI/models/upscale_models and restart to see it in the dropdown.
Common issues
The single most common "why isn't this working" is upscale_model showing only None - that means ComfyUI didn't find any checkpoint in models/upscale_models at startup. Download one (4x-UltraSharp is the community's general-purpose default, free and non-generative - it adds no hallucinated detail, which matters if you need predictable output) and restart ComfyUI; the dropdown only refreshes on launch.
Second: if you're chasing more detail on a genuinely soft or damaged source, a plain ESRGAN model won't get you there - those are pixel upscalers, not restorers, and they can't invent detail that isn't already in the source. For real restoration you'd need a generative upscaler (SUPIR, SeedVR2) elsewhere in your workflow; this node's model slot is built for the interpolation-style ESRGAN family, not that class of model.
Standard pack-wide note: a fresh ComfyUI-Apt_Preset install pulls a large requirements.txt (onnxruntime, gguf, transparent-background, scenedetect, and more, for the pack's other 100+ nodes) - there's a documented case of that failing to import. If the whole pack throws IMPORT FAILED, check the ComfyUI console for the actual missing-package error before assuming this node is the cause.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| upscale_model | COMBO | 1 options: None | |
| pixel_upscale | COMBO | bilinear | 6 options: None, nearest-exact, bilinear, area, bicubic, lanczos |
| pixel_mode | COMBO | resize | 2 options: rescale, resize |
| pixel_rescale | FLOAT | 1.00.1–64 | — |
| pixel_resize_long_side | INT | 10241–48000 | — |
| rounding_modulus | INT | 80–1024 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |