Upscaling models, as ONNX

The model files run by upscale, the command line upscaler, and by the two front ends built on it: Upscale Agent, the desktop app, and UpsizerAI, the web app. All three download from here on demand; nothing needs fetching by hand.

Each model is the original author's weights converted to ONNX by upscale's python/export_onnx.py: opset and input/output naming are the same across all of them, and height and width are dynamic so an image can be run whole or in tiles. Most come in two precisions, <name>.onnx (float32 weights) and <name>_fp16.onnx (float16 weights, float32 input and output), which give the same picture to within one 8-bit level. A few also come as <name>_int8.onnx: 8-bit weights, turned back to float32 as the network runs, a quarter of the size and, on most images, within two levels of float32.

Nothing here was trained by this organization. Every file is a conversion, and each remains under the license its author released the original weights under - follow the source link for the terms, which for some models restrict commercial use.

Model Scale fp32 fp16 int8 Architecture Original weights
APISR_GRL_x4 x4 27.1 MB 17.5 MB - GRL HikariDawn/APISR
APISR_RRDB_x2 x2 18.7 MB 9.8 MB - RRDBNet-6B HikariDawn/APISR
AnimeSharpV2_ESRGAN_Soft_x2 x2 70.0 MB 36.6 MB - ESRGAN Kim2091/AnimeSharpV2
AnimeSharpV2_MoSR_Sharp_x2 x2 18.0 MB 9.4 MB - MoSR Kim2091/AnimeSharpV2
AnimeSharpV2_MoSR_Soft_x2 x2 18.0 MB 9.4 MB - MoSR Kim2091/AnimeSharpV2
AnimeSharpV2_RPLKSR_Sharp_x2 x2 30.8 MB 16.1 MB - RealPLKSR Kim2091/AnimeSharpV2
AnimeSharpV2_RPLKSR_Soft_x2 x2 30.8 MB 16.1 MB - RealPLKSR Kim2091/AnimeSharpV2
AnimeSharpV3_x2 x2 70.0 MB 36.6 MB - ESRGAN Kim2091/AnimeSharpV3
BSRGAN_x2 x2 69.7 MB 36.4 MB - RRDBNet kadirnar/BSRGANx2
MewZoom_V1_x2 x2 23.2 MB 12.5 MB 7.3 MB MewZoom TrunkNet andrewdalpino/MewZoom-V1-2X
MewZoom_V1_UNet_x4 x4 517.2 MB 258.9 MB 129.9 MB MewZoom U-Net andrewdalpino/MewZoom-V1-4X-Unet
RealESRGAN_anime_x4 x4 18.7 MB 9.8 MB - RRDBNet-6B xinntao/Real-ESRGAN
RealESRGAN_x2 x2 70.0 MB 36.6 MB - RRDBNet ai-forever/Real-ESRGAN
RealESRGAN_x4 x4 69.9 MB 36.5 MB - RRDBNet ai-forever/Real-ESRGAN
RealESRGAN_x4plus x4 69.9 MB 36.5 MB - RRDBNet xinntao/Real-ESRGAN
RealESRGAN_x8 x8 70.0 MB 36.6 MB - RRDBNet ai-forever/Real-ESRGAN
RealESR_General_x4 x4 5.0 MB 2.5 MB - SRVGGNetCompact xinntao/Real-ESRGAN
RealWebPhoto_RGT_x4 x4 92.3 MB - - RGT Phips/4xRealWebPhoto_RGT
Swin2SR_Classical_x2 x2 72.4 MB 40.0 MB - Swin2SR mv-lab/swin2sr
Swin2SR_Classical_x4 x4 73.0 MB 40.3 MB - Swin2SR mv-lab/swin2sr
Swin2SR_RealWorld_x4 x4 72.3 MB 39.9 MB - Swin2SR mv-lab/swin2sr
SwinIR_BSRGAN_x4 x4 55.2 MB - - SwinIR-M mikestealth/SwinIR
UltraMix_Smooth_x4 x4 69.9 MB 36.5 MB - ESRGAN Kim2091/UltraSharp
UltraSharp_x4 x4 69.9 MB 36.5 MB - ESRGAN Kim2091/UltraSharp

Video

A video model looks at the frames on either side as well as the one it is upscaling, so it comes as three graphs, each run a frame at a time, with the caller carrying the hidden state between them. upscale's VideoUpscaler does this. It keeps memory flat however long the film is, and resets at scene cuts.

Model Scale Files (fp32) Architecture Original weights
BasicVSR_x4 x4 26.2 MB: BasicVSR_x4.flow.onnx (SPyNet optical flow), BasicVSR_x4.backward.onnx, BasicVSR_x4.onnx (forward pass and output) BasicVSR OpenMMLab mmagic, REDS, Apache-2.0
  • flow(frame, neighbour) -> flow
  • backward(frame, state, flow) -> state_out, run from the last frame to the first
  • forward(frame, state, flow, backward) -> state_out, image

At the start of a shot, state and flow are zeros. Run like that, the three graphs reproduce the original model exactly. Only float32 is published: float16 is badly wrong on WebGPU.

Using a file directly

https://huggingface.co/baker76/upscale-models/resolve/main/RealESRGAN_x4.onnx

Input is [1, 3, H, W] float32, RGB, 0 to 1; output is the same layout at the model's scale. The x2 RRDBNet models need even sides, and the window-attention models and MewZoom's U-Net need sides that are a multiple of 8 or 32; models.json in the UpsizerAI repository records the multiple, and the peak activation, of each file.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support