Views
No views yet
Part of the Krea 2 Turbo · Alis MLX collection.


Generated by this mixed-4/8 build (8-step Turbo, no guidance, 1024²). This is an independent, unofficial port — not an official Krea product and not endorsed by Krea.
Two builds available — pick by size vs fidelity: • Krea-2-Turbo-Alis-MLX-8bit — 14.2 GB, near-lossless (vel-cos 0.99994) • this repo: mixed-4/8 — 9.8 GB, the smallest near-lossless build (down_proj + endpoints @8-bit, rest @4-bit)
krea-ai/krea-2) before the next stage was built —
float32, fixed seed, each pipeline fed its own raw-prompt inputs.
| Stage | Metric vs PyTorch | Result |
|---|---|---|
| Text encoder (Qwen3-VL-4B) | hidden states, 12 tapped layers | cos 1.000000 |
| Transformer (28-block DiT) | velocity field (rel-L2 3e-5) | cos 1.000000 |
| VAE (Qwen-Image, decode) | pixel cos vs 🤗 diffusers | cos 0.9994 |
| Full pipeline (end-to-end) | pixels, identical injected noise | cos 1.000000 |
krea/Krea-2-Turbo/turbo.safetensors
with zero remapping (all 430 tensor names match the module tree), and the VAE reuses
mflux's already-validated QwenVAE. Raw numbers: VALIDATION_LOG.txt.
(The VAE's 0.9994 is lower than the full pipeline's 1.0 only because it was tested on a random
latent — an OOD torture test; on the real latents the pipeline produces, it rounds to 1.000000.)SingleStreamDiT, 12.9B: 28 blocks × width 6144, GQA (48 query / 12 KV heads,
head-dim 128), per-head QK-RMSNorm, learned sigmoid output gate, SwiGLU (16384), 3-axis RoPE.
A text_fusion module collapses the 12 tapped encoder layers (2 layerwise blocks → Linear(12→1)
→ 2 refiner blocks). Predicts the flow-matching velocity.Qwen3-VL-4B-Instruct, text-only, pure-MLX. For text-only conditioning the
mRoPE collapses to standard rope.AutoencoderKLQwenImage (the Qwen-Image VAE), via mflux QwenVAE.--width/--height 512). On macOS the commands are python3
(not python). Source code, the web UI, and the full validation harness are on GitHub:
github.com/avlp12/krea2_alis_mlx.1python3 -m pip install mlx transformers "mflux>=0.18,<0.19" huggingface_hub gradio
2hf download avlp12/Krea-2-Turbo-Alis-MLX-mixed-4-8 --local-dir krea2-mlx
3cd krea2-mlx
4python3 app.py # opens http://localhost:7860 — type a prompt, click Generate ✨krea/Krea-2-Turbo (you accept Krea's license there), so give it a few minutes; only the
mixed-4/8 transformer lives in this repo. A 1024×1024 image takes ~50 s on an M3 Ultra (8
steps; slower chips take longer). An NSFW safety filter runs by default (redacts explicit
outputs; disable with the UI toggle, --no-safety, or KREA2_DISABLE_SAFETY=1).--precision 8bit.)python3 generate.py "a red fox in the snow, photorealistic" --out fox.png--width/--height 512|768|1024, --steps 8, --seed 0, --num-images 2.1from krea2.pipeline import Krea2Pipeline
2
3pipe = Krea2Pipeline("transformer_mixed_4_8.safetensors", precision="mixed-4-8")
4img = pipe.generate("a neon city street at night in the rain", width=1024, height=1024,
5 steps=8, seed=0)[0]
6img.save("out.png")turbo.safetensors from Krea): python3 generate.py "…" --precision bf16.down_proj and the first/last-2 blocks' attention (the most quantization-sensitive
spots); 4-bit for the rest of the attention + SwiGLU. Everything precision-critical stays
bf16 — first / last, time-embeddings, the whole text_fusion module (incl. the
Linear(12→1) projector), and all norms / modulation. The text encoder and VAE are bf16.| Build | Size (transformer) | Velocity cos vs bf16 (mean / min) | Per-step latency @1024² |
|---|---|---|---|
| bf16 (reference) | 25.6 GB | — | ~5800 ms |
| 8-bit (sibling repo) | 14.2 GB | 0.99994 / 0.99959 | ~5990 ms |
| mixed-4/8 · this release | 9.8 GB | 0.99824 / 0.98710 | ~5990 ms |
| 4-bit | 8.2 GB | 0.99760 / 0.98666 | ~5990 ms |
VALIDATION_LOG.txt.down_proj and the endpoint blocks (which set/read out the few-step
trajectory) keep 8 bits. MXFP4/MXFP8 were also tested and rejected — at comparable size, MLX's
affine quant reconstructs these weights better.krea/Krea-2-Turbo,
distributed under the Krea 2 Community License (a copy is in
LICENSE; attribution in NOTICE). By using these weights you agree to that
license. In particular:opensource@krea.ai).avlp12/Krea-2-Turbo-Alis-MLX-8bit,
avlp12/Lance-3B-Alis-MLX-Traced, avlp12/GLM-5.2-Alis-MLX-Dynamic-3.5bpw.