about the model size compared to flux
#12
by
Yang18
- opened
Thanks for your excellent work. I am confused that why is the file size of your 6B model similar to that of the Flux.1 12B model (both transformers are around 24GB)?
Hi! Thanks for your interest. We uploaded the weights in fp32 precision, so each parameter costs 4 bytes. But this would not affect inference, as we typically convert the model to 16-bit precision before inference.
import torch
from diffusers import ZImagePipeline
pipe = ZImagePipeline.from_pretrained(
"Tongyi-MAI/Z-Image-Turbo",
torch_dtype=torch.bfloat16, # this line
low_cpu_mem_usage=False,
)
Got it. Thanks for the quick response! Looking forward to more of your excellent work~
Yang18
changed discussion status to
closed