roygan commited on
Commit
2ac940d
1 Parent(s): 40cf7ca

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -81,9 +81,10 @@ image.save("飞流.png")
81
 
82
  ```py
83
  # !pip install git+https://github.com/huggingface/accelerate
84
- from diffusers import StableDiffusionPipeline
85
-
86
- pipe = StableDiffusionPipeline.from_pretrained("IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-v0.1", torch_dtype=torch.float16, device_map="auto")
 
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]