multimodalart HF staff commited on
Commit
a72f06d
·
1 Parent(s): 8e247af

Test new fix

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,10 +3,10 @@ import torch
3
  from torch import autocast
4
  from diffusers import StableDiffusionPipeline
5
 
6
- model_id = "hakurei/waifu-diffusion"
7
- pipe = StableDiffusionPipeline.from_pretrained(model_id)
8
  pipe = pipe.to("cuda")
9
- torch.backends.cudnn.benchmark = True
10
  num_samples = 2
11
 
12
  def infer(prompt):
 
3
  from torch import autocast
4
  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
  pipe = pipe.to("cuda")
9
+ #torch.backends.cudnn.benchmark = True
10
  num_samples = 2
11
 
12
  def infer(prompt):