stable-diffusion.cpp/docs/models/qwen_image.md

4.1 KiB
Raw Permalink Blame History

Qwen Image

Qwen Image generates images from text using Qwen2.5-VL and the Qwen Image VAE.

Model files

Component Weights and downloads CLI option Requirement
Qwen Image Safetensors
GGUF
--diffusion-model Required
vae Safetensors --vae Use matching VAE
qwen_2.5_vl 7b Safetensors
GGUF
--llm Use matching text encoder

Usage

Web UI

Follow the Web UI guide to start the server, then select the recipe matching your weights. Fill the component slots below and click Load models. Use the files and compatibility requirements in Model files.

Recipe Component slots
Qwen Image (qwen-image) diffusion_model, llm, vae, tae

Slot IDs correspond to CLI component options: diffusion_model uses --diffusion-model, llm uses --llm, and model uses -m / --model. Select optional components when required by your checkpoint or task.

DGL

Example Description
Text to image Qwen Image generation.

Run a script

Edit paths, prompts and settings in the script's var block, then run from the build directory. Paths inside the script resolve from the working directory.

Windows (PowerShell)

.\bin\Release\sd-cli.exe -M dgl --script ..\docs\dgl\qwen_image\qwen-image-txt2img.dgl

Linux/macOS

./bin/sd-cli -M dgl --script ../docs/dgl/qwen_image/qwen-image-txt2img.dgl

Choose another script from the table to run a different task. Add --check to validate syntax and types without loading weights. See the shared run instructions for build paths and the server's file-access rules.

Legacy CLI

CLI examples use the shared path and shell conventions.

Windows (PowerShell)

.\bin\Release\sd-cli.exe `
  --diffusion-model ..\models\diffusion_models\qwen-image-Q8_0.gguf `
  --vae ..\models\vae\qwen_image_vae.safetensors `
  --llm ..\models\text_encoders\Qwen2.5-VL-7B-Instruct-Q8_0.gguf `
  -p "一个穿着`"QWEN`"标志的T恤的中国美女正拿着黑色的马克笔面相镜头微笑。她身后的玻璃板上手写体写着 `“一、Qwen-Image的技术路线: 探索视觉生成基础模型的极限,开创理解与生成一体化的未来。二、Qwen-Image的模型特色:1、复杂文字渲染。支持中英渲染、自动布局; 2、精准图像编辑。支持文字编辑、物体增减、风格变换。三、Qwen-Image的未来愿景:赋能专业内容创作、助力生成式AI发展。`”" `
  --cfg-scale 2.5 `
  --sampling-method euler `
  --flow-shift 3 `
  -H 1024 `
  -W 1024 `
  --offload-to-cpu `
  -v

Linux/macOS

./bin/sd-cli \
  --diffusion-model ../models/diffusion_models/qwen-image-Q8_0.gguf \
  --vae ../models/vae/qwen_image_vae.safetensors \
  --llm ../models/text_encoders/Qwen2.5-VL-7B-Instruct-Q8_0.gguf \
  -p "一个穿着\"QWEN\"标志的T恤的中国美女正拿着黑色的马克笔面相镜头微笑。她身后的玻璃板上手写体写着 “一、Qwen-Image的技术路线: 探索视觉生成基础模型的极限,开创理解与生成一体化的未来。二、Qwen-Image的模型特色:1、复杂文字渲染。支持中英渲染、自动布局; 2、精准图像编辑。支持文字编辑、物体增减、风格变换。三、Qwen-Image的未来愿景:赋能专业内容创作、助力生成式AI发展。”" \
  --cfg-scale 2.5 \
  --sampling-method euler \
  --flow-shift 3 \
  -H 1024 \
  -W 1024 \
  --offload-to-cpu \
  -v
qwen example