Local AI Image Upscaling (2026): ESRGAN, GFPGAN & 4x
Want to go deeper than this article?
Free account unlocks the first chapter of all 25 courses — RAG, agents, MCP, voice AI, MLOps, real GitHub repos.
Go from reading about AI to building with AI 25 structured courses. Hands-on projects. Runs on your machine. Start free.
The best local AI image upscaler for most people is Real-ESRGAN (xinntao's open-source project, BSD-3-Clause), and the easiest way to run it is Upscayl, a free desktop app for Windows, macOS and Linux. For AI art, add a 4x ESRGAN model such as 4x-UltraSharp (note: its licence is non-commercial). For faces, run GFPGAN v1.4 or CodeFormer as a second pass. Use SwinIR when you need denoising and JPEG-artifact removal along with the upscale. The model files are small, from 4.9 MB to 377 MB. Everything runs offline, and your images never leave the machine. The trade-off against Topaz Gigapixel ($29/month or $149/year on Topaz's pricing page, November 2, 2026): local tools are free and private but ask you to pick the right model for each image, while Topaz is one-click and paid.
If you already generate images with Stable Diffusion or FLUX, upscaling is the missing finishing step. It turns a 1024×1024 generation into a clean 4K print without re-rolling the prompt. This guide covers the models that matter, the apps and GitHub projects that run them, the ComfyUI and Forge nodes, what actually uses your VRAM, and when a paid upscaler is still worth it.
What is the best local AI image upscaler in 2026?
There is no single winner. The right model depends on the image. The short version:
- Photos and mixed content: Real-ESRGAN (
RealESRGAN_x4plus), the most widely used general 4x upscaler. - AI art, illustrations, sharp detail: a 4x ESRGAN-architecture model such as 4x-UltraSharp. Check its non-commercial licence if you sell the output.
- Anime and line art:
RealESRGAN_x4plus_anime_6B, a smaller model tuned for anime. - Restoration (denoise + de-JPEG + upscale): SwinIR, a Swin Transformer restoration model.
- Faces: GFPGAN v1.4 or CodeFormer as a second pass, never as the main upscaler.
- Maximum invented detail: a diffusion-based upscaler (Ultimate SD Upscale, or SUPIR). It repaints the image at the new size, which can add detail that was never there.
You keep several models around because upscalers are specialists. A model trained to sharpen photo texture invents crunchy "hair" detail on a smooth illustration. An anime model smears skin texture in photos. Keeping three or four files on disk lets you match the tool to the image, and that is the biggest quality lever in local upscaling.
Reading articles is good. Building is better.
Free account = the first chapter of all 25 courses, with a per-chapter AI tutor. No card.
The easiest way: free one-click upscaler apps
If you search "local upscaler" or "free AI upscaler", you probably want an app, not a Python environment. Two open-source apps cover it:
| App | What it is | Runs on | Licence | Notes |
|---|---|---|---|---|
| Upscayl | Desktop app: drop an image in, pick a model, click | Windows 10+, macOS 12+, Linux | AGPL-3.0 | Uses Real-ESRGAN-style models on a Vulkan backend (upscayl-ncnn, also available as a CLI). Ships community models including UltraSharp, Remacri and HFA2k; batch mode; custom models. Needs a Vulkan-capable GPU, and its FAQ says most integrated GPUs and CPUs will not work |
| chaiNNer | Node-based image-processing app (like ComfyUI, but for upscaling chains) | Windows, macOS, Linux | GPL-3.0 | Loads PyTorch, NCNN and ONNX upscale models; chain upscale, face restore, resize and save in one graph; v0.26.1 released October 27, 2026 |
Both are free and offline. Upscayl is the "just make it bigger" choice. chaiNNer is for when you want a repeatable pipeline, such as upscale, face-fix, downscale to 2x and export, applied to a whole folder.
Upscale an image locally in three steps (command line)
The fastest route with no install is Real-ESRGAN's portable ncnn-vulkan build. It is a single download (45.5 MB for Windows, 51.8 MB for macOS on the project's release page), with the models included. Because it uses Vulkan, it runs on NVIDIA, AMD and Intel GPUs alike.
# 1. Download realesrgan-ncnn-vulkan for your OS from the Real-ESRGAN releases page and unzip it
# 2. Upscale one image 4x with the general photo model
./realesrgan-ncnn-vulkan -i input.jpg -o output.png -n realesrgan-x4plus
# 3. Or a whole folder, with the anime model
./realesrgan-ncnn-vulkan -i ./in -o ./out -n realesrgan-x4plus-anime
If you want face enhancement and tiling controls, use the Python version instead:
git clone https://github.com/xinntao/Real-ESRGAN && cd Real-ESRGAN
pip install basicsr facexlib gfpgan && pip install -r requirements.txt && python setup.py develop
python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs --face_enhance --tile 512
--face_enhance runs GFPGAN on detected faces, and --tile splits large images into tiles so they fit in memory. If you run out of memory, lower the tile size.
AI image upscalers on GitHub: the projects that matter
Almost every local upscaler, including the commercial wrappers, is built on a handful of open projects. Here they are, with what each repository actually ships:
| Project (GitHub) | What it gives you | Licence | Model files (official release) |
|---|---|---|---|
| xinntao/Real-ESRGAN | The reference general upscaler, Python + ncnn-vulkan builds | BSD-3-Clause | x4plus 67.0 MB · x2plus 67.1 MB · anime_6B 17.9 MB · general-x4v3 4.9 MB |
| JingyunLiang/SwinIR | Transformer restoration: super-resolution, denoising, JPEG artifacts | Apache-2.0 | real-world x4: 67.1 MB (M) / 142.5 MB (L) |
| TencentARC/GFPGAN | Face restoration with a StyleGAN2 prior | see repo | GFPGANv1.4 348.6 MB |
| sczhou/CodeFormer | Face restoration with an adjustable fidelity weight | see repo (non-commercial terms) | codeformer.pth 376.6 MB |
| upscayl/upscayl | Desktop app | AGPL-3.0 | ships its own model set |
| chaiNNer-org/chaiNNer | Node-based upscaling app | GPL-3.0 | bring your own models |
| ssitu/ComfyUI_UltimateSDUpscale | Tile-and-repaint upscaling inside ComfyUI | GPL-3.0 | uses your ESRGAN + checkpoint |
| Fanghua-Yu/SUPIR | Diffusion-based restoration on an SDXL backbone | see repo | large; needs an SDXL checkpoint |
Sizes are the release assets on each repository, read through the GitHub API on November 2, 2026. Repositories marked "see repo" do not declare a standard licence in GitHub's metadata. Read the LICENSE file before any commercial use.
Run this on your own machine and stop paying every month
Pay once and keep it. No renewal, no per-token bill, and nothing you feed it ever leaves your hardware.
Local upscaling models compared (file size, scale, best use)
ESRGAN-family models (Real-ESRGAN, 4x-UltraSharp, Remacri and others) are interchangeable in the same "load upscale model" node. They share the network shape and differ in training data.
| Model | Architecture | Native scale | File size | Licence | Best for |
|---|---|---|---|---|---|
| Real-ESRGAN x4plus | ESRGAN (RRDBNet) | 4x (x2plus for 2x) | 67.0 MB | BSD-3-Clause | General photos, mixed content |
| Real-ESRGAN x4plus_anime_6B | ESRGAN (6 blocks) | 4x | 17.9 MB | BSD-3-Clause | Anime, line art, flat colour |
| realesr-general-x4v3 | compact ESRGAN | 4x | 4.9 MB | BSD-3-Clause | Fast general use, weak GPUs |
| 4x-UltraSharp | ESRGAN | 4x | 67.0 MB (.pth) | CC BY-NC-SA 4.0 (non-commercial) | AI art, crisp edges, illustration |
| SwinIR (real-world SR) | Swin Transformer | 2x / 4x | 67.1 MB (M) / 142.5 MB (L) | Apache-2.0 | Restoration: denoise + de-JPEG + SR |
| GFPGAN v1.4 | StyleGAN2 face prior | face-only pass | 348.6 MB | see repo | Repairing faces after an upscale |
| CodeFormer | Codebook Transformer | face-only pass | 376.6 MB | see repo | Faces with adjustable fidelity |
A few notes. Real-ESRGAN, 4x-UltraSharp and the other ESRGAN models upscale by a fixed factor, usually 4x. For 2x, either upscale 4x and downscale, or use the dedicated RealESRGAN_x2plus weights. GFPGAN and CodeFormer are not general upscalers. They only rebuild faces, so you run them after a normal upscale, or through Real-ESRGAN's --face_enhance flag, which calls GFPGAN for you. 4x-UltraSharp's licence is CC BY-NC-SA 4.0 (on its Hugging Face page), so check it before using the model for paid client work. The BSD-licensed Real-ESRGAN models carry no such restriction.
How much VRAM does local upscaling need?
Much less than image generation, but the number that matters is not the model size. The weights are tiny: 4.9 MB to 142.5 MB for the upscalers above. What fills memory is the activations, the intermediate feature maps the network computes over the image. They grow with the pixel count of what you process at once.
Here is the arithmetic. RRDBNet (Real-ESRGAN, 4x-UltraSharp) works on 64-channel feature maps at the input resolution. One such map for a 1024×1024 input is 1024 × 1024 × 64 channels × 4 bytes = 268 MB at FP32, and the network keeps several alive at once. The 4096×4096 RGB output alone is another 201 MB. That is why a full-frame 4x pass on a large image can run out of memory on a small card, while the same model on 512×512 tiles runs almost anywhere.
The fix is tiling: split the image into tiles (for example 512×512), upscale each one, then stitch them back together. Real-ESRGAN exposes it as --tile. In ComfyUI, the UltimateSDUpscale node tiles automatically, and other image nodes fall back to tiled processing when VRAM runs short. Tiling is slower, but memory stays flat however large the output is.
| Task | What drives memory | Practical guidance |
|---|---|---|
| ESRGAN 4x on a small image | Activations at the input size | Runs on modest GPUs, and on the CPU (slower) with the Python build |
| ESRGAN 4x to a very large output | Activations grow with pixels | Use --tile 512 or lower; memory stays flat |
| SwinIR restoration | Transformer attention per window | Heavier than ESRGAN at the same size; tile it |
| Face restore (GFPGAN / CodeFormer) | A cropped, aligned face (512×512) | Small and fixed, whatever the photo size |
| Diffusion upscalers (Ultimate SD Upscale, SUPIR) | The diffusion checkpoint itself | Same VRAM as generating with that checkpoint: SDXL-class for SUPIR |
| No GPU at all | System RAM | The Python build runs on CPU, much slower; Upscayl needs a Vulkan GPU |
We are not printing seconds per image. Upscaling time depends on the input size, the tile size and the GPU, and we have not timed these models on our own hardware. Time one image on your machine, then multiply by the number in your folder. That estimate will be more accurate than any table.
How does ComfyUI handle upscaling? (latent vs model upscale)
ComfyUI gives you two fundamentally different ways to make an image bigger, and mixing them up is the most common beginner mistake. For the node-graph basics, start with our ComfyUI complete guide. The upscaling-specific distinction is this:
- Model upscale (pixel space): the Load Upscale Model + Upscale Image (using Model) nodes. You feed in a finished, decoded image and an ESRGAN model (Real-ESRGAN, 4x-UltraSharp), and it reconstructs detail at 4x. This is the everyday upscaler for an already-rendered image.
- Latent upscale: the Upscale Latent / Upscale Latent By nodes work on the latent tensor before it is decoded to pixels, mid-generation. It is faster and keeps the generation coherent, but on its own it adds no detail. You normally follow it with a second sampler pass at low denoise so the model "repaints" the new resolution. A latent upscale on an already-decoded image just enlarges pixels.
For the best of both, the UltimateSDUpscale node (ssitu's ComfyUI port of Coyote-A's Ultimate SD Upscale) combines them. It upscales with an ESRGAN model, splits the result into tiles, and runs a low-denoise img2img pass on each tile to add real new detail. Because it tiles, it finishes large outputs on limited VRAM.
How do you upscale in Forge or Automatic1111?
If you prefer a classic WebUI, both Automatic1111 and the faster Forge fork offer the same routes. For setup, see our Automatic1111 guide and the leaner SD Forge guide.
- Hires. fix (txt2img): built into the generation tab. It renders at your base size, upscales with the upscaler you pick (R-ESRGAN 4x+ or a 4x ESRGAN model), then runs a second diffusion pass at the denoise you set (around 0.3-0.5) to sharpen. It is the simplest "make my generation bigger and better" toggle.
- Extras tab: a pure, non-diffusion upscale. Drop in any image, pick an upscaler (Real-ESRGAN, SwinIR) and a scale, and it runs the model directly, with optional GFPGAN or CodeFormer face restoration. Good for photos and images you did not generate.
- Ultimate SD Upscale (extension): Coyote-A's tile-and-inpaint script for big, detailed results on any GPU. It splits the image into tiles and runs img2img per tile at a denoise you choose, with fewer seams than the old built-in "SD upscale". One caveat: some users report it does not activate correctly under Forge and falls back to plain img2img, while it works reliably in A1111. Test it on your build before trusting it with a batch.
Whether you generate with Stable Diffusion or FLUX locally, the upscale step is the same: produce the base image, then run it through one of these passes.
How do you fix faces after upscaling?
General upscalers rebuild texture, not identity, so small or low-quality faces often come out smudged. GFPGAN and CodeFormer are face-specific restorers you run after the main upscale.
- GFPGAN v1.4 uses a StyleGAN2 facial prior to rebuild realistic faces. Its repository notes that v1.4 gives slightly more detail and better identity than v1.3. It is the simplest one-shot option, and it is what Real-ESRGAN's
--face_enhanceflag uses. - CodeFormer adds a fidelity weight w from 0 to 1. A lower w gives higher visual quality, because the model invents more. A higher w stays closer to the original face, with better identity and less invention. That control makes CodeFormer the better choice when someone's actual likeness matters, as in old-photo restoration.
A practical rule: start with CodeFormer at w ≈ 0.5-0.7 for real people, and use GFPGAN when you just want a quick, good-looking face on an AI-generated portrait. Both work on a cropped, aligned face region, so their memory use stays small whatever the size of the photo.
Photo restoration: a real local use case
Beyond making AI art bigger, the same tools restore damaged real photos: old scans, blurry phone shots, JPEG-mangled images. A reliable local pipeline is SwinIR (or Real-ESRGAN) to denoise and upscale → CodeFormer to repair faces. SwinIR is built for this. Its paper (Liang et al., ICCV Workshops 2021) reports state-of-the-art results on super-resolution, denoising and JPEG-artifact reduction at the time, beating earlier methods by up to 0.14-0.45 dB with up to 67% fewer parameters. Because everything runs locally, you can restore family photos without uploading them to anyone's server.
For heavily degraded photos, diffusion-based restorers such as SUPIR go further: they regenerate plausible detail using an SDXL backbone. That is powerful, and it is also exactly the risk. The detail is invented, so on a real person's photo, compare the result with the original before you trust it.
4x vs 2x: which scale should you pick?
Upscale by the smallest factor that reaches your target resolution. A 4x pass invents the most new detail, but on a clean source it can over-sharpen and add texture that was not there.
- 2x when the source is already fairly large or high quality (a 1024px AI render going to 2K). Less invention, more faithful.
- 4x when the source is small or you need a big print (a 512px image going to 2048px). More reconstruction, so watch for artifacts on flat areas.
- Chained (2x then 2x, or a model upscale followed by a low-denoise diffusion tile pass) when you want maximum size with controlled detail. This is what Ultimate SD Upscale automates.
Local upscalers vs Topaz Gigapixel (cost and privacy)
The obvious commercial comparison is Topaz Gigapixel. It is excellent and one-click, but it is a subscription. On November 2, 2026, Topaz's pricing page listed Gigapixel at $29/month or $149/year, Gigapixel Pro at $499/year, and Gigapixel inside the Topaz Studio bundle ($399/year). No perpetual licence was offered.
| Factor | Local (Real-ESRGAN, SwinIR, Upscayl, etc.) | Topaz Gigapixel |
|---|---|---|
| Cost | Free, open source | $29/mo or $149/yr (Topaz pricing page, Nov 2, 2026) |
| Privacy | Fully offline; images never leave your PC | Local app, but paid and account-bound |
| Ease | Upscayl is one-click; otherwise pick a model per image | One-click, automatic model choice |
| Hardware | Small models; ncnn-vulkan runs on NVIDIA, AMD and Intel GPUs | Optimised desktop app |
| Batch | Free, unlimited, scriptable | Included |
| Commercial use | BSD/Apache models: yes; check UltraSharp and the face models | Per Topaz licence |
The honest verdict: if you upscale now and then and value zero cost plus full privacy, the local tools win outright on hardware you already own. If you upscale professionally at volume and want a polished one-click result without choosing models, Topaz's subscription can be worth it. Many people do both: local tools for everyday AI-art finishing, Topaz for a handful of client-grade restorations.
Key Takeaways
- Real-ESRGAN is the best general local upscaler, and Upscayl is the easiest way to run it. Add 4x-UltraSharp for AI art (non-commercial licence) and the anime 6B model for line art.
- The models are tiny (4.9-377 MB), and memory goes to activations. Use tiling (
--tile, UltimateSDUpscale) to keep large outputs within VRAM. - In ComfyUI, "model upscale" (pixel) and "latent upscale" are different tools. Use model upscale for finished images. Latent upscale belongs mid-generation, followed by a sampler pass.
- GFPGAN v1.4 and CodeFormer fix faces after the main upscale. CodeFormer's fidelity weight (lower means more invention, higher means more identity) makes it the pick for real people.
- Local beats Topaz on cost and privacy. Gigapixel is $29/month or $149/year with no perpetual option (Topaz, Nov 2, 2026). The local tools are free and never upload your images.
Next Steps
- Generating images first? Set up the engine with our Stable Diffusion local install guide, then add an upscale pass.
- Prefer a node-based workflow? The ComfyUI complete guide builds the upscale graph from scratch.
- Want a classic WebUI? Compare the original interface in our Automatic1111 guide with the faster SD Forge guide.
- Using FLUX instead of SD? See FLUX local image generation. The upscale step plugs in the same way.
- Choosing a GPU for image work? Our best GPU for image generation ranking covers VRAM and published timings.
Go from reading about AI to building with AI
25 structured courses. Hands-on projects. Runs on your machine. Start free.
Liked this? 25 full AI courses are waiting.
From fundamentals to RAG, agents, MCP servers, voice AI, and production deployment with real GitHub repos. First chapter free, every course.
Build Real AI on Your Machine
RAG, agents, NLP, vision, and MLOps - chapters across 25 courses that take you from reading about AI to building AI.
Want the structured version?
Hands-on courses on local AI, from $8.99 a month. The first chapter of each is free.
Keep going
Comments (0)
No comments yet. Be the first to share your thoughts!
