Update README.md
Browse files
README.md
CHANGED
@@ -20,18 +20,23 @@ This repository is based on [Diffusers](https://huggingface.co/docs/diffusers/in
|
|
20 |
Load StableDiffusionPAGPipeline as below:
|
21 |
|
22 |
```
|
|
|
|
|
23 |
pipe = StableDiffusionPipeline.from_pretrained(
|
24 |
"runwayml/stable-diffusion-v1-5",
|
25 |
custom_pipeline="hyoungwoncho/sd_perturbed_attention_guidance",
|
26 |
torch_dtype=torch.float16,
|
27 |
safety_checker=None
|
28 |
)
|
|
|
|
|
|
|
29 |
```
|
30 |
|
31 |
Sampling:
|
32 |
|
33 |
```
|
34 |
-
|
35 |
prompts,
|
36 |
width=512,
|
37 |
height=512,
|
|
|
20 |
Load StableDiffusionPAGPipeline as below:
|
21 |
|
22 |
```
|
23 |
+
from diffusers import StableDiffusionPipeline
|
24 |
+
|
25 |
pipe = StableDiffusionPipeline.from_pretrained(
|
26 |
"runwayml/stable-diffusion-v1-5",
|
27 |
custom_pipeline="hyoungwoncho/sd_perturbed_attention_guidance",
|
28 |
torch_dtype=torch.float16,
|
29 |
safety_checker=None
|
30 |
)
|
31 |
+
|
32 |
+
device="cuda"
|
33 |
+
pipe = pipe.to(device)
|
34 |
```
|
35 |
|
36 |
Sampling:
|
37 |
|
38 |
```
|
39 |
+
output = pipe(
|
40 |
prompts,
|
41 |
width=512,
|
42 |
height=512,
|