Update README.md
Browse files
README.md
CHANGED
@@ -81,9 +81,10 @@ image.save("飞流.png")
|
|
81 |
|
82 |
```py
|
83 |
# !pip install git+https://github.com/huggingface/accelerate
|
84 |
-
|
85 |
-
|
86 |
-
pipe = StableDiffusionPipeline.from_pretrained("IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-v0.1", torch_dtype=torch.float16
|
|
|
87 |
|
88 |
prompt = '飞流直下三千尺,油画'
|
89 |
image = pipe(prompt, guidance_scale=7.5).images[0]
|
|
|
81 |
|
82 |
```py
|
83 |
# !pip install git+https://github.com/huggingface/accelerate
|
84 |
+
import torch
|
85 |
+
torch.backends.cudnn.benchmark = True
|
86 |
+
pipe = StableDiffusionPipeline.from_pretrained("IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-v0.1", torch_dtype=torch.float16)
|
87 |
+
pipe.to('cuda')
|
88 |
|
89 |
prompt = '飞流直下三千尺,油画'
|
90 |
image = pipe(prompt, guidance_scale=7.5).images[0]
|