diff --git a/README.md b/README.md index c1636c9..026695a 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ API and command-line option may change frequently.*** - [Chroma](./docs/chroma.md) - [Chroma1-Radiance](./docs/chroma_radiance.md) - [Qwen Image](./docs/qwen_image.md) + - [Z-Image](./docs/z_image.md) - Image Edit Models - [FLUX.1-Kontext-dev](./docs/kontext.md) - [Qwen Image Edit/Qwen Image Edit 2509](./docs/qwen_image_edit.md) @@ -129,6 +130,7 @@ If you want to improve performance or reduce VRAM/RAM usage, please refer to [pe - [🔥Qwen Image](./docs/qwen_image.md) - [🔥Qwen Image Edit/Qwen Image Edit 2509](./docs/qwen_image_edit.md) - [🔥Wan2.1/Wan2.2](./docs/wan.md) +- [🔥Z-Image](./docs/z_image.md) - [LoRA](./docs/lora.md) - [LCM/LCM-LoRA](./docs/lcm.md) - [Using PhotoMaker to personalize image generation](./docs/photo_maker.md) diff --git a/assets/z_image/bf16.png b/assets/z_image/bf16.png new file mode 100644 index 0000000..5bb7a95 Binary files /dev/null and b/assets/z_image/bf16.png differ diff --git a/assets/z_image/q2_K.png b/assets/z_image/q2_K.png new file mode 100644 index 0000000..20aff17 Binary files /dev/null and b/assets/z_image/q2_K.png differ diff --git a/assets/z_image/q3_K.png b/assets/z_image/q3_K.png new file mode 100644 index 0000000..727b8e3 Binary files /dev/null and b/assets/z_image/q3_K.png differ diff --git a/assets/z_image/q4_0.png b/assets/z_image/q4_0.png new file mode 100644 index 0000000..5136b2a Binary files /dev/null and b/assets/z_image/q4_0.png differ diff --git a/assets/z_image/q4_K.png b/assets/z_image/q4_K.png new file mode 100644 index 0000000..5111042 Binary files /dev/null and b/assets/z_image/q4_K.png differ diff --git a/assets/z_image/q5_0.png b/assets/z_image/q5_0.png new file mode 100644 index 0000000..a89081e Binary files /dev/null and b/assets/z_image/q5_0.png differ diff --git a/assets/z_image/q6_K.png b/assets/z_image/q6_K.png new file mode 100644 index 0000000..d9f6ac9 Binary files /dev/null and b/assets/z_image/q6_K.png differ diff --git a/assets/z_image/q8_0.png b/assets/z_image/q8_0.png new file mode 100644 index 0000000..38687a3 Binary files /dev/null and b/assets/z_image/q8_0.png differ diff --git a/docs/z_image.md b/docs/z_image.md new file mode 100644 index 0000000..73eacff --- /dev/null +++ b/docs/z_image.md @@ -0,0 +1,28 @@ +# How to Use + +You can run Z-Image with stable-diffusion.cpp on GPUs with 4GB of VRAM — or even less. + +## Download weights + +- Download Z-Image-Turbo + - safetensors: https://huggingface.co/Comfy-Org/z_image_turbo/tree/main/split_files/diffusion_models + - gguf: https://huggingface.co/leejet/Z-Image-Turbo-GGUF/tree/main +- Download vae + - safetensors: https://huggingface.co/black-forest-labs/FLUX.1-schnell/tree/main +- Download Qwen3 4b + - safetensors: https://huggingface.co/Comfy-Org/z_image_turbo/tree/main/split_files/text_encoders + - gguf: https://huggingface.co/unsloth/Qwen3-4B-Instruct-2507-GGUF/tree/main + +## Examples + +``` +.\bin\Release\sd.exe --diffusion-model z_image_turbo-Q3_K.gguf --vae ..\..\ComfyUI\models\vae\ae.sft --llm ..\..\ComfyUI\models\text_encoders\Qwen3-4B-Instruct-2507-Q4_K_M.gguf -p "A cinematic, melancholic photograph of a solitary hooded figure walking through a sprawling, rain-slicked metropolis at night. The city lights are a chaotic blur of neon orange and cool blue, reflecting on the wet asphalt. The scene evokes a sense of being a single component in a vast machine. Superimposed over the image in a sleek, modern, slightly glitched font is the philosophical quote: 'THE CITY IS A CIRCUIT BOARD, AND I AM A BROKEN TRANSISTOR.' -- moody, atmospheric, profound, dark academic" --cfg-scale 1.0 -v --offload-to-cpu --diffusion-fa -H 1024 -W 512 +``` + +z-image example + +## Comparison of Different Quantization Types + +| bf16 | q8_0 | q6_K | q5_0 | q4_K | q4_0 | q3_K | q2_K| +|---|---|---|---|---|---|---|---| +| bf16 | q8_0 | q6_K | q5_0 | q4_K | q4_0 | q3_K | q2_K | \ No newline at end of file