YuCollection commited on
Commit
876c3c3
·
verified ·
1 Parent(s): 1604ae1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -0
README.md CHANGED
@@ -101,9 +101,11 @@ Pick a variant by passing its repo id to `--repo_id` (CLI) or `LensPipeline.from
101
  ```python
102
  import torch
103
  from lens import LensPipeline
 
104
  pipe = LensPipeline.from_pretrained(
105
  "microsoft/Lens", torch_dtype=torch.bfloat16
106
  ).to("cuda")
 
107
  image = pipe(
108
  prompt="A cat holding a sign that says \"hello world\"",
109
  base_resolution=1440, aspect_ratio="1:1",
@@ -112,6 +114,7 @@ image = pipe(
112
  ).images[0]
113
  image.save("lens.png")
114
  ```
 
115
  To trade speed for VRAM, replace `.to("cuda")` with `pipe.enable_model_cpu_offload()`.
116
 
117
  **CLI — basic usage:**
 
101
  ```python
102
  import torch
103
  from lens import LensPipeline
104
+
105
  pipe = LensPipeline.from_pretrained(
106
  "microsoft/Lens", torch_dtype=torch.bfloat16
107
  ).to("cuda")
108
+
109
  image = pipe(
110
  prompt="A cat holding a sign that says \"hello world\"",
111
  base_resolution=1440, aspect_ratio="1:1",
 
114
  ).images[0]
115
  image.save("lens.png")
116
  ```
117
+
118
  To trade speed for VRAM, replace `.to("cuda")` with `pipe.enable_model_cpu_offload()`.
119
 
120
  **CLI — basic usage:**