---
title: Qwen-Image-2.1-SR
canonical_url: "https://www.modelscope.cn/models/DiffSynth-Studio/Qwen-Image-2.1-SR"
md_url: "https://www.modelscope.cn/models/DiffSynth-Studio/Qwen-Image-2.1-SR.md"
repository: DiffSynth-Studio/Qwen-Image-2.1-SR
last_updated: 2026-11-19
license: "Apache License 2.0"
pipeline_tag: text-to-image-synthesis
tasks:
  - text-to-image-synthesis
base_model_relation: finetune
parameters: 805.6M
tensor_type:
  - BF16
library_name:
  - pytorch
  - safetensors
downloads: 26
stars: 0
---

# Qwen-Image-2.1-SR

> Qwen-Image-2.1-SR - DiffSynth-Studio 在 ModelScope 开源的模型。Image Super-Resolution

DiffSynth-Studio/Qwen-Image-2.1-SR 是 ModelScope 魔搭社区上的 805.6M 参数text-to-image-synthesis模型，采用 Apache License 2.0 许可。

- **Repository**: DiffSynth-Studio/Qwen-Image-2.1-SR
- **License**: Apache License 2.0
- **Tasks**: text-to-image-synthesis
- **Parameters**: 805.6M
- **Downloads**: 26
- **Stars**: 0
- **Last updated**: 2026-11-19

Source: https://www.modelscope.cn/models/DiffSynth-Studio/Qwen-Image-2.1-SR

---

# Image Super-Resolution

## Introduction

Qwen-Image-2.1-SR is a controllable real-world super-resolution model built on
Qwen-Image 2.1. It turns a blurry, noisy or compressed image into a clean
high-resolution one — and, unlike most SR models, it lets you decide **how much
detail** the result should contain.

Most super-resolution models give you one fixed output: either noticeably smooth,
or aggressively textured. Neither fits every case. Fur, foliage, fabric and
weathered surfaces usually look better with more texture; portraits, illustrations
and clean product shots often look better when kept smooth. Qwen-Image-2.1-SR makes
that a setting you can adjust per image, per batch, or per user preference, instead
of something baked into the model.

**Key features**

- **Continuous detail control.** One scalar, `s ∈ [0, 1]`, moves the output from
  restrained (closer to the input) to richly detailed. Intermediate values
  interpolate smoothly, so you can dial in the amount you want rather than picking
  between two extremes.
- **Content stays put.** Across the whole range the scene, layout, colour and
  identity do not change — only the amount of fine structure. The same image can be
  rendered at several detail levels and compared side by side.
- **Text-rich scenes.** Character strokes are a notorious failure mode of
  generative SR. Qwen-Image-2.1-SR is trained with text-bearing images, including
  dense Chinese text, and is less prone to garbled or substituted glyphs, which
  makes it usable for posters, storefronts, signs and packaging.
- **RGBA assets, via the base model.** Since Qwen-Image 2.1 natively accepts
  4-channel (RGBA) inputs, Qwen-Image-2.1-SR can also be applied to transparent
  PNGs such as sticker packs, product cut-outs and game/UI assets, instead of
  falling back to a separate mask-upsampling step.
- **Optional stronger enhancement.** When the input is badly degraded and you want
  more than the default maximum, an enhancement mode pushes texture further at
  roughly twice the inference cost.

**Suggested settings**

- `s = 0` — conservative, minimal new texture
- `s = 0.4 – 0.6` — balanced; a safe default for real photos
- `s = 1` — richest default detail
- enhancement mode — for heavy degradation or deliberate over-sharpening

## Showcase

### Noise Awareness

The model is capable of perceiving noise within an image and has the ability to slightly modify image content. Therefore, it can eliminate noise, making the image look cleaner and sharper.

|Input|![](./assets/example_noise_1/input.png)|![](./assets/example_noise_2/input.png)|
|-|-|-|
|Output|![](./assets/example_noise_1/output.png)|![](./assets/example_noise_2/output.png)|

### Detail Stimulation

The model supports a "detail scale" input to control the richness of details in the image. Detail stimulation can make photographs look more realistic, while detail suppression can give anime and paintings cleaner lines.

|Input|![](./assets/example_scale_1/input.png)|![](./assets/example_scale_2/input.png)|
|-|-|-|
|Output (Detail suppression, scale=0.1)|![](./assets/example_scale_1/output_0.1.png)|![](./assets/example_scale_2/output_0.1.png)|
|Output (Detail stimulation, scale=0.9)|![](./assets/example_scale_1/output_0.9.png)|![](./assets/example_scale_2/output_0.9.png)|

### Text Rendering

Based on the descriptions in the prompt, the model can reconstruct blurry text content within images, making it suitable for processing images such as posters.

|Prompt|一张以深蓝色为背景的“国际和平日”主题海报，视觉中心是一只由白色流畅线条勾勒出的展翅飞翔的和平鸽，象征着纯洁与希望。海报顶部有一个圆角矩形框，里面写着“共同构建和平秩序”，其下方是醒目的白色粗体大字“国际和平日”，并配有英文翻译“INTERNATIONAL DAY OF PEACE”。在画面的底部，左侧印有带箭头的英文短语“LOVE AND PEACE”，右侧则竖排标注着代表日期的数字“09”和“21”，整体设计简洁庄重，传递出对爱与和平的呼唤。|一张展现中国传统二十四节气“谷雨”的春日风景海报。画面中青山绿水，粉色的樱花盛开且花瓣随风飘落，草地上站着一位女孩和一只小狗正眺望着蜿蜒的河流，空中还有一只飞燕，整体充满生机与春意。海报上方印有醒目的黑色书法大字“谷雨”及红色小印章，红色印章里有“谷雨”两个字，下方配有英文“Grain Rain”和“24 solar terms”；画面中部竖排写着诗句“看百谷丛生，听春雨绵绵”；底部则标注了日期“[04.20]”以及中英文对照的“中国传统二十四节气”与“Chinese traditional 24 solar terms”。|
|-|-|-|
|Input|![](./assets/example_text_2/input.png)|![](./assets/example_text_1/input.png)|
|Output|![](./assets/example_text_2/output.png)|![](./assets/example_text_1/output.png)|

### Other Usage

The detail control module in the model can also be used independently for text-to-image generation, controlling the level of detail in the generated image. The following example shows images generated with the prompt "a cat sitting on a stone." Note that more detail is not always better — an appropriate amount of blur can highlight the main subject of the image.

|Scale=0.1|Scale=0.5|Scale=0.9|
|-|-|-|
|![](./assets/example_details/output_0.1.png)|![](./assets/example_details/output_0.5.png)|![](./assets/example_details/output_0.9.png)|

Some memes on the internet have developed a heavy layer of compression artifacts ("digital patina") due to repeated compression. First upscaling at a lower resolution with a smaller "detail scale" to remove noise, and then upscaling at a higher resolution with a larger "detail scale" to sharpen the image, can completely revitalize these memes.

|Input|![](./assets/example_meme_1/input.png)|![](./assets/example_meme_2/input.png)|
|-|-|-|
|Step 1 Upscaling (resolution=256, scale=0.1)|![](./assets/example_meme_1/output_256.png)|![](./assets/example_meme_2/output_256.png)|
|Step 2 Upscaling (resolution=1024, scale=0.9)|![](./assets/example_meme_1/output_1024.png)|![](./assets/example_meme_2/output_1024.png)|

## Inference Code

Install [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio):

```shell
git clone https://github.com/modelscope/DiffSynth-Studio.git
cd DiffSynth-Studio
pip install -e .
```

Inference:

```python
from diffsynth.diffusion.template import TemplatePipeline
from diffsynth.pipelines.qwen_image_21 import QwenImage21Pipeline, ModelConfig
from modelscope import snapshot_download
from PIL import Image
import torch


pipe = QwenImage21Pipeline.from_pretrained(
    torch_dtype=torch.bfloat16,
    device="cuda",
    model_configs=[
        ModelConfig(model_id="Qwen/Qwen-Image-2.1", origin_file_pattern="transformer/diffusion_pytorch_model*.safetensors"),
        ModelConfig(model_id="Qwen/Qwen-Image-2.1", origin_file_pattern="text_encoder/model*.safetensors"),
        ModelConfig(model_id="Qwen/Qwen-Image-2.1", origin_file_pattern="vae/diffusion_pytorch_model*.safetensors"),
    ],
    processor_config=ModelConfig(model_id="Qwen/Qwen-Image-2.1", origin_file_pattern="processor/"),
)
pipe.load_lora(pipe.dit, ModelConfig(model_id="DiffSynth-Studio/Qwen-Image-2.1-SR", origin_file_pattern="sr_lora.safetensors"))
template = TemplatePipeline.from_pretrained(
    torch_dtype=torch.bfloat16,
    device="cuda",
    model_configs=[ModelConfig(model_id="DiffSynth-Studio/Qwen-Image-2.1-SR", origin_file_pattern="Template-DetailScale/")],
)
snapshot_download("DiffSynth-Studio/Qwen-Image-2.1-SR", allow_file_pattern="assets/example_noise_1/input.png", local_dir="data")

edit_image = Image.open("data/assets/example_noise_1/input.png")
detail_scale = 0.9
prompt = "Restore the degraded x4 low-resolution image into a clean, natural and detailed high-resolution image. Remove degradation artifacts while recovering plausible fine details. Strictly preserve the original layout, geometry, colors, object identity and visible text. Do not add, delete, replace or relocate content."
result = template(
    pipe,
    prompt=prompt,
    edit_image=edit_image,
    height=edit_image.height,
    width=edit_image.width,
    seed=0,
    num_inference_steps=40,
    cfg_scale=2.0,
    template_inputs=[{"scale": detail_scale}],
    negative_template_inputs=[{"scale": 1 - detail_scale}],
)
result.save("output.png")
```
