Skip to content

[Feat] Add LensPipeline (microsoft/Lens)#13837

Open
RuixiangMa wants to merge 2 commits into
huggingface:mainfrom
RuixiangMa:LensPipeline
Open

[Feat] Add LensPipeline (microsoft/Lens)#13837
RuixiangMa wants to merge 2 commits into
huggingface:mainfrom
RuixiangMa:LensPipeline

Conversation

@RuixiangMa
Copy link
Copy Markdown
Contributor

What does this PR do?

Add support for Lens , text-to-image models from Microsoft.
Repoid: microsoft/Lens

import torch
from diffusers import LensPipeline

pipe = LensPipeline.from_pretrained("microsoft/Lens", torch_dtype=torch.bfloat16)
pipe.to("cuda")

prompt = "A steampunk floating sky-city built on massive gear-driven platforms, 
brass and copper towers connected by chain bridges, steam-powered airships and 
hot air balloons docking at various levels, sunset clouds below the city, detailed concept art"
generator = torch.Generator("cuda").manual_seed(42)
image = pipe(prompt, height=1440, width=1440, num_inference_steps=20, guidance_scale=5.0, generator=generator).images[0]
image.save("lens.png")
lens lens3 lens2

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Signed-off-by: Lancer <maruixiang6688@gmail.com>
@github-actions github-actions Bot added models pipelines size/L PR with diff > 200 LOC labels May 29, 2026
@RuixiangMa RuixiangMa changed the title [Feat] Add LensPipeline [Feat] Add LensPipeline (microsoft/Lens) May 29, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests labels May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation models pipelines size/L PR with diff > 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant