UnslothAI:Qwen-Image-2.1 现在可以使用 Unsloth GGUFs 在12GB VRAM 上本地运行!7B 模型性能与 Nano Banana 2.0 相当。 …
摘要
Unsloth 发布了 Qwen-Image-2.1 的 GGUF 量化版本,使其能够在12GB VRAM 上本地运行,性能与 Nano Banana 2.0 相当。
查看缓存全文
缓存时间: 2026/09/23 12:10
Qwen-Image-2.1 现在可通过 Unsloth GGUF 在 12GB 显存的设备上本地运行!7B 模型性能与 Nano Banana 2.0 相当。追求更高质量时,也可通过动态卸载技术仅使用 6GB 显存运行 Dynamic FP8。
GGUF 模型下载:https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF
使用指南:https://unsloth.ai/docs/models/qwen-image-2.1
unsloth/Qwen-Image-2.1-GGUF · Hugging Face
来源:https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#read-our-how-to-run-qwen-image-21-guide-%F0%9F%92%9C阅读Qwen-Image-2.1运行指南!(https://unsloth.ai/docs/models/qwen-image-2.1)💜
这是 Qwen-Image-2.1 (https://huggingface.co/Qwen/Qwen-Image-2.1) 的 GGUF 量化版本。unsloth/Qwen-Image-2.1-GGUF 采用 Unsloth Dynamic 2.0 (https://docs.unsloth.ai/basics/unsloth-dynamic-2.0-ggufs) 方法论,以实现最先进的性能表现。
sd-cli --diffusion-model qwen-image-2.1-Q4_K_M.gguf \
--vae qwen_image_2.1_vae_bf16.safetensors \
--llm Qwen3-VL-8B-Instruct-UD-Q4_K_XL.gguf \
-p "一个卡通树懒吉祥物在挥手,扁平矢量插画,明亮色彩" \
--steps 20 --cfg-scale 6.0 --sampling-method euler -W 1024 -H 1024 --diffusion-fa \
-o out.png
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#samples示例展示
使用 Q4_K_M 去噪器与 Q4_K_M 文本编码器渲染,分辨率 1024x1024,20步采样,cfg 6.0,euler 采样器。
🤖ModelScope (https://modelscope.cn/models/Qwen/Qwen-Image-2.1) | 🤗HuggingFace (https://huggingface.co/Qwen/Qwen-Image-2.1) | 📑技术博客 (https://qwen.ai/blog?id=qwen-image-2.1) | 🖥️在线演示 (https://huggingface.co/spaces/Qwen/Qwen-Image-2.1) | 🫨Discord社区 (https://discord.gg/BEYSk3pkSu) | 💬微信交流 (https://huggingface.co/Qwen/Qwen-Image-2.1/blob/main/assets/qr.png)
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#introduction模型介绍
我们荣幸地开源 Qwen-Image-2.1,这是通义千问家族中统一的文生图与图像编辑模型。其视觉生成组件仅包含 70亿参数(32层单流DiT架构),在生成质量、推理效率与功能多样性之间实现了卓越平衡。
本次发布聚焦四大核心提升:
- 轻量高效:通过混合粒度注意力机制与前缀KV缓存复用,以极低计算成本实现高质量图像生成
- 原生透明度与统一创作:单模型支持文本生成普通/透明(RGBA)图像、编辑透明图层、从照片中提取主体
- 多样化编辑:支持最多 10张参考图像,可通过圈选、手绘标注或独立蒙版指定局部编辑,保持人物与产品特征一致性
- 真实纹理与精修美学:改进字体渲染、人像光影与细节呈现,生成更具视觉冲击力的结果
更多技术细节请参阅 GitHub仓库 (https://github.com/QwenLM/Qwen-Image-2.1) 及 技术博客 (https://qwen.ai/blog?id=qwen-image-2.1)。
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#quick-start快速开始
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#installation环境安装
pip install torch>=2.4.0
pip install transformers>=5.17
pip install git+https://github.com/huggingface/diffusers
pip install accelerate pillow
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#text-to-image文生图示例
import torch
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1", torch_dtype=torch.bfloat16
).to("cuda")
image = pipe(
prompt="霓虹灯店招写着\"QWEN IMAGE 2.1\",雨夜,湿润路面上的倒影",
width=2048, height=2048,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("t2i_example.png")
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#image-editing图像编辑示例
import torch
from PIL import Image
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1", torch_dtype=torch.bfloat16
).to("cuda")
input_image = Image.open("input.png")
image = pipe(
prompt="将背景更换为日落海滩",
image=input_image,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("edit_example.png")
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#transparent-image-generation-rgba透明图像生成(RGBA)
使用推荐的透明图像提示词格式:
image = pipe(
prompt="这是带透明通道的RGBA图像。可爱的卡通龙贴纸。图像包含Alpha通道且背景透明。",
width=2048, height=2048,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("transparent_example.png")
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#supported-aspect-ratios支持的宽高比
aspect_ratios = {
"1:1": (2048, 2048),
"4:3": (2400, 1792),
"3:4": (1792, 2400),
"3:2": (2528, 1696),
"2:3": (1696, 2528),
"16:9": (2752, 1536),
"9:16": (1536, 2752),
}
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#memory-optimization显存优化
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1", torch_dtype=torch.bfloat16
)
pipe.enable_model_cpu_offload()
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#showcase效果展示
原生透明图像生成
基于六张肖像参考图生成的团体照
文本渲染效果
https://huggingface.co/unsloth/Qwen-Image-2.1-GGUF#license开源协议
本模型遵循 Qwen研究许可协议 (https://huggingface.co/Qwen/Qwen-Image-2.1/blob/main/LICENSE)。
通义千问 (@Alibaba_Qwen):
推出Qwen-Image-2.1,通义千问图像系列中最具均衡性与成本效益的图像生成模型!现已开放权重!🎨统一生成与编辑功能的轻量级模型,以紧凑架构实现顶尖质量。
核心特性:👀
- 轻量紧凑与极速推理:
相似文章
@UnslothAI:Qwen3.8 现在可以在本地运行了!我们通过 Dynamic 1-bit 选择性量化层,将 Qwen3.8-2.4T-A95B 从 4.9TB 缩小到 397GB(-91% 体积)……
Unsloth 宣布 Qwen3.8 现在可以在本地运行,通过 Dynamic 1-bit 量化将 2.4T 参数模型从 4.9TB 缩小到 397GB,并提供了指南和 GGUF 版本。
@UnslothAI:Qwen3.8-27B 即将发布!可在 17GB RAM/VRAM 配置上本地运行。
阿里巴巴宣布 Qwen3.8-27B 开源权重版本发布,可在 17GB RAM/VRAM 上本地运行,同时还有更大的 Qwen3.8-Max。
@Lonely__MH: 全体起立!GGUF量化的Qwen-Image-2.1版本已发布!感谢@UnslothAI团队的加入!基于…
GGUF量化版的Qwen-Image-2.1 AI模型已发布,采用Dynamic 2.0技术实现高效4位量化,支持文本到图像和透明图像生成,文件大小为4.2GB,适合Mac用户使用。
@cyrilXBT: 太不可思议了。Qwen 3.8 27B 现在在本地 RTX 4060 上仅用 8GB 显存就能愉快运行。你看到的这是一个 64k 上下文…
一位用户分享称,Qwen 3.8 27B 模型通过 Unsloth 的 IQ4_XS 量化,在仅有 8GB 显存的 RTX 4060 上本地运行,实现了 64k 上下文窗口和令人印象深刻的性能指标。
unsloth/Qwen3.6-27B-NVFP4
Unsloth 发布了 Qwen3.6-27B 的 NVFP4 量化检查点,声称吞吐量提升 2.5 倍,精度与 FP8 和 BF16 相当,并提供了在 24GB GPU 上通过 vLLM 运行的说明。