Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
53c249d
1
Parent(s):
4880d13
app.py
CHANGED
|
@@ -11,44 +11,45 @@ from loguru import logger
|
|
| 11 |
from tqdm import tqdm
|
| 12 |
from tools.common_utils import save_video
|
| 13 |
from dkt.pipelines.wan_video_new import WanVideoPipeline, ModelConfig
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
|
|
|
| 52 |
|
| 53 |
import cv2
|
| 54 |
import copy
|
|
@@ -690,10 +691,11 @@ if __name__ == '__main__':
|
|
| 690 |
logger.info('model init done!')
|
| 691 |
print('model init done!')
|
| 692 |
|
| 693 |
-
|
| 694 |
-
|
| 695 |
-
|
| 696 |
-
|
|
|
|
| 697 |
|
| 698 |
|
| 699 |
# server_name="0.0.0.0", server_port=7860
|
|
|
|
| 11 |
from tqdm import tqdm
|
| 12 |
from tools.common_utils import save_video
|
| 13 |
from dkt.pipelines.wan_video_new import WanVideoPipeline, ModelConfig
|
| 14 |
+
|
| 15 |
+
# try:
|
| 16 |
+
# import gradio_client.utils as _gc_utils
|
| 17 |
+
# if hasattr(_gc_utils, "get_type"):
|
| 18 |
+
# _orig_get_type = _gc_utils.get_type
|
| 19 |
+
# def _get_type_safe(schema):
|
| 20 |
+
# if not isinstance(schema, dict):
|
| 21 |
+
# return "Any"
|
| 22 |
+
# return _orig_get_type(schema)
|
| 23 |
+
# _gc_utils.get_type = _get_type_safe
|
| 24 |
+
# except Exception:
|
| 25 |
+
# pass
|
| 26 |
+
|
| 27 |
+
# # Additional guard: handle boolean JSON Schemas and parsing errors
|
| 28 |
+
# try:
|
| 29 |
+
# import gradio_client.utils as _gc_utils
|
| 30 |
+
# # Wrap the internal _json_schema_to_python_type if present
|
| 31 |
+
# if hasattr(_gc_utils, "_json_schema_to_python_type"):
|
| 32 |
+
# _orig_internal = _gc_utils._json_schema_to_python_type
|
| 33 |
+
# def _json_schema_to_python_type_safe(schema, defs=None):
|
| 34 |
+
# if isinstance(schema, bool):
|
| 35 |
+
# return "Any"
|
| 36 |
+
# try:
|
| 37 |
+
# return _orig_internal(schema, defs)
|
| 38 |
+
# except Exception:
|
| 39 |
+
# return "Any"
|
| 40 |
+
# _gc_utils._json_schema_to_python_type = _json_schema_to_python_type_safe
|
| 41 |
+
|
| 42 |
+
# # Also wrap the public json_schema_to_python_type to be extra defensive
|
| 43 |
+
# if hasattr(_gc_utils, "json_schema_to_python_type"):
|
| 44 |
+
# _orig_public = _gc_utils.json_schema_to_python_type
|
| 45 |
+
# def json_schema_to_python_type_safe(schema):
|
| 46 |
+
# try:
|
| 47 |
+
# return _orig_public(schema)
|
| 48 |
+
# except Exception:
|
| 49 |
+
# return "Any"
|
| 50 |
+
# _gc_utils.json_schema_to_python_type = json_schema_to_python_type_safe
|
| 51 |
+
# except Exception:
|
| 52 |
+
# pass
|
| 53 |
|
| 54 |
import cv2
|
| 55 |
import copy
|
|
|
|
| 691 |
logger.info('model init done!')
|
| 692 |
print('model init done!')
|
| 693 |
|
| 694 |
+
demo.queue().launch(share = True)
|
| 695 |
+
|
| 696 |
+
# demo.queue(
|
| 697 |
+
# api_open=False,
|
| 698 |
+
# ).launch()
|
| 699 |
|
| 700 |
|
| 701 |
# server_name="0.0.0.0", server_port=7860
|