File size: 4,098 Bytes
9b47e55 6da46c9 796c456 9b47e55 c70d10a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | ---
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)์ ์์ผ๋ฉฐ, ์ด ๋ฆฌํฌ๋ ์์ํ ํ์๋ฌผ
|