Spaces:
Runtime error
Runtime error
Man-isH-07
commited on
Commit
·
a484087
1
Parent(s):
fc0574b
v1.7
Browse files
app.py
CHANGED
@@ -38,11 +38,11 @@ download_model("Ultralytics/YOLOv8", "yolov8m.pt", "models/ultralytics/bbox")
|
|
38 |
download_model("xingren23/comfyflow-models", "sams/sam_vit_b_01ec64.pth", "models/sams")
|
39 |
|
40 |
|
41 |
-
# ------ JIT's Files --------
|
42 |
|
43 |
-
download_model("camenduru/YoloWorld-EfficientSAM", "efficient_sam_s_cpu.jit", "custom_nodes/ComfyUI-YoloWorld-EfficientSAM")
|
44 |
|
45 |
-
download_model("camenduru/YoloWorld-EfficientSAM", "efficient_sam_s_gpu.jit", "custom_nodes/ComfyUI-YoloWorld-EfficientSAM")
|
46 |
|
47 |
|
48 |
print("Downloaded Models")
|
@@ -111,25 +111,25 @@ def add_comfyui_directory_to_sys_path() -> None:
|
|
111 |
print("⚠️ Warning: 'ComfyUI' directory not found. Ensure it is installed properly.")
|
112 |
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
#
|
132 |
-
|
133 |
|
134 |
print("Model paths added")
|
135 |
|
|
|
38 |
download_model("xingren23/comfyflow-models", "sams/sam_vit_b_01ec64.pth", "models/sams")
|
39 |
|
40 |
|
41 |
+
# ------ JIT's Files -------- ( Added already manually )
|
42 |
|
43 |
+
# download_model("camenduru/YoloWorld-EfficientSAM", "efficient_sam_s_cpu.jit", "custom_nodes/ComfyUI-YoloWorld-EfficientSAM")
|
44 |
|
45 |
+
# download_model("camenduru/YoloWorld-EfficientSAM", "efficient_sam_s_gpu.jit", "custom_nodes/ComfyUI-YoloWorld-EfficientSAM")
|
46 |
|
47 |
|
48 |
print("Downloaded Models")
|
|
|
111 |
print("⚠️ Warning: 'ComfyUI' directory not found. Ensure it is installed properly.")
|
112 |
|
113 |
|
114 |
+
def add_extra_model_paths() -> None:
|
115 |
+
load_extra_path_config = None
|
116 |
+
try:
|
117 |
+
from main import load_extra_path_config
|
118 |
+
except ImportError:
|
119 |
+
print("Could not import load_extra_path_config from main.py.")
|
120 |
+
try:
|
121 |
+
from app_utils.extra_config import load_extra_path_config
|
122 |
+
except ImportError:
|
123 |
+
print("Could not import load_extra_path_config from utils.extra_config. Skipping extra model paths.")
|
124 |
+
extra_model_paths = find_path("extra_model_paths.yaml")
|
125 |
+
if extra_model_paths is not None and load_extra_path_config is not None:
|
126 |
+
load_extra_path_config(extra_model_paths)
|
127 |
+
else:
|
128 |
+
print("Skipping extra model paths: config file or loader function not found.")
|
129 |
+
|
130 |
+
|
131 |
+
# add_comfyui_directory_to_sys_path()
|
132 |
+
add_extra_model_paths()
|
133 |
|
134 |
print("Model paths added")
|
135 |
|