/ Модель

Характеристики

Лицензия
BSD 3-Clause
Опубликована
25 окт 2026

realesr-general-x4v3-onnx

Преобразование изображенийИзображение, текст → изображение3 профессии
0скачиваний за 30 дней0лайковвеса обновлены25 окт 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Экспорт Real-ESRGAN General v3 в ONNX для увеличения разрешения RGB-изображений в четыре раза на CPU, DirectML или AMD Ryzen AI NPU.

Это экспорт в формат ONNX модели realesr-general-x4v3 (Real-ESRGAN General v3), разработанной Xintao Wang и основанной на весах из репозитория xinntao/Real-ESRGAN v0.2.5.0. Репозиторий содержит варианты fp32 для DirectML и CPU, а также bf16cast для VitisAI на NPU AMD Ryzen AI. Архитектура — SRVGGNetCompact с 64 каналами и 32 сверточными слоями.

Модель увеличивает разрешение RGB-изображения в четыре раза. Она принимает тензор NCHW с тремя каналами и значениями в диапазоне [0, 1]; экспорты имеют фиксированные входные размеры 256×256 или 512×512. Вариант bf16cast рассчитан на запуск целиком на NPU, а в варианте с обрезанным хвостом финальные операции выполняются на CPU.

Это преобразование формата опубликованных весов, а не новое дообучение. Лицензия репозитория — BSD-3-Clause. Экспорты с фиксированными размерами не принимают изображения произвольного размера без предварительной подготовки; README также отмечает длительную первую компиляцию модели для Ryzen AI NPU.

Сценарии применения

  • увеличение разрешения фотографий в 4 раза
  • улучшение детализации изображений низкого разрешения
  • восстановление и масштабирование RGB-изображений
  • ускорение суперразрешения на AMD Ryzen AI NPU

Ограничения

Экспорты имеют фиксированные размеры входа 256×256 или 512×512, поэтому для других размеров требуется предварительная подготовка изображения. Первая компиляция bf16-модели для Ryzen AI NPU может занимать около 20 минут.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

realesr-general-x4v3 — ONNX (fp32 for DirectML, bf16 for the AMD Ryzen AI NPU)

Fixed-shape ONNX exports of realesr-general-x4v3 (Real-ESRGAN General v3, SRVGGNetCompact with 64 channels and 32 convolution layers, 4x) by Xintao Wang, from the weights published in xinntao/Real-ESRGAN v0.2.5.0 (realesr-general-x4v3.pth, SHA-256 8dc7edb9ac80ccdc30c3a5dca6616509367f05fbc184ad95b731f05bece96292).

  • *_fp32.onnx runs on any ONNX Runtime execution provider. It is used with DirectML on an AMD iGPU.
  • *_bf16cast.onnx is for the ONNX Runtime VitisAI execution provider of Ryzen AI Software 1.8.0 on an XDNA2 NPU.

Input is RGB in [0, 1], float32, NCHW, 3 channels. Output is 4x the input height and width.

Files

FileInput → outputPrecisionTargetSHA-256
generalv3_nchw_256x256_fp32.onnx1x3x256x256 → 1x3x1024x1024fp32DirectML / CPU4488cb17aeddbd912622eb6c422684d2e43d2b107179133adab70e6c51775518
generalv3_nchw_512x512_fp32.onnx1x3x512x512 → 1x3x2048x2048fp32DirectML / CPU4f42b00306c4e247ec8929aa087c2d3b713456b24eedd7938aabc7447b6b9cb2
generalv3dp_nchw_512x512_bf16cast.onnx1x3x512x512 → 1x3x2048x2048bf16 (cast)VitisAI EP, whole modelcbefdef03d27a05cc464e8263f50265f100e0f28ef95dd010f934cfdd3aa5feb
generalv3dp_body_nchw_512x512_bf16cast.onnx1x3x512x512 → 1x48x512x512bf16 (cast)VitisAI EP, body only867cc1c1c90d44019db556aaa59b47f63b680f6f32f5f7529d60db574541d9a6
generalv3dp_body_nchw_512x512.tail.jsonmanifest for the body—CPU post-processing1076f5884e70290561788ce36886c18d83c596dc0e3830928113ef0dc2189d33

dp in a file name means the PReLU activations are decomposed into two ReLU branches (PReLU(x) = ReLU(x) - a * ReLU(-x)), which the VAIML compiler of Ryzen AI 1.8.0 maps onto the NPU as a single subgraph.

The body file is the same bf16 model with the final DepthToSpace(blocksize=4, CRD) and the nearest-neighbour skip connection (Resize + Add) cut off. The manifest describes that tail; the host runs it on the CPU with a few lines of NumPy. This moves a memory-bound operation off the NPU and produces output bit-identical to the whole model (tail-cut.md).

How the files were made

  1. Weights → fixed-shape fp32 ONNX with scripts/npu/export_generalv3.py (opset 17, no dynamic axes, onnxsim). The script writes the 256 and 512 fp32 files and the dp fp32 file.
  2. fp32 → bf16: python -m quark.onnx.tools.convert_fp32_to_bf16 --input generalv3dp_nchw_512x512_fp32.onnx --output generalv3dp_nchw_512x512_bf16cast.onnx --format with_cast (AMD Quark, from the Ryzen AI 1.8.0 environment; no calibration data).
  3. Tail cut: scripts/npu/split_tail.py, which also verifies body + NumPy tail == whole model on the CPU EP (max abs diff < 1e-5).

The full procedure is written up in docs/model-conversion.md.

Running on the NPU

The VitisAI EP compiles the bf16 model with VAIML when the first session is created. On a Ryzen AI 7 PRO 350 this takes about 20 minutes; the result is cached (cache_dir / cache_key session options) and later sessions start in seconds. The cache is tied to the Ryzen AI Software and NPU driver versions, so it is not published here; compile it on the target machine.

Measured on a Ryzen AI 7 PRO 350 (XDNA2 NPU, Radeon 860M, 32 GB LPDDR5-8000, Ryzen AI SW 1.8.0, NPU driver 32.0.203.329), one 854x480 frame → 4x, including tiling and merge, steady state, 2026-10-11:

ExecutionTime per framePSNR vs fp32 output
iGPU, DirectML, fp32 (256–512 tiles)0.61 s—
NPU, VitisAI EP, bf16, power mode Default (512 tiles)0.65 s43.7 dB

PSNR was measured on one 1280x534 photograph against the DirectML fp32 output. Details of the measurement and the compiler workarounds are in tomhda/ryzen-ai-npu-super-resolution-notes.

License and attribution

The model weights are by Xintao Wang and contributors, released under the BSD 3-Clause License (xinntao/Real-ESRGAN). The ONNX files here are format conversions of those weights and carry the same license; the original notice is in LICENSE-BSD-3-Clause-Real-ESRGAN.txt.

This is an independent, personal conversion. It is not affiliated with or endorsed by AMD or the Real-ESRGAN authors. AMD, Ryzen and Ryzen AI are trademarks of Advanced Micro Devices, Inc.

These files are also the model kit of TOGU SCALER, a Windows upscaler that runs them on DirectML and on the Ryzen AI NPU.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Модели «картинка → картинка» пока не запускаются: нужен ввод изображения для diffusion.

Ревизия весов
fe782ac

0 моделей