Instructions to use vanch007/Kandinsky-ImageSR-2.0-mlx-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use vanch007/Kandinsky-ImageSR-2.0-mlx-4bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download vanch007/Kandinsky-ImageSR-2.0-mlx-4bit --local-dir Kandinsky-ImageSR-2.0-mlx-4bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
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(fp32AdaLN modulation, baked conditioning tables, andforce_upcast=trueVAE compute) - PyTorch Reference Parity (
x4,256β1024): Cosine0.9996446Β· PSNR36.31 dBΒ· SSIM0.987985
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.
Hardware compatibility
Log In to add your hardware
Quantized
Model tree for vanch007/Kandinsky-ImageSR-2.0-mlx-4bit
Base model
kandinskylab/Kandinsky-ImageSR-2.0