Spaces:
Runtime error
Runtime error
Update app.py
Browse filesLoad VAE in float16 mode
app.py
CHANGED
@@ -46,11 +46,16 @@ download(
|
|
46 |
"https://civitai.com/api/download/models/290640?type=VAE&format=SafeTensor",
|
47 |
)
|
48 |
|
49 |
-
vae = AutoencoderKL.from_single_file(
|
|
|
|
|
|
|
50 |
|
51 |
# pipe = StableDiffusionXLImg2ImgPipeline.from_single_file(
|
52 |
pipe = StableDiffusionXLPipeline.from_single_file(
|
53 |
-
model_path,
|
|
|
|
|
54 |
)
|
55 |
pipe = pipe.to("cuda")
|
56 |
|
|
|
46 |
"https://civitai.com/api/download/models/290640?type=VAE&format=SafeTensor",
|
47 |
)
|
48 |
|
49 |
+
vae = AutoencoderKL.from_single_file(
|
50 |
+
vae_path,
|
51 |
+
torch_dtype=torch.float16,
|
52 |
+
)
|
53 |
|
54 |
# pipe = StableDiffusionXLImg2ImgPipeline.from_single_file(
|
55 |
pipe = StableDiffusionXLPipeline.from_single_file(
|
56 |
+
model_path,
|
57 |
+
torch_dtype=torch.float16,
|
58 |
+
vae=vae,
|
59 |
)
|
60 |
pipe = pipe.to("cuda")
|
61 |
|