linoyts HF staff commited on
Commit
bf71114
1 Parent(s): 5a5c0c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,8 +6,8 @@ from diffusers import StableDiffusionXLPipeline, EulerDiscreteScheduler, Autoen
6
  import time
7
  import numpy as np
8
 
9
- #vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
10
- pipe = StableDiffusionXLPipeline.from_pretrained("sd-community/sdxl-flash").to("cuda", torch.float16)
11
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
12
  clip_slider = CLIPSliderXL(pipe, device=torch.device("cuda"))
13
 
 
6
  import time
7
  import numpy as np
8
 
9
+ vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
10
+ pipe = StableDiffusionXLPipeline.from_pretrained("sd-community/sdxl-flash", vae=vae).to("cuda", torch.float16)
11
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
12
  clip_slider = CLIPSliderXL(pipe, device=torch.device("cuda"))
13