Spaces:
Running
on
Zero
Running
on
Zero
foivospar
commited on
Commit
·
eb9c2d1
1
Parent(s):
2583838
add lcm-lora support
Browse files
app.py
CHANGED
|
@@ -113,11 +113,11 @@ def generate_image(image_path, num_steps, guidance_scale, seed, num_images, use_
|
|
| 113 |
if use_lcm:
|
| 114 |
pipeline.scheduler = LCMScheduler.from_config(pipeline.scheduler.config)
|
| 115 |
pipeline.enable_lora()
|
| 116 |
-
pipeline
|
| 117 |
else:
|
| 118 |
pipeline.disable_lora()
|
| 119 |
pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
|
| 120 |
-
pipeline
|
| 121 |
|
| 122 |
if image_path is None:
|
| 123 |
raise gr.Error(f"Cannot find any input face image! Please upload a face image.")
|
|
|
|
| 113 |
if use_lcm:
|
| 114 |
pipeline.scheduler = LCMScheduler.from_config(pipeline.scheduler.config)
|
| 115 |
pipeline.enable_lora()
|
| 116 |
+
pipeline.to(device)
|
| 117 |
else:
|
| 118 |
pipeline.disable_lora()
|
| 119 |
pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
|
| 120 |
+
pipeline.to(device)
|
| 121 |
|
| 122 |
if image_path is None:
|
| 123 |
raise gr.Error(f"Cannot find any input face image! Please upload a face image.")
|