Instructions to use SceneWorks/Lens with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use SceneWorks/Lens with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("SceneWorks/Lens", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
File size: 2,075 Bytes
5c5521d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ---
license: mit
library_name: diffusers
pipeline_tag: text-to-image
tags:
- text-to-image
- lens
- flux
- gpt-oss
---
# Lens (base)
Self-contained diffusers-layout snapshot of Microsoft's **Lens** text-to-image model, re-assembled for
in-house (SceneWorks) use after Microsoft removed the original `microsoft/Lens` repository from the Hub.
This is a **repackage**, not a retrain — every weight is byte-identical to a public upstream source
(verified by tensor-level comparison against Comfy-Org's authentic redistribution):
| Component | Source | License |
|------------------|------------------------------------------------------------------------|------------|
| `transformer/` | Lens DiT, bf16 — from [`Comfy-Org/Lens`](https://huggingface.co/Comfy-Org/Lens) (`diffusion_models/lens_bf16.safetensors`) | MIT |
| `text_encoder/` | gpt-oss-20b (MXFP4), used encoder-only — from [`openai/gpt-oss-20b`](https://huggingface.co/openai/gpt-oss-20b) | Apache-2.0 |
| `tokenizer/` | gpt-oss tokenizer — from [`openai/gpt-oss-20b`](https://huggingface.co/openai/gpt-oss-20b) | Apache-2.0 |
| `vae/` | FLUX.2 VAE (`AutoencoderKLFlux2`) — from [`black-forest-labs/FLUX.2-dev`](https://huggingface.co/black-forest-labs/FLUX.2-dev) | FLUX.2-dev license |
The Lens text encoder is stock, frozen `gpt-oss-20b` (tensor-verified identical to Comfy's
`gpt_oss_20b_nvfp4` up to quantization), and the VAE is stock FLUX.2-dev (full-file identical to
Comfy's `flux2-vae`). Only the `transformer/` DiT is Lens-specific.
## Layout
```
tokenizer/ tokenizer.json, tokenizer_config.json, special_tokens_map.json
text_encoder/ model-0000*-of-00002.safetensors (MXFP4), model.safetensors.index.json, config.json
transformer/ lens_bf16.safetensors
vae/ diffusion_pytorch_model.safetensors, config.json
```
Sampling defaults for the base model: **20 steps, guidance 5.0**. For the distilled variant see
`SceneWorks/Lens-Turbo` (4 steps, guidance 1.0).
|