Text-to-Image
Diffusers
Safetensors
English
ZImagePipeline

Add BF16 variant

#102
by hlky - opened

With this PR Diffusers will be able to do

import torch
from diffusers import ZImagePipeline

pipe = ZImagePipeline.from_pretrained(
    "Tongyi-MAI/Z-Image-Turbo",
    torch_dtype=torch.bfloat16,
    variant="bf16",
)

For reduced download size.

To test now, revision is required.

import torch
from diffusers import ZImagePipeline

pipe = ZImagePipeline.from_pretrained(
    "Tongyi-MAI/Z-Image-Turbo",
    torch_dtype=torch.bfloat16,
    variant="bf16",
    revision="refs/pr/102",
)

Variant of text_encoder and vae is unfortunately required to avoid a warning A mixture of bf16 and non-bf16 filenames will be loaded.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment