---
title: Qwen-Image-2.1-ComfyUI-12G
canonical_url: "https://www.modelscope.cn/models/junwenlu/Qwen-Image-2.1-ComfyUI-12G"
md_url: "https://www.modelscope.cn/models/junwenlu/Qwen-Image-2.1-ComfyUI-12G.md"
repository: junwenlu/Qwen-Image-2.1-ComfyUI-12G
chinese_name: "Qwen-Image-2.1-ComfyUI-12G（PE改写Skills优化版）"
last_updated: 2026-09-25
license: other
pipeline_tag: text-to-image-synthesis
tasks:
  - text-to-image-synthesis
base_model:
  - Qwen/Qwen-Image-2.1
base_model_relation: quantized
parameters: 13.2B
tensor_type:
  - BF16
  - F32
  - U8
  - I8
  - F8_E4M3
library_name:
  - safetensors
downloads: 2453
stars: 25
---

# Qwen-Image-2.1-ComfyUI-12G

> Qwen-Image-2.1-ComfyUI-12G - junwenlu 在 ModelScope 开源的模型。Qwen-Image-2.1 是阿里巴巴通义团队于 2026 年 9 月发布的开源图像生成与编辑模型，基于 7B 参数的 MMDiT 架构，原生支持 2K 分辨率直出、RGBA 透明通道和最多 10 张参考图融合，采用 Apache 2.0 协议完全开源可商用。

junwenlu/Qwen-Image-2.1-ComfyUI-12G 是 ModelScope 魔搭社区上的 13.2B 参数text-to-image-synthesis模型，采用 other 许可，基于 Qwen/Qwen-Image-2.1 构建。

- **Repository**: junwenlu/Qwen-Image-2.1-ComfyUI-12G
- **License**: other
- **Tasks**: text-to-image-synthesis
- **Parameters**: 13.2B
- **Base model**: Qwen/Qwen-Image-2.1
- **Downloads**: 2453
- **Stars**: 25
- **Last updated**: 2026-09-25

Source: https://www.modelscope.cn/models/junwenlu/Qwen-Image-2.1-ComfyUI-12G

---

# Qwen-Image-2.1 ComfyUI 12G

基于官方 int8 convrot 量化权重的 **Qwen-Image-2.1** 完整 ComfyUI 方案（文生图 + 图像编辑），**12 GB 及以上显存即可运行**，附开箱即用的两个工作流与 LLM 提示词改写规则。

## 模型介绍

本仓库打包了 Qwen-Image-2.1 的官方量化权重（int8 convrot 扩散模型 + W4A8 文本编码器 + bf16 VAE），并配套两个精简工作流与提示词改写规则：

- **文生图工作流**（Image_T2I_Qwen-Image-2.1.json）——纯通用节点搭建：正向/负向提示词独立分节点、分辨率直接填写，无需任何第三方自定义节点。
- **编辑工作流**（Image_EDIT_Qwen-Image-2.1.json）——按官方管线逻辑搭建：`<image1>` 指编辑目标图、`<image2>` 指参考图；KV 缓存加速，画布自动跟随目标图（可切换自定义 2K 尺寸）。
- **提示词改写规则**（skills/ 两份 md，文生图 / 编辑各一）——当直接生成效果不理想时，调用大语言模型（如 Qwen3.8-27B）改写：把对应 md 作为 system prompt、你的需求接在后面，大语言模型会扩写出高质量提示词（JSON 中的 `rewritten_prompt`），粘回工作流即可明显提升出图质量。
- **官方 PE 改写模型**：[文生图 PE-T2I](https://www.modelscope.cn/models/Qwen/Qwen-Image-2.1-PE-T2I) / [图像编辑 PE-I2I](https://www.modelscope.cn/models/Qwen/Qwen-Image-2.1-PE-I2I)。

所有节点均为 **ComfyUI 内置节点**，无需安装任何 custom_nodes（要求 **ComfyUI v0.37.0** 及以上，实测版本）。

## 示例

### 文生图

由文生图工作流生成（2048×1152，2MP · 16:9），效果：高清 A4 数学试卷扫描件，白底黑字、排版工整、无阴影：
![文生图示例](./assets/t2i_sample.png)

提示词（可直接粘贴使用）：
```text
高清文档扫描效果，纯白背景，A4 规格初中八年级数学期末测试卷，黑白清晰印刷，排版工整无褶皱无阴影。试卷顶部居中加粗标题：2024-2025 学年第一学期八年级数学期末学业水平测试卷；标题下方左侧标注：考试时间：120 分钟 满分：120 分；右侧标注：班级________ 姓名________ 学号________；标题下方印有两行注意事项：1. 答题前，请将班级、姓名、学号填写清楚。2. 所有试题答案请填写在答题卡对应位置，写在试卷上无效。
第一大题：一、选择题（本大题共 10 小题，每小题 3 分，共 30 分），列出前 3 道具体题目：1. 下列图形中，是轴对称图形的是（ ），选项为 A. 直角三角形 B. 平行四边形 C. 等腰梯形 D. 任意梯形；2. 计算 (-2x²)³ 的结果是（ ），选项为 A. -8x⁶ B. -6x⁶ C. 8x⁶ D. -8x⁵；3. 平面直角坐标系中，点 (2, -3) 关于 x 轴对称的点的坐标是（ ），选项为 A. (-2, 3) B. (2, 3) C. (-2, -3) D. (3, -2)。第二大题：二、填空题（本大题共 6 小题，每小题 3 分，共 18 分），列出前 2 道：11. 分解因式：x² - 9 = ********；12. 若分式 (x-2)/(x+1) 有意义，则实数 x 的取值范围是********。第三大题：三、解答题（共 72 分），露出第 19 题题干：19. （本题 8 分）先化简，再求值：(a+2)(a-2) - a (a-1)，其中 a = -1。
整体画面干净锐利，文字规整清晰，无扭曲无乱码，无多余污渍。
```

### 图像编辑

由图像编辑工作流生成（2048×1152，2MP · 16:9），以手掌多视角参考图为输入，仅复刻其手部解剖结构，背景、人物与构图按提示词重新生成，效果：雾中荷塘执莲的粉衣少女，双手五指齐全、纤细清晰，全程未崩：

输入参考图（`assets/hands_sample.png`）：
<img src="./assets/hands_sample.png" width="360" alt="编辑输入·手掌参考">

生成结果：
![图像编辑示例](./assets/edit_sample.png)

提示词（按 `skills/Qwen-Image-2.1-改写规则-edit.md` 由 DeepSeek-V4.1-Flash 改写，可直接粘贴使用）：
```text
Generate a brand-new Chinese-anime-style half-body illustration of one girl, using the input image strictly as the anatomical reference for the hand: reproduce its hand proportion, exactly five fingers per hand, slender tapered fingers, clearly defined knuckles, visible palm lines and soft fair skin tone, and take nothing else from it — leave behind its pure black background, its four-hand chart layout and its photographic rendering. Place the girl, solo, in a misty lotus pond: long black hair lifted at the side by a jade hairpin, wearing a light pink hanfu, flowing fabric and wide sleeves drifting softly in the breeze, a gentle gaze and calm expression, one hand raised to chest height with the fingertips gently pinching the stem of a blooming lotus flower, the other hand relaxed and lowered at her side, both hands anatomically correct with five fingers each, delicate slender fingers, crisp knuckles and a detailed palm. Surround her with a hazy lotus pond receding into soft mist, layered lotus leaves and blossoms losing contrast with distance, diffused warm light through the haze, and a soft pastel palette of pale pink, pale green and warm cream. Render as a polished Chinese anime illustration: clean confident linework, ultra-detailed rendering with individually drawn hair strands, resolved fabric folds and their shadows, smooth painterly cel shading without banding or noise, crisp edges and a refined masterpiece-level finish at best quality over the whole frame. Keep the composition centered on the girl as the only subject, with clean uncluttered negative space around her.
```

## 文件清单

| 文件 | 大小 | 用途 |
|---|---|---|
| `diffusion_models/qwen_image_2.1_int8_convrot.safetensors` | 6.76 GB | 扩散模型（int8 convrot 量化） |
| `text_encoders/qwen3vl_8b_w4a8.safetensors` | 5.88 GB | Qwen3-VL 8B 文本编码器（W4A8 量化） |
| `vae/qwen_image_2.1_vae_bf16.safetensors` | 0.63 GB | VAE（bf16） |
| `workflows/Image_T2I_Qwen-Image-2.1.json` | 10.7 KB | 文生图工作流 |
| `workflows/Image_EDIT_Qwen-Image-2.1.json` | 10.6 KB | 图像编辑工作流 |
| `skills/Qwen-Image-2.1-改写规则-t2i.md` | 10 KB | 文生图提示词改写规则 |
| `skills/Qwen-Image-2.1-改写规则-edit.md` | 18 KB | 图像编辑提示词改写规则 |

## 快速开始

1. **目录结构**——按下图放置文件，**保持原文件名不要改动**（工作流按裸文件名引用，不要改名、不要挪进子文件夹）：

   ```
   ComfyUI/
   ├── models/
   │   ├── diffusion_models/qwen_image_2.1_int8_convrot.safetensors
   │   ├── text_encoders/qwen3vl_8b_w4a8.safetensors
   │   └── vae/qwen_image_2.1_vae_bf16.safetensors
   └── user/default/workflows/Image_T2I_Qwen-Image-2.1.json
       user/default/workflows/Image_EDIT_Qwen-Image-2.1.json
   ```

2. **依赖**——ComfyUI **v0.37.0 及以上**（Qwen-Image-2.1 节点为内置，无需额外安装）。

3. **加载工作流**——浏览器打开 ComfyUI →「工作流」→「打开」→ 选择对应 JSON → 填写提示词 → 运行。

## 硬件需求

| 工作流 | 显存 |
|---|---|
| 文生图（1024×1024） | 推荐 12 GB |
| 文生图（2048×2048） | 推荐 16 GB |
| 图像编辑（含 1 张参考图） | 推荐 12 GB |

**实测 12 GB 显存可运行**；输出 2K 或追求更快速度，建议 16 GB 及以上。显存更小的卡可依赖 ComfyUI 自动权重卸载运行，速度会明显变慢。

## 使用说明

- **cfg = 1**（官方推荐）：cfg 为 1 时负向提示词不生效，需要负向提示词请自行调高 cfg。
- **steps = 25** 为默认值；官方管线约 40–50 步（euler），细节更精细。
- **输出 2K**：文生图工作流把百万像素改为 4（1:1 即 2048×2048）；编辑工作流把「If/Else Switch」拨到 true，空白潜空间填 2048×2048。
- **RGBA 透明图**：提示词以「这是一张带透明通道的 RGBA 图像。……图像具有 alpha 通道和透明背景。」开头，保存格式保持 PNG。

## 致谢

- [Qwen-Image-2.1](https://www.modelscope.cn/models/Qwen/Qwen-Image-2.1)（阿里巴巴 Qwen 团队）
- 量化权重与官方工作流模板来自 ComfyUI 团队
