Spaces:
Running
on
A10G
Running
on
A10G
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ import torch
|
|
12 |
import numpy as np
|
13 |
import cv2
|
14 |
|
15 |
-
|
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 |
-
|
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
|