fffiloni commited on
Commit
be9073e
1 Parent(s): d1d4c1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ import torch
12
  import numpy as np
13
  import cv2
14
 
15
- #vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
16
  controlnet = ControlNetModel.from_pretrained(
17
  "diffusers/controlnet-canny-sdxl-1.0",
18
  torch_dtype=torch.float16
@@ -21,7 +21,7 @@ controlnet = ControlNetModel.from_pretrained(
21
  pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
22
  "stabilityai/stable-diffusion-xl-base-1.0",
23
  controlnet=controlnet,
24
- #vae=vae,
25
  torch_dtype=torch.float16,
26
  variant="fp16",
27
  use_safetensors=True
 
12
  import numpy as np
13
  import cv2
14
 
15
+ vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
16
  controlnet = ControlNetModel.from_pretrained(
17
  "diffusers/controlnet-canny-sdxl-1.0",
18
  torch_dtype=torch.float16
 
21
  pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
22
  "stabilityai/stable-diffusion-xl-base-1.0",
23
  controlnet=controlnet,
24
+ vae=vae,
25
  torch_dtype=torch.float16,
26
  variant="fp16",
27
  use_safetensors=True