Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -57,8 +57,6 @@ def generate(
|
|
57 |
url = '',
|
58 |
):
|
59 |
if torch.cuda.is_available():
|
60 |
-
|
61 |
-
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
62 |
|
63 |
if not use_img2img:
|
64 |
pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
|
@@ -85,9 +83,12 @@ def generate(
|
|
85 |
if use_lora:
|
86 |
pipe.load_lora_weights(lora)
|
87 |
pipe.fuse_lora(lora_scale)
|
88 |
-
|
|
|
|
|
89 |
else:
|
90 |
pipe.to(device)
|
|
|
91 |
|
92 |
generator = torch.Generator().manual_seed(seed)
|
93 |
|
|
|
57 |
url = '',
|
58 |
):
|
59 |
if torch.cuda.is_available():
|
|
|
|
|
60 |
|
61 |
if not use_img2img:
|
62 |
pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
|
|
|
83 |
if use_lora:
|
84 |
pipe.load_lora_weights(lora)
|
85 |
pipe.fuse_lora(lora_scale)
|
86 |
+
|
87 |
+
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
88 |
+
|
89 |
else:
|
90 |
pipe.to(device)
|
91 |
+
|
92 |
|
93 |
generator = torch.Generator().manual_seed(seed)
|
94 |
|