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!

Sign up or log in to comment