SilentGus shimmyshimmer commited on
Commit
683eadd
·
0 Parent(s):

Duplicate from unsloth/Z-Image-GGUF

Browse files

Co-authored-by: Michael Han <shimmyshimmer@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ teaser.jpg filter=lfs diff=lfs merge=lfs -text
37
+ z-image-F16.gguf filter=lfs diff=lfs merge=lfs -text
38
+ z-image-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
39
+ z-image-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
40
+ z-image-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
41
+ z-image-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
42
+ z-image-Q4_1.gguf filter=lfs diff=lfs merge=lfs -text
43
+ z-image-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
44
+ z-image-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
45
+ z-image-Q5_0.gguf filter=lfs diff=lfs merge=lfs -text
46
+ z-image-Q5_1.gguf filter=lfs diff=lfs merge=lfs -text
47
+ z-image-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
48
+ z-image-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
49
+ z-image-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
50
+ z-image-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
51
+ z-image-BF16.gguf filter=lfs diff=lfs merge=lfs -text
52
+ z-image-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Tongyi-MAI/Z-Image
3
+ license: apache-2.0
4
+ language:
5
+ - en
6
+ pipeline_tag: text-to-image
7
+ library_name: ggml
8
+ tags:
9
+ - gguf
10
+ - unsloth
11
+ - quantized
12
+ ---
13
+
14
+ This is a GGUF quantized version of [Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image). <br>
15
+ unsloth/Z-Image-GGUF uses [Unsloth Dynamic 2.0](https://docs.unsloth.ai/basics/unsloth-dynamic-2.0-ggufs) methodology for SOTA performance.
16
+ - Important layers are upcasted to higher precision.
17
+ - Uses tooling from [ComfyUI-GGUF](https://github.com/city96/ComfyUI-GGUF) by city96.
18
+
19
+
20
+ <div>
21
+ <div style="display: flex; gap: 5px; align-items: center; ">
22
+ <a href="https://github.com/unslothai/unsloth/">
23
+ <img src="https://github.com/unslothai/unsloth/raw/main/images/unsloth%20new%20logo.png" width="133">
24
+ </a>
25
+ <a href="https://discord.gg/unsloth">
26
+ <img src="https://github.com/unslothai/unsloth/raw/main/images/Discord%20button.png" width="173">
27
+ </a>
28
+ <a href="https://docs.unsloth.ai/basics/unsloth-dynamic-2.0-ggufs">
29
+ <img src="https://raw.githubusercontent.com/unslothai/unsloth/refs/heads/main/images/documentation%20green%20button.png" width="143">
30
+ </a>
31
+ </div>
32
+ </div>
33
+
34
+ ---
35
+ <h1 align="center">⚡️- Image<br><sub><sup>An Efficient Image Generation Foundation Model with Single-Stream Diffusion Transformer</sup></sub></h1>
36
+
37
+ <div align="center">
38
+
39
+ [![Official Site](https://img.shields.io/badge/Official%20Site-333399.svg?logo=homepage)](https://tongyi-mai.github.io/Z-Image-blog/)&#160;
40
+ [![GitHub](https://img.shields.io/badge/GitHub-Z--Image-181717?logo=github&logoColor=white)](https://github.com/Tongyi-MAI/Z-Image)&#160;
41
+ [![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Checkpoint-Z--Image-yellow)](https://huggingface.co/Tongyi-MAI/Z-Image)&#160;
42
+ [![ModelScope Model](https://img.shields.io/badge/🤖%20Checkpoint-Z--Image-624aff)](https://www.modelscope.cn/models/Tongyi-MAI/Z-Image)&#160;
43
+ [![ModelScope Space](https://img.shields.io/badge/🤖%20Online_Demo-Z--Image-17c7a7)](https://www.modelscope.cn/aigc/imageGeneration?tab=advanced&versionId=569345&modelType=Checkpoint&sdVersion=Z_IMAGE&modelUrl=modelscope%3A%2F%2FTongyi-MAI%2FZ-Image%3Frevision%3Dmaster)&#160;
44
+ <a href="https://arxiv.org/abs/2511.22699" target="_blank"><img src="https://img.shields.io/badge/Report-b5212f.svg?logo=arxiv" height="21px"></a>
45
+
46
+ Welcome to the official repository for the Z-Image(造相)project!
47
+
48
+ </div>
49
+
50
+ ## 🎨 Z-Image
51
+
52
+ ![Teaser](teaser.jpg)
53
+ ![asethetic](https://cdn-uploads.huggingface.co/production/uploads/64379d79fac5ea753f1c10f3/RftwBF4PzC0_L9GvETPZz.jpeg)
54
+ ![diverse](https://cdn-uploads.huggingface.co/production/uploads/64379d79fac5ea753f1c10f3/HiFeAD2XUTmlxgdWHwhss.jpeg)
55
+ ![negative](https://cdn-uploads.huggingface.co/production/uploads/64379d79fac5ea753f1c10f3/rECmhpZys1siGgEO8L6Fi.jpeg)
56
+
57
+ **Z-Image** is the foundation model of the ⚡️- Image family, engineered for good quality, robust generative diversity, broad stylistic coverage, and precise prompt adherence.
58
+ While Z-Image-Turbo is built for speed,
59
+ Z-Image is a full-capacity, undistilled transformer designed to be the backbone for creators, researchers, and developers who require the highest level of creative freedom.
60
+
61
+ ![z-image](https://cdn-uploads.huggingface.co/production/uploads/64379d79fac5ea753f1c10f3/kt_A-s5vMQ6L-_sUjNUCG.jpeg)
62
+
63
+ ### 🌟 Key Features
64
+
65
+ - **Undistilled Foundation**: As a non-distilled base model, Z-Image preserves the complete training signal. It supports full Classifier-Free Guidance (CFG), providing the precision required for complex prompt engineering and professional workflows.
66
+ - **Aesthetic Versatility**: Z-Image masters a vast spectrum of visual languages—from hyper-realistic photography and cinematic digital art to intricate anime and stylized illustrations. It is the ideal engine for scenarios requiring rich, multi-dimensional expression.
67
+ - **Enhanced Output Diversity**: Built for exploration, Z-Image delivers significantly higher variability in composition, facial identity, and lighting across different seeds, ensuring that multi-person scenes remain distinct and dynamic.
68
+ - **Built for Development**: The ideal starting point for the community. Its non-distilled nature makes it a good base for LoRA training, structural conditioning (ControlNet) and semantic conditioning.
69
+ - **Robust Negative Control**: Responds with high fidelity to negative prompting, allowing users to reliably suppress artifacts and adjust compositions.
70
+
71
+ ### 🆚 Z-Image vs Z-Image-Turbo
72
+
73
+ | Aspect | Z-Image | Z-Image-Turbo |
74
+ |------|------|------|
75
+ | CFG | ✅ | ❌ |
76
+ | Steps | 28~50 | 8 |
77
+ | Fintunablity | ✅ | ❌ |
78
+ | Negative Prompting | ✅ | ❌ |
79
+ | Diversity | High | Low |
80
+ | Visual Quality | High | Very High |
81
+ | RL | ❌ | ✅ |
82
+
83
+ ## 🚀 Quick Start
84
+
85
+ ### Installation & Download
86
+
87
+ Install the latest version of diffusers:
88
+ ```bash
89
+ pip install git+https://github.com/huggingface/diffusers
90
+ ```
91
+
92
+ Download the model:
93
+ ```bash
94
+ pip install -U huggingface_hub
95
+ HF_XET_HIGH_PERFORMANCE=1 hf download Tongyi-MAI/Z-Image
96
+ ```
97
+
98
+ ### Recommended Parameters
99
+
100
+ - **Resolution:** 512×512 to 2048×2048 (total pixel area, any aspect ratio)
101
+ - **Guidance scale:** 3.0 – 5.0
102
+ - **Inference steps:** 28 – 50
103
+
104
+ ### Usage Example
105
+
106
+ ```python
107
+ import torch
108
+ from diffusers import ZImagePipeline
109
+
110
+ # Load the pipeline
111
+ pipe = ZImagePipeline.from_pretrained(
112
+ "Tongyi-MAI/Z-Image",
113
+ torch_dtype=torch.bfloat16,
114
+ low_cpu_mem_usage=False,
115
+ )
116
+ pipe.to("cuda")
117
+
118
+ # Generate image
119
+ prompt = "两名年轻亚裔女性紧密站在一起,背景为朴素的灰色纹理墙面,可能是室内地毯地面。左侧女性留着长卷发,身穿藏青色毛衣,左袖有奶油色褶皱装饰,内搭白色立领衬衫,下身白色裤子;佩戴小巧金色耳钉,双臂交叉于背后。右侧女性留直肩长发,身穿奶油色卫衣,胸前印有“Tun the tables”字样,下方为“New ideas”,搭配白色裤子;佩戴银色小环耳环,双臂交叉于胸前。两人均面带微笑直视镜头。照片,自然光照明,柔和阴影,以藏青、奶油白为主的中性色调,休闲时尚摄影,中等景深,面部和上半身对焦清晰,姿态放松,表情友好,室内环境,地毯地面,纯色背景。"
120
+ negative_prompt = "" # Optional, but would be powerful when you want to remove some unwanted content
121
+
122
+ image = pipe(
123
+ prompt=prompt,
124
+ negative_prompt=negative_prompt,
125
+ height=1280,
126
+ width=720,
127
+ cfg_normalization=False,
128
+ num_inference_steps=50,
129
+ guidance_scale=4,
130
+ generator=torch.Generator("cuda").manual_seed(42),
131
+ ).images[0]
132
+
133
+ image.save("example.png")
134
+ ```
135
+
136
+ ## 📜 Citation
137
+
138
+ If you find our work useful in your research, please consider citing:
139
+
140
+ ```bibtex
141
+ @article{team2025zimage,
142
+ title={Z-Image: An Efficient Image Generation Foundation Model with Single-Stream Diffusion Transformer},
143
+ author={Z-Image Team},
144
+ journal={arXiv preprint arXiv:2511.22699},
145
+ year={2025}
146
+ }
147
+ ```
teaser.jpg ADDED

Git LFS Details

  • SHA256: 6944f032282144ec4bba1942de2a5df01ae2f6534ad973e61939f835b7ebfdc2
  • Pointer size: 132 Bytes
  • Size of remote file: 8.98 MB
z-image-BF16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82eebf65df40cb09cf29094e30b3cdf7b628e873b7fe5f32023ddb6f0188490c
3
+ size 12311939136
z-image-F16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e1d3fd6f88e00eda20932b860e2369dbe26b412f196dbf7cf63e4665fe61965
3
+ size 12311939136
z-image-Q2_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c1857629988bcd6ff3468e5b2fe6c770aa26591f984bd91eecad18f36c77e45
3
+ size 4013115456
z-image-Q3_K_L.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0912f25ee35775138166e0ddf3f6ec9fca8562c5cb4cc2b346652f238ff1038d
3
+ size 4604183616
z-image-Q3_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0382d4b1affe9e552392aa9c53a20c2d661b4ddd7f8c56f1f34626c2538368c
3
+ size 4559946816
z-image-Q3_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04be2a299f4bb62df12fae37a3e93ebbfb0ebc899f493e3959d93b3c2de4591e
3
+ size 4360190016
z-image-Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c5cfc02e6007ae1f0b0d690f68bda452f51f7b8ab6d9f500f8c5b829fea4377
3
+ size 4585244736
z-image-Q4_1.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb8afc552ab71354b5d3cf6592c14bc378857b987df324e6c638bb6ca67d2d99
3
+ size 4850665536
z-image-Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a62b929f76553b21f68894e9ed34d24b7fb67fb59b5689fa06981865986cce40
3
+ size 5066995776
z-image-Q4_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a4329507c97af2ac6ea81d69e89dc0a57eeb6117dcddbc6d1b3bd082f0ecde0
3
+ size 4787443776
z-image-Q5_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1894d2902090e7a9bce21446125a5313ab0955f722a862115fafecc02fbadbf
3
+ size 5263542336
z-image-Q5_1.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f8e033c14c54c4a3943c1ac67958aaf56f777fb4c3556ee77d61e172b029e2e
3
+ size 5528963136
z-image-Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:266a5e7d8e0ab2494cb202d7bd8fcfd79b2161b0678252f3e854e992844811c6
3
+ size 5578099776
z-image-Q5_K_S.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67b2ebf5e743a4d318644773602ea7cf0ca90bb42b6ff3254c9f13e301bfc8d0
3
+ size 5289562176
z-image-Q6_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbe468f6095fb3fe8089c015e6c10c6f8416fdd05407865d431fe3493bed75c0
3
+ size 6101921856
z-image-Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a51d4e36f84caa972e0eff65e8bd2961add14374d8a7038a51eefea2fe45f2c9
3
+ size 7224707136