Instructions to use microsoft/Lens-Turbo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use microsoft/Lens-Turbo 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-Turbo", 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
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -330,7 +330,7 @@ pipe = LensPipeline.from_pretrained(
|
|
| 330 |
).to("cuda")
|
| 331 |
|
| 332 |
image = pipe(
|
| 333 |
-
prompt="A cat holding a sign that says hello world",
|
| 334 |
base_resolution=1440, aspect_ratio="1:1",
|
| 335 |
num_inference_steps=4, guidance_scale=1.0,
|
| 336 |
generator=torch.Generator("cuda").manual_seed(0),
|
|
|
|
| 330 |
).to("cuda")
|
| 331 |
|
| 332 |
image = pipe(
|
| 333 |
+
prompt="A cat holding a sign that says \"hello world\"",
|
| 334 |
base_resolution=1440, aspect_ratio="1:1",
|
| 335 |
num_inference_steps=4, guidance_scale=1.0,
|
| 336 |
generator=torch.Generator("cuda").manual_seed(0),
|