dee-z-image / README.md
Javad Taghia
Update model card
b6094c3
---
license: apache-2.0
language:
- en
pipeline_tag: text-to-image
library_name: diffusers
---
# dee-z-image
This repository hosts a text-to-image checkpoint in Diffusers format. It is compatible with `ZImagePipeline` and can be loaded directly from the Hugging Face Hub.
## Usage
### Install
Install the latest Diffusers (recommended) and the required runtime dependencies:
```bash
pip install -U torch transformers accelerate safetensors
pip install -U diffusers
```
If your installed Diffusers version does not include `ZImagePipeline`, install Diffusers from source instead:
```bash
pip install -U git+https://github.com/huggingface/diffusers
```
### Generate an image
```python
import torch
from diffusers import ZImagePipeline
model_id = "telcom/dee-z-image"
pipe = ZImagePipeline.from_pretrained(
model_id,
torch_dtype=torch.bfloat16, # use torch.float16 if your GPU does not support bf16
low_cpu_mem_usage=False,
)
pipe.to("cuda")
prompt = "A cinematic studio photo of a small robot sitting at a desk, warm lighting, shallow depth of field, high detail."
image = pipe(
prompt=prompt,
height=1024,
width=1024,
num_inference_steps=9,
guidance_scale=0.0,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("out.png")
```
## Tips
- If you run out of VRAM, try `pipe.enable_model_cpu_offload()` (requires `accelerate`) or reduce the resolution.
- Start with `guidance_scale=0.0` and `num_inference_steps` around 8–12; adjust based on quality/speed needs.
- For reproducibility, set a `generator` seed as shown above.
## Repository contents
- `model_index.json` defines the Diffusers pipeline components used by `ZImagePipeline`.
- `text_encoder/`, `tokenizer/`, `transformer/`, `vae/`, `scheduler/` contain the model submodules.
- `assets/` contains example images and an optional gallery PDF.
## License
Apache-2.0 (see metadata at the top of this model card).
## Acknowledgements
This repo packages a checkpoint for the Z-Image family of models. For upstream project details, see:
- https://github.com/Tongyi-MAI/Z-Image
- https://arxiv.org/abs/2511.22699