Instructions to use ANetResearch/Z-Image-Turbo-kllm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ANetResearch/Z-Image-Turbo-kllm with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ANetResearch/Z-Image-Turbo-kllm", 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 Settings
- Draw Things
- DiffusionBee
Submit to get the model key
The information you provide will be collected, stored, processed and shared in accordance with the ANet Research Privacy Policy.
The weights in this repository are locked: any engine loads them, but without the key they compute nothing useful. Submitting this form gives you access to the files, including the key (kllm.key).
Log in or Sign Up to review the conditions and access this model content.
Z-Image-Turbo-kllm
Tongyi-MAI/Z-Image-Turbo (revision f332072aa7), sealed with
kLLM under the perm transform. The weights keep
the original layout, file and tensor names, and any engine loads them, but every weight is
encrypted in place under this model's key: without it the model computes nothing useful.
kllm serve --key unlocks the weights and runs them with the permuted tokenizer in
trusted.kllm, encrypted under the same key.
| key fingerprint | b589-cfb7-04f6-cf7b (key version 1) |
| modality | text to image |
| license | apache-2.0, the same as the base model |
Getting the key
Submit the form at the top of this page, logged in to Hugging Face. Access is granted at once, and kllm.key in this repository is the model key, without a passphrase: it comes with hf download. Everyone who submits gets the same key, so keep it to yourself; the publisher sees who has access, and can rotate the key (key_version).
Running it
pip install 'kllm[seal,serve]'
hf auth login # after submitting the form above
hf download ANetResearch/Z-Image-Turbo-kllm --local-dir Z-Image-Turbo-kllm
# keyless in the cloud: the key and the tokenizer stay with you
kllm cloud Z-Image-Turbo-kllm -o Z-Image-Turbo-kllm-cloud --key Z-Image-Turbo-kllm/kllm.key # unlocks; upload Z-Image-Turbo-kllm-cloud only
kllm serve Z-Image-Turbo-kllm-cloud --client --port 30010 # in the cloud
kllm client generate Z-Image-Turbo-kllm "a red fox in fresh snow" --url http://CLOUD:30010 --key Z-Image-Turbo-kllm/kllm.key
What this protects
The base model is public, so sealing it does not protect the weights. What it gives:
- Without the key, the files here are encrypted (AES-CTR under a key derived from the model key); they cannot be matched to the base, and they compute nothing useful.
- Engine logs, request captures and stored payloads hold permuted token ids, not text.
Serving keyless (
kllm serve --client), the cloud gets neither the key nor the tokenizer, and images come back encrypted to the requester.
Wherever the model is unlocked to run, the sealed weights are in the clear, and with the base model at hand they can be matched to it.
Against a cloud that deliberately analyzes GPU memory or token ids, this is not protection: token ids are a substitution cipher. See What the cloud can and cannot learn.
Checking it
With the key, rebuild the sealed weights from the public base and compare them tensor by tensor:
kllm verify Z-Image-Turbo-kllm --base Tongyi-MAI/Z-Image-Turbo --revision f332072aa78be7aecdf3ee76d5c247082da564a6 --key Z-Image-Turbo-kllm.key
kllm-manifest.json lists the sha256 of every file here.
- Downloads last month
- -
Model tree for ANetResearch/Z-Image-Turbo-kllm
Base model
Tongyi-MAI/Z-Image-Turbo