Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Disable api
Browse files- app_flux.py +2 -3
- app_ltx_video.py +1 -2
- utils.py +2 -8
app_flux.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
import os
|
2 |
import replicate_gradio
|
|
|
3 |
from utils import get_app
|
4 |
|
5 |
demo = get_app(
|
@@ -7,11 +7,10 @@ demo = get_app(
|
|
7 |
"black-forest-labs/flux-depth-pro",
|
8 |
"black-forest-labs/flux-canny-pro",
|
9 |
"black-forest-labs/flux-fill-pro",
|
10 |
-
"black-forest-labs/flux-depth-dev"
|
11 |
],
|
12 |
default_model="black-forest-labs/flux-depth-pro",
|
13 |
src=replicate_gradio.registry,
|
14 |
-
is_chat=False
|
15 |
)
|
16 |
|
17 |
if __name__ == "__main__":
|
|
|
|
|
1 |
import replicate_gradio
|
2 |
+
|
3 |
from utils import get_app
|
4 |
|
5 |
demo = get_app(
|
|
|
7 |
"black-forest-labs/flux-depth-pro",
|
8 |
"black-forest-labs/flux-canny-pro",
|
9 |
"black-forest-labs/flux-fill-pro",
|
10 |
+
"black-forest-labs/flux-depth-dev",
|
11 |
],
|
12 |
default_model="black-forest-labs/flux-depth-pro",
|
13 |
src=replicate_gradio.registry,
|
|
|
14 |
)
|
15 |
|
16 |
if __name__ == "__main__":
|
app_ltx_video.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
import os
|
2 |
import fal_gradio
|
|
|
3 |
from utils import get_app
|
4 |
|
5 |
demo = get_app(
|
@@ -9,7 +9,6 @@ demo = get_app(
|
|
9 |
],
|
10 |
default_model="fal-ai/ltx-video/image-to-video",
|
11 |
src=fal_gradio.registry,
|
12 |
-
is_chat=False
|
13 |
)
|
14 |
|
15 |
if __name__ == "__main__":
|
|
|
|
|
1 |
import fal_gradio
|
2 |
+
|
3 |
from utils import get_app
|
4 |
|
5 |
demo = get_app(
|
|
|
9 |
],
|
10 |
default_model="fal-ai/ltx-video/image-to-video",
|
11 |
src=fal_gradio.registry,
|
|
|
12 |
)
|
13 |
|
14 |
if __name__ == "__main__":
|
utils.py
CHANGED
@@ -8,7 +8,6 @@ def get_app(
|
|
8 |
default_model: str,
|
9 |
src: Callable[[str, str | None], gr.Blocks] | Literal["models"],
|
10 |
accept_token: bool = False,
|
11 |
-
is_chat: bool = True,
|
12 |
**kwargs,
|
13 |
) -> gr.Blocks:
|
14 |
def update_model(new_model: str) -> list[gr.Column]:
|
@@ -32,12 +31,7 @@ def get_app(
|
|
32 |
queue=False,
|
33 |
)
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
del demo.fns[k]
|
38 |
-
else:
|
39 |
-
for k, v in list(demo.fns.items()):
|
40 |
-
if isinstance(v.api_name, str) and "chat" in v.api_name:
|
41 |
-
del demo.fns[k]
|
42 |
|
43 |
return demo
|
|
|
8 |
default_model: str,
|
9 |
src: Callable[[str, str | None], gr.Blocks] | Literal["models"],
|
10 |
accept_token: bool = False,
|
|
|
11 |
**kwargs,
|
12 |
) -> gr.Blocks:
|
13 |
def update_model(new_model: str) -> list[gr.Column]:
|
|
|
31 |
queue=False,
|
32 |
)
|
33 |
|
34 |
+
for fn in demo.fns.values():
|
35 |
+
fn.api_name = False
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
return demo
|