Z-Image-FP8 / README.md
uzins's picture
Card update 2026-11-01: rewrite Korean summary, known-issue notice where applicable
c70d10a verified
|
Raw History Blame Contribute Delete
4.1 kB
---
base_model: Tongyi-MAI/Z-Image
base_model_relation: quantized
license: apache-2.0
pipeline_tag: text-to-image
tags:
- text-to-image
- diffusion
- fp8
- quantized
- comfyui
---
# Z-Image ยท FP8 (transformer)
FP8 (`float8_e4m3fn`) quantization of the **Z-Image DiT (ZImageTransformer2DModel, 6.1B)** transformer from [`Tongyi-MAI/Z-Image`](https://huggingface.co/Tongyi-MAI/Z-Image). Quantized by **axteam**.
| File | Size |
|---|---|
| `Z-Image-transformer-fp8_e4m3fn.safetensors` | 6.2 GB |
## What this is
- **Only the transformer (DiT) is quantized** to `float8_e4m3fn` (2-D weight tensors; norms/biases kept in BF16). ~half the size of the BF16 transformer.
- **VAE and text encoder(s) are NOT included** โ€” use the ones from the original [`Tongyi-MAI/Z-Image`](https://huggingface.co/Tongyi-MAI/Z-Image).
## Requirements
| | |
|---|---|
| **Runtime** | ComfyUI (Load Diffusion Model node, `float8_e4m3fn` single file). Not run here โ€” no ComfyUI on this server. |
| **Also needed** | the Qwen3 text encoder (8.0 GB) and VAE (0.17 GB) from the base repo. |
| **Memory** | this file is **6.2 GB**; add the text encoder(s) and VAE above. |
## Usage (ComfyUI)
1. Download the FP8 file into ComfyUI's diffusion-model folder:
```bash
hf download axteam/Z-Image-FP8 Z-Image-transformer-fp8_e4m3fn.safetensors --local-dir ComfyUI/models/diffusion_models
```
2. Get the **VAE** and **text encoder(s)** from the original [`Tongyi-MAI/Z-Image`](https://huggingface.co/Tongyi-MAI/Z-Image) repo (or the matching ComfyUI repackaged files) and put them in `ComfyUI/models/vae/` and `ComfyUI/models/text_encoders/`.
3. In your workflow, load this file with the **Load Diffusion Model** node (`UNETLoader`) โ€” leave `weight_dtype` at `default` (the file is already `float8_e4m3fn`) โ€” and wire the original VAE / text-encoder loaders as in the base model's reference workflow.
4. Sampler settings (steps, CFG/guidance, resolution) are the same as for the original model.
> The FP8 file is a plain cast of the transformer weights (no scaling), the common ComfyUI `fp8_e4m3fn` convention; norms and biases stay BF16.
## License
Quantized derivative of [`Tongyi-MAI/Z-Image`](https://huggingface.co/Tongyi-MAI/Z-Image). Original weights belong to the upstream authors; the base model's license applies to this derivative.
---
## ํ•œ๊ตญ์–ด ์š”์•ฝ
**[`Tongyi-MAI/Z-Image`](https://huggingface.co/Tongyi-MAI/Z-Image)์˜ transformer(DiT) FP8 ์–‘์žํ™” ๋นŒ๋“œ (ComfyUI์šฉ ๋‹จ์ผ ํŒŒ์ผ)** ยท ์ œ์ž‘ axteam
### ๊ฐœ์š”
| ํ•ญ๋ชฉ | ๋‚ด์šฉ |
|---|---|
| ์›๋ณธ ๋ชจ๋ธ | [`Tongyi-MAI/Z-Image`](https://huggingface.co/Tongyi-MAI/Z-Image) |
| ํ˜•์‹ | `float8_e4m3fn` ๋‹จ์ผ safetensors (ComfyUI ํ‘œ์ค€ ๋ฐฉ์‹) |
| ํŒŒ์ผ | `Z-Image-transformer-fp8_e4m3fn.safetensors` 6.2 GB |
| ํฌํ•จ | transformer(DiT) |
### ์–‘์žํ™” ์ƒ์„ธ
- **๋ฐฉ์‹**: transformer์˜ 2D ๊ฐ€์ค‘์น˜๋ฅผ `float8_e4m3fn`์œผ๋กœ ๊ทธ๋Œ€๋กœ ๋ณ€ํ™˜ (์Šค์ผ€์ผ ์—†์Œ, ComfyUI ๊ด€๋ก€)
- **BF16 ์œ ์ง€**: ์ •๊ทœํ™”์ธตยทbias
- **๋ฏธํฌํ•จ**: VAEยทํ…์ŠคํŠธ ์ธ์ฝ”๋” โ€” ์›๋ณธ ๋ฆฌํฌ์—์„œ ๋ฐ›์•„ ์‚ฌ์šฉ
### ์š”๊ตฌ์‚ฌํ•ญ
- **์‹คํ–‰ ํ™˜๊ฒฝ**: ComfyUI โ€” Load Diffusion Model ๋…ธ๋“œ๋กœ `float8_e4m3fn` ๋‹จ์ผ ํŒŒ์ผ ๋กœ๋“œ (์ด ์„œ๋ฒ„์—๋Š” ComfyUI๊ฐ€ ์—†์–ด ๋ฏธ์‹คํ–‰)
- **์ถ”๊ฐ€๋กœ ํ•„์š”ํ•œ ํŒŒ์ผ**: ์›๋ณธ ๋ฆฌํฌ์˜ Qwen3 ํ…์ŠคํŠธ ์ธ์ฝ”๋”(8.0 GB)์™€ VAE(0.17 GB)
- **๋ฉ”๋ชจ๋ฆฌ**: ์ด ํŒŒ์ผ 6.2 GB + ์œ„ ํ…์ŠคํŠธ ์ธ์ฝ”๋”ยทVAE
### ์‚ฌ์šฉ๋ฒ• (ComfyUI)
- **๋‹ค์šด๋กœ๋“œ**: `hf download axteam/Z-Image-FP8 Z-Image-transformer-fp8_e4m3fn.safetensors --local-dir ComfyUI/models/diffusion_models`
- **ํ…์ŠคํŠธ ์ธ์ฝ”๋”ยทVAE**: ์›๋ณธ ๋ฆฌํฌ์—์„œ ๋ฐ›์•„ `ComfyUI/models/text_encoders/`ยท`ComfyUI/models/vae/`์— ๋ฐฐ์น˜
- **๋ถˆ๋Ÿฌ์˜ค๊ธฐ**: Load Diffusion Model ๋…ธ๋“œ(`UNETLoader`), `weight_dtype`์€ default
- **์ƒ˜ํ”Œ๋Ÿฌ ์„ค์ •**: ์Šคํ…ยทCFG(guidance)ยทํ•ด์ƒ๋„๋Š” ์›๋ณธ ๋ชจ๋ธ๊ณผ ๋™์ผ
### ๋ผ์ด์„ ์Šค
- **๋ผ์ด์„ ์Šค**: Apache-2.0 โ€” ์›๋ณธ ๋ชจ๋ธ์˜ ๋ผ์ด์„ ์Šค๋ฅผ ๊ทธ๋Œ€๋กœ ๋”ฐ๋ฆ„
- **๊ถŒ๋ฆฌ**: ์›๋ณธ ๊ฐ€์ค‘์น˜ยทํ† ํฌ๋‚˜์ด์ €์˜ ๊ถŒ๋ฆฌ๋Š” Tongyi-MAI(Alibaba)์— ์žˆ์œผ๋ฉฐ, ์ด ๋ฆฌํฌ๋Š” ์–‘์žํ™” ํŒŒ์ƒ๋ฌผ