Spaces:
Sleeping
Sleeping
amazonaws-la
commited on
Commit
•
496b26c
1
Parent(s):
c387c79
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import numpy as np
|
|
10 |
import PIL.Image
|
11 |
import spaces
|
12 |
import torch
|
13 |
-
from diffusers import
|
14 |
|
15 |
DESCRIPTION = "# SDXL"
|
16 |
if not torch.cuda.is_available():
|
@@ -61,12 +61,10 @@ def generate(
|
|
61 |
|
62 |
if not use_vae:
|
63 |
pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
|
64 |
-
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
65 |
|
66 |
if use_vae:
|
67 |
vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
|
68 |
pipe = DiffusionPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16)
|
69 |
-
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
70 |
|
71 |
if use_lora:
|
72 |
pipe.load_lora_weights(lora)
|
|
|
10 |
import PIL.Image
|
11 |
import spaces
|
12 |
import torch
|
13 |
+
from diffusers import AutoencoderKL, DiffusionPipeline
|
14 |
|
15 |
DESCRIPTION = "# SDXL"
|
16 |
if not torch.cuda.is_available():
|
|
|
61 |
|
62 |
if not use_vae:
|
63 |
pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
|
|
|
64 |
|
65 |
if use_vae:
|
66 |
vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
|
67 |
pipe = DiffusionPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16)
|
|
|
68 |
|
69 |
if use_lora:
|
70 |
pipe.load_lora_weights(lora)
|