MASHBOX Labs

Z-Image-Turbo in BSHJ

Weights only: the mashbox package, release 0.1.10, has no mashbox run command for this model.

GitHub X

Tongyi-MAI's Z-Image-Turbo text-to-image model as BSHJ files, the weight format the mashbox TPU engine reads. The diffusion transformer, the text encoder and the VAE each come as one file at upstream precision.

Files

File What Size (GB) Tensors From upstream
transformer.bshj diffusion transformer 24.62 521, float32 transformer/diffusion_pytorch_model-0000{1,2,3}-of-00003.safetensors
text_encoder.bshj text encoder 8.05 398, bfloat16 text_encoder/model-0000{1,2,3}-of-00003.safetensors
vae.bshj VAE, encoder and decoder 0.17 244, bfloat16 vae/diffusion_pytorch_model.safetensors

Tensor names, shapes and dtypes are the upstream safetensors' (layers.0.attention.to_q.weight style names in the transformer, model.layers.0.self_attn.q_proj.weight in the text encoder). Each file's header lists the upstream shards it came from. The tokenizer, the scheduler config and the model configs stay in Tongyi-MAI/Z-Image-Turbo.

Load

The mashbox package's BSHJ reader opens the files as NumPy arrays over a memory map, without copying:

pip install mashbox
from huggingface_hub import hf_hub_download
from mashbox import bshj

f = bshj.File(hf_hub_download("mashbox-labs/Z-Image-Turbo-TPU", "vae.bshj"))
print(f.meta()["model"])                # upstream repo and revision
b = f.array("decoder.conv_in.bias")     # bfloat16, shape (512,)

Links

Original model Tongyi-MAI/Z-Image-Turbo by Tongyi-MAI
BSHJ reader src/mashbox/bshj.py
Companies hello@mashbox.gg

Licence

Apache-2.0, as stated by Tongyi-MAI/Z-Image-Turbo in its model card. That repo has no separate licence file.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Collection including mashbox-labs/Z-Image-Turbo-TPU