Spaces:
Running
on
Zero
Running
on
Zero
alex
commited on
Commit
·
410b861
1
Parent(s):
0e77c48
more reliable build
Browse files
app.py
CHANGED
|
@@ -31,20 +31,24 @@ def sh(cmd): subprocess.check_call(cmd, shell=True)
|
|
| 31 |
try:
|
| 32 |
|
| 33 |
sh("pip install flash-attn --no-build-isolation")
|
|
|
|
| 34 |
|
| 35 |
-
print("
|
|
|
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
print("
|
| 47 |
-
|
| 48 |
|
| 49 |
# tell Python to re-scan site-packages now that the egg-link exists
|
| 50 |
import importlib, site; site.addsitedir(site.getsitepackages()[0]); importlib.invalidate_caches()
|
|
|
|
| 31 |
try:
|
| 32 |
|
| 33 |
sh("pip install flash-attn --no-build-isolation")
|
| 34 |
+
# print("Attempting to download and build sam2...")
|
| 35 |
|
| 36 |
+
# print("download sam")
|
| 37 |
+
# sam_dir = snapshot_download(repo_id="alexnasa/sam2")
|
| 38 |
|
| 39 |
+
# @spaces.GPU(duration=500)
|
| 40 |
+
# def install_sam():
|
| 41 |
|
| 42 |
+
# os.environ["TORCH_CUDA_ARCH_LIST"] = "9.0"
|
| 43 |
+
# sh(f"cd {sam_dir} && python setup.py build_ext --inplace && pip install -e .")
|
| 44 |
|
| 45 |
+
# print("install sam")
|
| 46 |
+
# install_sam()
|
| 47 |
+
|
| 48 |
+
print("Attempting to download")
|
| 49 |
|
| 50 |
+
print("download sam")
|
| 51 |
+
snapshot_download(repo_id="alexnasa/sam2_C", local_dir=f"{os.getcwd()}" )
|
| 52 |
|
| 53 |
# tell Python to re-scan site-packages now that the egg-link exists
|
| 54 |
import importlib, site; site.addsitedir(site.getsitepackages()[0]); importlib.invalidate_caches()
|
wan/modules/animate/preprocess/process_pipepline.py
CHANGED
|
@@ -20,7 +20,7 @@ from human_visualization import draw_aapose_by_meta_new
|
|
| 20 |
from retarget_pose import get_retarget_pose
|
| 21 |
import sam2.modeling.sam.transformer as transformer
|
| 22 |
transformer.USE_FLASH_ATTN = True
|
| 23 |
-
transformer.MATH_KERNEL_ON =
|
| 24 |
transformer.OLD_GPU = False
|
| 25 |
from sam_utils import build_sam2_video_predictor
|
| 26 |
|
|
|
|
| 20 |
from retarget_pose import get_retarget_pose
|
| 21 |
import sam2.modeling.sam.transformer as transformer
|
| 22 |
transformer.USE_FLASH_ATTN = True
|
| 23 |
+
transformer.MATH_KERNEL_ON = False
|
| 24 |
transformer.OLD_GPU = False
|
| 25 |
from sam_utils import build_sam2_video_predictor
|
| 26 |
|