Skip to main content

Real-ESRGAN-x4plus Example

This document describes using the QAI AppBuilder Python API to run inference with the Real-ESRGAN-x4plus super-resolution model on the Qualcomm® Hexagon™ Processor (NPU).

Supported devices

DeviceSoC
Dragon Q6AQCS6490
Dragon Q8BSC8280XP
Fogwise® AIRbox Q900QCS9075

Install QAI AppBuilder

tip
  1. Install QAI AppBuilder by following the QAI AppBuilder installation guide.

  2. Configure ADSP environment variables as described in Create ADSP environment variables.

Run the sample

Install dependencies

Install sample dependencies in the activated virtual environment:

Device
pip3 install requests tqdm qai-hub py3-wget Pillow torch torchvision opencv-python-headless

Run the script

  • Enter the upstream samples directory

    Device
    cd qai-appbuilder/samples
  • Prepare input data (the sample provides a default image)

input image

Run inference

warning

On QCS6490 / SC8280XP, do not use the default float DLC. The default .dlc path fails with The SocModel doesn't support FP16. Use --bin to download the precompiled HTP context binary.

Device
python3 ComputerVision/Super_Resolution/real_esrgan_x4plus/real_esrgan_x4plus.py --chipset 6490 --bin --no_show

--no_show avoids opening an image viewer on headless SSH sessions.

Expected result

A successful run writes:

ComputerVision/Super_Resolution/real_esrgan_x4plus/output.png
tip

Launcher alternative:

python3 run_inference.py --model real_esrgan_x4plus --args "--chipset 6490 --bin --no_show"

    You need to be logged into GitHub to post a comment. If you are already logged in, please ignore this message.

    Radxa-docs © 2026 by Radxa Computer (Shenzhen) Co.,Ltd. is licensed under CC BY 4.0