Commit
·
333e783
1
Parent(s):
9148236
Update README.md
Browse files
README.md
CHANGED
|
@@ -22,6 +22,21 @@ dataset_info:
|
|
| 22 |
download_size: 191500777
|
| 23 |
dataset_size: 191652463.0
|
| 24 |
---
|
| 25 |
-
#
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
download_size: 191500777
|
| 23 |
dataset_size: 191652463.0
|
| 24 |
---
|
| 25 |
+
# Images of Parti Prompts for "sd-v2.1"
|
| 26 |
|
| 27 |
+
Code that was used to get the results:
|
| 28 |
+
|
| 29 |
+
```py
|
| 30 |
+
from diffusers import DiffusionPipeline, DDIMScheduler
|
| 31 |
+
import torch
|
| 32 |
+
|
| 33 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1", torch_dtype=torch.float16, safety_checker=None)
|
| 34 |
+
pipe.to("cuda")
|
| 35 |
+
pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
|
| 36 |
+
|
| 37 |
+
prompt = "" # a parti prompt
|
| 38 |
+
generator = torch.Generator("cuda").manual_seed(0)
|
| 39 |
+
|
| 40 |
+
image = pipe(prompt, generator=generator, num_inference_steps=100, guidance_scale=7.5).images[0]
|
| 41 |
+
image = image.resize((256, 256), resample=PIL.Image.Resampling.LANCZOS)
|
| 42 |
+
```
|