Instructions to use microsoft/Lens with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use microsoft/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("microsoft/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
- Draw Things
- DiffusionBee
Microsoft Lens already on LoboForge
#1
by maxlobo - opened
Hi β I'm not affiliated with Microsoft or the model authors, just a user sharing where I've been running this.
LoboForge has Microsoft Lens (Lens Turbo) live on their GPU fleet, and it's free for signed-in users (no tokens charged for Lens generations on their generate page).
If you want to try it without setting up ComfyUI locally:
Site: https://www.loboforge.com/
Generate: https://www.loboforge.com/generate?src=huggingface&utm_campaign=microsoft-lens β pick Microsoft Lens (marked free)