Instructions to use ostris/Z-Image-De-Turbo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ostris/Z-Image-De-Turbo with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ostris/Z-Image-De-Turbo", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
how to use model in Space
#6
by prokofyev8 - opened
Could you give code sample, please, how to use your model in HF Space?
I tried both
pipe = DiffusionPipeline.from_pretrained("ostris/Z-Image-De-Turbo", dtype=torch.bfloat16, device_map="cuda")
and
pipe = StableDiffusionXLPipeline.from_single_file(
pretrained_model_link_or_path="ostris/Z-Image-De-Turbo",
config_dict={'checkpoint_file_name': 'z_image_de_turbo_v1_bf16.safetensors'},
torch_dtype=torch.bfloat16
)
device = "cuda"
pipe.to(device)
But this doesn't work.
Many thanks in advance!