How to upscale images and video with Real-ESRGAN on a cloud GPU

Rent a GPU on Deploy, then open a terminal in JupyterLab or over SSH. Install Real-ESRGAN from the official repository, download a weight from the README or from docs/anime_video_model.md, run inference_realesrgan.py for images or inference_realesrgan_video.py for video, and copy the results folder off the instance before you destroy it. Destroying the instance deletes its disk.

The repository LICENSE file is the BSD 3-Clause License, copyright 2021, Xintao Wang (read 2026-11-12). The README does not point at a separate weights license. Read the LICENSE file before you redistribute the code.

The commands below are copied from the upstream files named in each step. They were not run on a CloudGPU instance for this page. Anything this page adds around them is marked.

What the README says about memory

The Real-ESRGAN README, docs/FAQ.md, and docs/anime_video_model.md publish no GB figure (read 2026-11-12). docs/FAQ.md says face_enhance can only be used for real faces, and that it is recommended not to use that option for anime images or animation videos, in order to save GPU memory. It does not give a number. docs/anime_video_model.md says the process count should not exceed the CUDA memory. It does not give a number. inference_realesrgan_video.py prints “If you encounter CUDA out of memory, try to set --tile with a smaller number.”

GET /v1/public/compute-capabilities does not list GPUs. It returns feature flags. The memory column is vram_gb from gpu-prices.json, updated_at 2026-11-12T16:09:18.550Z. GET /v1/public/gpu-catalog the same day (generated_at 2026-11-12T16:09:17.753Z) listed the same names and the same vram_gb values, plus Ascend 910B, which is not in gpu-prices.json and is not listed here. The catalog response also includes an availability field. This page does not copy it. There is no upstream GB cutoff to match these values against. Which listing you can start is on Deploy. This page does not say which listings are available.

Catalog name vram_gb
RTX 2080 8
RTX 3080 10
RTX 2080 Ti 11
RTX 3080 Ti 12
V100 16G 16
A30 24
RTX 3090 24
RTX 4090 24
RTX 4090D 24
RTX 4080 SUPER 32G 32
RTX 5090 32
RTX 5090D 32
V100 32G 32
A100 40G 40
A800 40G 40
A40 48
RTX 4090 48G 48
RTX 4090D 48G 48
RTX A6000 48
NVIDIA RTX PRO 5000 72G 72
RTX PRO 5000 72G 72
A100 80G 80
A800 80G 80
H800 80
RTX 6000D 83
H20 96G 96
RTX PRO 6000 96G 96
RTX PRO 6000 Max-Q 96

Where this upscaler sits next to a video model: AI short film production. Hunyuan3D’s paint install downloads RealESRGAN_x4plus.pth into its own checkpoint folder: How to run Hunyuan3D on a cloud GPU.

Install on Linux

On Deploy, choose Raw GPU. The README says Python >= 3.7 and PyTorch >= 1.7. requirements.txt is torch>=1.7 and torchvision, with no CUDA index (read 2026-11-12). The README does not print a torch install line. How to install a specific PyTorch CUDA version says to use an index that is not newer than the CUDA Version in the nvidia-smi header. This page did not pick a wheel.

The clone and the install, copied:

git clone https://github.com/xinntao/Real-ESRGAN.git
cd Real-ESRGAN
pip install basicsr
pip install facexlib
pip install gfpgan
pip install -r requirements.txt
python setup.py develop

If conda is not on PATH and you want the README’s suggested environment, use how to set up a conda environment on a cloud GPU. This page did not check whether the Raw GPU image already has conda.

Images

The README’s general-image download and inference, copied. It says results are in the results folder. --tile defaults to 0, which the usage text calls no tile. --fp32 switches off the default fp16. --face_enhance uses GFPGAN. docs/FAQ.md says not to use that flag on anime.

wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P weights
python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs --face_enhance

The anime-image pair, copied:

wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth -P weights
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs

The README’s usage text for the image script says --outscale is the final upsampling scale and the default is 4. The updates section says --outscale further resizes outputs with LANCZOS4. The same usage text says the default --suffix is out and the default --output folder is results.

Video

docs/anime_video_model.md is the README’s anime-video page. Its PyTorch commands, copied. They write a suffix into the output name. inference_realesrgan_video.py joins output, the input basename, and --suffix, and saves an mp4. The default --suffix in that script is out, and the default --output is results. The command below sets the suffix to outx2.

wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-animevideov3.pth -P weights
CUDA_VISIBLE_DEVICES=0 python inference_realesrgan_video.py -i inputs/video/onepiece_demo.mp4 -n realesr-animevideov3 -s 2 --suffix outx2
CUDA_VISIBLE_DEVICES=0 python inference_realesrgan_video.py -i inputs/video/onepiece_demo.mp4 -n realesr-animevideov3 -s 2 --suffix outx2 --num_process_per_gpu 2

The same doc’s usage note says --extract_frame_first is the switch if ffmpeg errors during multi-process inference. The script’s run function, when that flag is set, calls ffmpeg to write frame%08d.png and then points the input at that folder. The doc’s ncnn section prints the frame commands directly. Those commands, copied. The doc says to create tmp_frames and out_frames first. The fps value 23.98 is the number in the merge example, not a figure this page measured.

ffmpeg -i onepiece_demo.mp4 -qscale:v 1 -qmin 1 -qmax 1 -vsync 0 tmp_frames/frame%08d.png
ffmpeg -r 23.98 -i out_frames/frame%08d.jpg -c:v libx264 -r 23.98 -pix_fmt yuv420p output.mp4

The doc’s audio-copy command, copied:

ffmpeg -r 23.98 -i out_frames/frame%08d.jpg -i onepiece_demo.mp4 -map 0:v:0 -map 1:a:0 -c:a copy -c:v libx264 -r 23.98 -pix_fmt yuv420p output_w_audio.mp4

docs/anime_video_model.md does not print an install line for the ffmpeg binary. If ffmpeg -version fails, those commands fail. This page adds the line below. It was not run.

sudo apt-get install ffmpeg

inference_realesrgan_video.py imports the ffmpeg Python package and, if that import fails, runs pip install --user ffmpeg-python. This page did not run that fallback. The model names that script accepts are realesr-animevideov3, RealESRGAN_x4plus_anime_6B, RealESRGAN_x4plus, RealESRNet_x4plus, RealESRGAN_x2plus, and realesr-general-x4v3. The default is realesr-animevideov3.

The README also links portable ncnn executables for Windows, Linux, and macOS. This page follows the Python scripts. It does not unpack the ncnn zip.

ComfyUI

The ComfyUI upscale-model example says to put upscale models like ESRGAN in the models/upscale_models folder, then use the UpscaleModelLoader node and the ImageUpscaleWithModel node. You load its example image in ComfyUI to get the workflow. That page does not name a Real-ESRGAN release filename. The ComfyUI image upscale tutorial says to save a .pth in ComfyUI/models/upscale_models and names RealESRGAN as a general-purpose upscaler. The UpscaleModelLoader node doc says the node reads ComfyUI/models/upscale_models. The Real-ESRGAN README does not document ComfyUI. This page did not run that workflow.

On Deploy, the template named ComfyUI is the one how to choose a rental GPU for ComfyUI describes. How to run FLUX.1-dev in ComfyUI uses the same template. Put the .pth you downloaded into that template’s models/upscale_models directory. This page did not check the template’s folder layout.

The README links a third-party Gradio space. The repository does not ship a Gradio app. This page does not use that space, and it has no upstream port to forward.

When it fails

CUDA out of memory. No GB cutoff is published. inference_realesrgan_video.py says to set --tile to a smaller number. The image script’s usage text documents -t / --tile the same way, default 0. Then use how to fix CUDA out of memory on a cloud GPU.

“CUDA error: no kernel image is available” on an RTX 5090. Catalog RTX 5090 and RTX 5090D are 32 GB. That is the catalog value, not a Real-ESRGAN requirement. requirements.txt is torch>=1.7 with no CUDA index. The RTX 5090 guide says that card needs a PyTorch build for CUDA 12.8 or newer. This page did not re-test a wheel on an RTX 5090.

ffmpeg error on multi-process video. docs/anime_video_model.md says to turn on --extract_frame_first in that case. The binary still has to be on PATH.

Save the results, then destroy

Copy the results folder before you destroy the instance. The image script and the video script both default --output to results. Save your work before you destroy a cloud GPU is the checklist. The terms say data on local instance storage is permanently deleted when the instance is destroyed. Billing is per minute, with a 1-minute minimum, and it stops when you destroy the instance. The billing rule is on the pricing page. Prices are not copied here.

Frequently asked questions

How much VRAM does Real-ESRGAN publish?

The Real-ESRGAN README, docs/FAQ.md, and docs/anime_video_model.md publish no GB figure (read 2026-11-12). docs/FAQ.md says not to use face_enhance on anime images or animation videos, and that skipping it saves GPU memory. It does not give a number. inference_realesrgan_video.py tells you to set --tile to a smaller number if you hit CUDA out of memory. This page does not mark any catalog vram_gb as enough or not enough. Which listing you can start is on https://cloudgpu.app/deploy.

How do I upscale a video?

docs/anime_video_model.md prints python inference_realesrgan_video.py for a video file, and it also prints ffmpeg commands that extract frames and merge them back. The image command in the README is python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs --face_enhance. Results go in the results folder. This page did not run the scripts.

Does official ComfyUI support an upscale-model route?

The official ComfyUI upscale-model example says to put upscale models like ESRGAN in models/upscale_models, then use the UpscaleModelLoader node and the ImageUpscaleWithModel node. It does not name a Real-ESRGAN release filename. The Real-ESRGAN README does not document ComfyUI. This page did not run that workflow. The repository does not ship a Gradio app.

Do the results stay on the instance after I destroy it?

No. Copy the results folder before you destroy the instance. The terms say data on local instance storage is permanently deleted when the instance is destroyed. The repository LICENSE file is the BSD 3-Clause License.

Sources (read 2026-11-12, Asia/Shanghai)


Cards you can start are on the Deploy page. Prices are on https://cloudgpu.app/pricing and are not repeated here.

Last updated: 2026-11-12 (Asia/Shanghai).