Views
No views yet
microsoft/Lens — a 3.8B-parameter foundational
text-to-image model — for fast inference on Apple Silicon. bf16, full precision.| component | parity vs PyTorch reference |
|---|---|
| GPT-OSS text features | per-layer cosine ≈ 0.998 |
| Lens DiT (this repo) | cosine 0.999999 |
| FLUX.2 VAE decode | PSNR 57.65 dB |
| full end-to-end image | PSNR 45.26 dB |

1from lens_mlx.pipeline_mlx import LensPipeline # github.com/xocialize/lens-mlx
2
3# `base` = a microsoft/Lens snapshot providing the tokenizer, GPT-OSS encoder, and FLUX.2 VAE.
4pipe = LensPipeline.from_pretrained(base, dit_repo="mlx-community/Lens-3.8B-bf16")
5img = pipe("A serene lake below snow-capped mountains, golden hour.",
6 height=1024, width=1024, num_inference_steps=20, seed=42)
7img.save("out.png")microsoft/Lens with recipes/convert_lens.py (lens-mlx). The DiT is pure
Linear + RMSNorm; weights map 1:1 (no transpose) and every tensor is materialized before
save. Layer-by-layer parity against the PyTorch reference is in the lens-mlx test suite.microsoft/Lens.