Instructions to use LocalMuseAI/mlx-z-anime-distill-4step-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use LocalMuseAI/mlx-z-anime-distill-4step-4bit with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("LocalMuseAI/mlx-z-anime-distill-4step-4bit", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - MLX
How to use LocalMuseAI/mlx-z-anime-distill-4step-4bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download LocalMuseAI/mlx-z-anime-distill-4step-4bit --local-dir mlx-z-anime-distill-4step-4bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Draw Things
- DiffusionBee
- Atomic Chat
Z-Anime Distill 4-Step โ MLX int4
Format conversion for LocalMuse of SeeSee21's Z-Anime Distill-4-Step
(diffusion_models/z-anime-distill-4step-bf16.safetensors from
SeeSee21/Z-Anime at revision
0f5fb51464638a2f7328a1d74590281e63e1fde2). Credit belongs to
SeeSee21. This repository only changes the
tensor format (int4 MLX); no training, LoRA or model merge was performed here.
License and attribution
Z-Anime is released by its author under Apache 2.0, and it is a fine-tune
of Tongyi-MAI/Z-Image (Apache 2.0).
The checkpoint's embedded ComfyUI save metadata (preserved under source.* in
transformer/model.safetensors) shows the 4-step variant is Z-Anime Base with
alibaba-pai/Z-Image-Fun-Lora-Distill
Z-Image-Fun-Lora-Distill-4-Steps-2603 (Apache 2.0) merged at strength 1.0 by
the author. The Qwen3-4B encoder, tokenizer and 16-channel VAE are the official
Tongyi-MAI/Z-Image-Turbo
components (Apache 2.0). See LICENSE and source.json.
Modifications: the DiT's attention and feed-forward weights were quantized to affine int4 (group 64) and Q/K/V were split; the encoder was quantized to int4 and truncated to the 35 layers whose penultimate hidden state is consumed.
Settings (author's recommendation)
- Text to Image, batch one, 896 ร 1152 (default) or 1024 ร 1024.
- Euler / beta (ComfyUI
beta_scheduler, alpha = beta = 0.6), 4 steps (up to 6), distilled CFG 1.0, no negative prompt. - Static flow shift 3.5 (
ModelSamplingAuraFlow, from the author's workflow), 1000-point training sigma grid, reversed model time1-sigma, negative model velocity.runtime_config.jsonrecords the shift. - Natural-language prompts work best.
Tensor contract
Profile zImageTurbo6B4Bit, MLX Swift 0.31.4 (conversion with MLX Python
0.31.2). S3-DiT attention/FFN: affine int4, group 64; embedders, modulation and
norms stay BF16. Original 16-channel VAE (scale 0.3611, shift 0.1159) decoded in
FP32 overlapping 384-pixel windows. Encoder, transformer and decoder load and
evict sequentially.
The eight runtime files total 6,046,965,458 bytes; every size and SHA-256 is
in manifest.json. The encoder, tokenizer and VAE bytes are identical to
LocalMuse's validated Z-Image profile. Source checkpoint SHA-256:
4a083f389432c5cf04bfa686a1e819f894d01e4a00bdf02e846617e17052ac77.
Validation
Native MLX inference with Metal API validation on an Apple M1 Pro / 16 GiB (Swift Debug build, not iPhone timing):
| Canvas | Steps | Seed | Total | Peak MLX allocation |
|---|---|---|---|---|
| 896 ร 1152 | 4 | 1729 | 128.35 s | 4,760,601,834 B |
| 1024 ร 1024 | 4 | 42 | 127.72 s | 4,769,023,210 B |
| 896 ร 1152 | 6 | 1729 | 183.05 s | 4,760,601,834 B |
Each run reported two preparation stages and one live preview per step. Renders were visually reviewed. Physical iPhone validation is pending.
- Downloads last month
- -
4-bit

