Snb-ai commited on
Commit
7f50a5b
·
1 Parent(s): 4ef65f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -5,7 +5,8 @@ from diffusers import StableDiffusionPipeline
5
 
6
  #model_id = "hakurei/waifu-diffusion"
7
  pipe = StableDiffusionPipeline.from_pretrained("hakurei/waifu-diffusion", torch_type=torch.float16, revision="fp16")
8
- torch.backends.cudnn.benchmark = True
 
9
  num_samples = 2
10
 
11
  def infer(prompt):
 
5
 
6
  #model_id = "hakurei/waifu-diffusion"
7
  pipe = StableDiffusionPipeline.from_pretrained("hakurei/waifu-diffusion", torch_type=torch.float16, revision="fp16")
8
+ device = torch.device("cpu")
9
+ pipe = pipe.to(device)
10
  num_samples = 2
11
 
12
  def infer(prompt):