Kandinsky-ImageSR-2.0-mlx-4bit

Pure Apple Silicon MLX conversion of kandinskylab/Kandinsky-ImageSR-2.0 (4-bit MLX affine quantized transformer (attention & FFN) + fp32 modulation/tables + FLUX 16-ch VAE (~4.6 GB total).) for mlx-kandinsky-imagesr-2.

  • Format: Native MLX safetensors (NHWC VAE weights + pre-converted Transformer, zero PyTorch/Diffusers runtime)
  • Total Checkpoint Size: 4.77 GB
  • Precision: 4bit (fp32 AdaLN modulation, baked conditioning tables, and force_upcast=true VAE compute)
  • PyTorch Reference Parity (x4, 256β†’1024): Cosine 0.9996446 Β· PSNR 36.31 dB Β· SSIM 0.987985

Before/After Showcase

Quick Start

git clone https://github.com/vanch007/mlx-kandinsky-imagesr-2.git
cd mlx-kandinsky-imagesr-2
uv venv .venv --python 3.12
uv pip install --python .venv/bin/python -e .

# CLI super-resolution (downloads this exact 4bit checkpoint)
.venv/bin/mlx-kandinsky-sr assets/samples/01_portrait_256.png \
  -o outputs/portrait_4x.png \
  --model vanch007/Kandinsky-ImageSR-2.0-mlx-4bit \
  --upscale-factor 4 --creativity 4
from mlx_kandinsky_imagesr import KandinskyImageSRPipeline

pipe = KandinskyImageSRPipeline.from_pretrained("vanch007/Kandinsky-ImageSR-2.0-mlx-4bit")
result = pipe("assets/samples/01_portrait_256.png", upscale_factor=4, creativity=4)
result.images[0].save("portrait_4x.png")

Apple M3 Max Benchmarks

Measured on Apple M3 Max (128 GB), MLX 0.32.5, vae_dtype=float32, tile_batch_size=1:

Resolution Upscale Tile Grid Time (M3 Max) Per Tile Peak Metal RAM
512x512 β†’ 2048x2048 Γ—4 3x3 (9) 135.10 s 15.01 s 15.71 GB
1024x1024 β†’ 2048x2048 Γ—2 3x3 (9) 120.26 s 13.36 s 15.77 GB
1024x1024 β†’ 4096x4096 Γ—4 5x5 (25) 386.88 s 15.47 s 15.77 GB

All Quantization Variants

Repo Quantization Size Recommended For
vanch007/Kandinsky-ImageSR-2.0-mlx-bf16 bf16 ~10.4 GB Max fidelity (32 GB+ Unified Memory)
vanch007/Kandinsky-ImageSR-2.0-mlx-8bit 8bit (g64) ~6.7 GB Near-lossless speed/memory balance (24 GB+ Macs)
vanch007/Kandinsky-ImageSR-2.0-mlx-4bit 4bit (g64) ~4.6 GB Compact footprint (16 GB+ Macs)

License

MIT License (matching kandinskylab/Kandinsky-ImageSR-2.0). The bundled FLUX-compatible 16-channel VAE follows the Apache-2.0 license of black-forest-labs/FLUX.1-schnell.

Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for vanch007/Kandinsky-ImageSR-2.0-mlx-4bit

Finetuned
(7)
this model