Spaces:
Running
Running
jhj0517
commited on
Commit
•
dcdb677
1
Parent(s):
888e2b8
Move MODEL_CONFIGS to paths
Browse files- modules/paths.py +7 -0
modules/paths.py
CHANGED
@@ -3,6 +3,12 @@ import os
|
|
3 |
WEBUI_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
4 |
MODELS_DIR = os.path.join(WEBUI_DIR, "models")
|
5 |
SAM2_CONFIGS_DIR = os.path.join(WEBUI_DIR, "configs")
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
OUTPUT_DIR = os.path.join(WEBUI_DIR, "outputs")
|
7 |
OUTPUT_PSD_DIR = os.path.join(OUTPUT_DIR, "psd")
|
8 |
OUTPUT_FILTER_DIR = os.path.join(OUTPUT_DIR, "filter")
|
@@ -17,3 +23,4 @@ for dir_path in [MODELS_DIR,
|
|
17 |
TEMP_DIR,
|
18 |
TEMP_OUT_DIR]:
|
19 |
os.makedirs(dir_path, exist_ok=True)
|
|
|
|
3 |
WEBUI_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
4 |
MODELS_DIR = os.path.join(WEBUI_DIR, "models")
|
5 |
SAM2_CONFIGS_DIR = os.path.join(WEBUI_DIR, "configs")
|
6 |
+
MODEL_CONFIGS = {
|
7 |
+
"sam2_hiera_tiny": os.path.join(SAM2_CONFIGS_DIR, "sam2_hiera_t.yaml"),
|
8 |
+
"sam2_hiera_small": os.path.join(SAM2_CONFIGS_DIR, "sam2_hiera_s.yaml"),
|
9 |
+
"sam2_hiera_base_plus": os.path.join(SAM2_CONFIGS_DIR, "sam2_hiera_b+.yaml"),
|
10 |
+
"sam2_hiera_large": os.path.join(SAM2_CONFIGS_DIR, "sam2_hiera_l.yaml"),
|
11 |
+
}
|
12 |
OUTPUT_DIR = os.path.join(WEBUI_DIR, "outputs")
|
13 |
OUTPUT_PSD_DIR = os.path.join(OUTPUT_DIR, "psd")
|
14 |
OUTPUT_FILTER_DIR = os.path.join(OUTPUT_DIR, "filter")
|
|
|
23 |
TEMP_DIR,
|
24 |
TEMP_OUT_DIR]:
|
25 |
os.makedirs(dir_path, exist_ok=True)
|
26 |
+
|