Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,13 +61,13 @@ def generate(
|
|
| 61 |
if torch.cuda.is_available():
|
| 62 |
|
| 63 |
if not use_vae:
|
| 64 |
-
|
| 65 |
-
pipe =
|
| 66 |
|
| 67 |
if use_vae:
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
pipe =
|
| 71 |
|
| 72 |
if use_lora:
|
| 73 |
pipe.load_lora_weights(lora)
|
|
|
|
| 61 |
if torch.cuda.is_available():
|
| 62 |
|
| 63 |
if not use_vae:
|
| 64 |
+
pipe = DiffusionPipeline.from_pretrained(dropdown_model, torch_dtype=torch.float16)
|
| 65 |
+
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
| 66 |
|
| 67 |
if use_vae:
|
| 68 |
+
vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
|
| 69 |
+
pipe = DiffusionPipeline.from_pretrained(dropdown_model, vae=vae, torch_dtype=torch.float16)
|
| 70 |
+
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
| 71 |
|
| 72 |
if use_lora:
|
| 73 |
pipe.load_lora_weights(lora)
|