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:
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:
pip install -U git+https://github.com/huggingface/diffusers
Generate an image
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()(requiresaccelerate) or reduce the resolution. - Start with
guidance_scale=0.0andnum_inference_stepsaround 8โ12; adjust based on quality/speed needs. - For reproducibility, set a
generatorseed as shown above.
Repository contents
model_index.jsondefines the Diffusers pipeline components used byZImagePipeline.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:
- Downloads last month
- 24