Spaces:
Running
on
Zero
Running
on
Zero
adamelliotfields
commited on
Commit
•
4c2b2fd
1
Parent(s):
c1548a1
Fix schedulers
Browse files- demo.py +0 -4
- generate.py +1 -1
- requirements.txt +1 -0
demo.py
CHANGED
@@ -20,10 +20,6 @@ def read_file(path: str) -> str:
|
|
20 |
return file.read()
|
21 |
|
22 |
|
23 |
-
def toggle_json(checkbox: gr.Checkbox, json: gr.JSON) -> None:
|
24 |
-
json.visible = checkbox
|
25 |
-
|
26 |
-
|
27 |
# don't request a GPU if input is bad
|
28 |
def generate_btn_click(*args, **kwargs):
|
29 |
start = time.perf_counter()
|
|
|
20 |
return file.read()
|
21 |
|
22 |
|
|
|
|
|
|
|
|
|
23 |
# don't request a GPU if input is bad
|
24 |
def generate_btn_click(*args, **kwargs):
|
25 |
start = time.perf_counter()
|
generate.py
CHANGED
@@ -74,7 +74,7 @@ class Loader:
|
|
74 |
if karras:
|
75 |
scheduler_kwargs["use_karras_sigmas"] = True
|
76 |
|
77 |
-
if scheduler == "PNDM":
|
78 |
del scheduler_kwargs["use_karras_sigmas"]
|
79 |
|
80 |
variant = (
|
|
|
74 |
if karras:
|
75 |
scheduler_kwargs["use_karras_sigmas"] = True
|
76 |
|
77 |
+
if scheduler == "PNDM" or scheduler == "Euler a":
|
78 |
del scheduler_kwargs["use_karras_sigmas"]
|
79 |
|
80 |
variant = (
|
requirements.txt
CHANGED
@@ -4,6 +4,7 @@ diffusers
|
|
4 |
hf-transfer
|
5 |
gradio==4.39.0
|
6 |
ruff
|
|
|
7 |
spaces
|
8 |
torch
|
9 |
torchvision
|
|
|
4 |
hf-transfer
|
5 |
gradio==4.39.0
|
6 |
ruff
|
7 |
+
scipy # for LMS scheduler
|
8 |
spaces
|
9 |
torch
|
10 |
torchvision
|