Update README.md
Browse files
README.md
CHANGED
@@ -160,3 +160,33 @@ grid
|
|
160 |
```
|
161 |
|
162 |

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
```
|
161 |
|
162 |

|
163 |
+
|
164 |
+
Image generation - Example #3:
|
165 |
+
|
166 |
+
```python
|
167 |
+
prompt="""A cube in the shape of a <leaf microstructure>, made out of limestone, holding a sign that says 'MATERIOMICS'.
|
168 |
+
|
169 |
+
The cube is placed in a stunning mountain landscape.
|
170 |
+
|
171 |
+
The cube shows intricate patterns of <leaf microstructure>.
|
172 |
+
"""
|
173 |
+
|
174 |
+
num_samples =2
|
175 |
+
num_rows = 2
|
176 |
+
n_steps=25
|
177 |
+
guidance_scale=3.5
|
178 |
+
all_images = []
|
179 |
+
for _ in range(num_rows):
|
180 |
+
|
181 |
+
|
182 |
+
image = pipeline(prompt,num_inference_steps=n_steps,num_images_per_prompt=num_samples,
|
183 |
+
guidance_scale=guidance_scale,).images
|
184 |
+
|
185 |
+
all_images.extend(image)
|
186 |
+
|
187 |
+
grid = image_grid(all_images, num_rows, num_samples,
|
188 |
+
save_individual_files=True, )
|
189 |
+
grid
|
190 |
+
```
|
191 |
+
|
192 |
+

|