Views
No views yet
ZImagePipeline and can be loaded directly from the Hugging Face Hub.1pip install -U torch transformers accelerate safetensors
2pip install -U diffusersZImagePipeline, install Diffusers from source instead:pip install -U git+https://github.com/huggingface/diffusers1import torch
2from diffusers import ZImagePipeline
3
4model_id = "telcom/dee-z-image"
5
6pipe = ZImagePipeline.from_pretrained(
7 model_id,
8 torch_dtype=torch.bfloat16, # use torch.float16 if your GPU does not support bf16
9 low_cpu_mem_usage=False,
10)
11pipe.to("cuda")
12
13prompt = "A cinematic studio photo of a small robot sitting at a desk, warm lighting, shallow depth of field, high detail."
14
15image = pipe(
16 prompt=prompt,
17 height=1024,
18 width=1024,
19 num_inference_steps=9,
20 guidance_scale=0.0,
21 generator=torch.Generator("cuda").manual_seed(42),
22).images[0]
23
24image.save("out.png")pipe.enable_model_cpu_offload() (requires accelerate) or reduce the resolution.guidance_scale=0.0 and num_inference_steps around 8–12; adjust based on quality/speed needs.generator seed as shown above.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.