Meux ESRGAN Upscale
RealESRGAN without the Python scavenger hunt
- image
- IMAGE
The thing that usually stops people using RealESRGAN in ComfyUI isn't the model - it's the install. The basicsr dependency has a habit of breaking against newer torchvision, and the error is a wall of traceback that says nothing useful. This node is the antidote: drop a .pth file into your upscale models folder and it takes care of the rest, locally, with a dropdown instead of a Python saga.
RealESRGAN belongs to the boring-and-proud rung of upscaling: it adds pixels, not detail. If your image is already sharp and you just want it bigger, that's the right job - fast, predictable, no hallucinating new faces into the frame. If you want an AI to invent pores and fabric weave, that's a generative upscaler's job (SeedVR2, SUPIR), not this node's. Knowing which job you're doing saves you a lot of disappointment.
How it works
When the pack loads, the node scans ComfyUI's upscale_models folder (plus a couple of legacy spots) for .pth, .pt, and .safetensors files and fills the model_name dropdown. Pick one and it's loaded under the hood as an RRDBNet 4x model - always 4x - then the result is resized with Lanczos to whatever scale you actually asked for. That's why scale_mode goes all the way to 8x even though the network itself is a 4x upscaler.
It'll run either the standalone RealESRGAN package or the older realesrgan/basicsr stack, whichever is installed, and it ships a compatibility shim for the torchvision rgb_to_grayscale removal that breaks basicsr on newer installs. If you hit OOM, it quietly retries with smaller tiles, then falls back to CPU before giving up. Set free_gpu_after and it unloads the model and empties VRAM after the batch.
The inputs that matter
model_name- the dropdown, populated from yourupscale_modelsfolder. This is the one that'll be empty on first run.scale_mode-2x/3x/4x/6x/8x, orcustomto usecustom_scale(a float from 0.1 to 8.0).image- the batch you're upscaling; it handles a whole batch in one pass.model_path(optional) - an absolute path override if your weights live somewhere exotic.refresh_model_list(optional) - re-scans the folder if you dropped in a new model while ComfyUI was running.
Output is a single IMAGE at the requested scale, ready to wire into a save node.
Installing it
This is one node in the Baidu Meux ComfyTools pack (tracked on comfy.icu as "MultiSaveImage Node"), so install the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/fchangjun/Comfyui_MultiSaveImage
cd Comfyui_MultiSaveImage
pip install -r requirements.txt
Or search "Baidu Meux ComfyTools" in ComfyUI Manager and let it handle it. Restart ComfyUI. The catch is the model file - the node does not download one for you. Grab RealESRGAN_x4plus.pth or the community-favorite 4x-UltraSharp.pth, drop it in ComfyUI/models/upscale_models/, then restart or flip refresh_model_list.
Where people get burned
- Empty dropdown. You haven't put a model in
upscale_modelsyet. That's the whole story. - Import errors on startup. The pack's
requirements.txtpullsrealesrgan,transformers, andscipyeven if you only want this node - heavy, andbasicsrcan still fight your torchvision version. The shim helps, but if it still fails, a cleanpip install -r requirements.txtinto your ComfyUI environment usually settles it. - Expecting detail. 2x from a soft source just gives you a bigger soft image. Upscale the pixels here, then run a separate detail pass if you want one.
That's the whole pitch. It's a wrapper, not a revolution - but it's a wrapper around the fiddliest part, and for a utility this boring, that's exactly what you want.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| scale_mode | COMBO | 2x | 6 options: 2x, 3x, 4x, 6x, 8x, custom |
| custom_scale | FLOAT | 2.00.1–8 | — |
| model_name | COMBO | 1 options: | |
| model_pathopt | STRING | — | |
| free_gpu_afteropt | BOOLEAN | false | — |
| refresh_model_listopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |