File size: 2,147 Bytes
e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 e3cbcb0 b6094c3 |
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 |
---
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
|