jhj0517
commited on
Commit
·
606190d
1
Parent(s):
54af6fd
add debug
Browse files- pose_align.py +3 -0
pose_align.py
CHANGED
|
@@ -42,6 +42,7 @@ class PoseAlignmentInference:
|
|
| 42 |
align_frame: int,
|
| 43 |
max_frame: int,
|
| 44 |
):
|
|
|
|
| 45 |
dt_file_name = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
| 46 |
outfn=os.path.abspath(os.path.join(self.output_dir, f'{dt_file_name}_demo.mp4'))
|
| 47 |
outfn_align_pose_video=os.path.abspath(os.path.join(self.output_dir, f'{dt_file_name}.mp4'))
|
|
@@ -312,12 +313,14 @@ class PoseAlignmentInference:
|
|
| 312 |
def download_models(self):
|
| 313 |
repo_id = 'jhj0517/MusePose'
|
| 314 |
for name, file_path in self.model_paths.items():
|
|
|
|
| 315 |
local_dir, filename = os.path.dirname(file_path), os.path.basename(file_path)
|
| 316 |
if not os.path.exists(local_dir):
|
| 317 |
os.makedirs(local_dir)
|
| 318 |
|
| 319 |
remote_filepath = os.path.join("dwpose", filename)
|
| 320 |
if not os.path.exists(file_path):
|
|
|
|
| 321 |
hf_hub_download(repo_id=repo_id, filename=remote_filepath,
|
| 322 |
local_dir=local_dir,
|
| 323 |
local_dir_use_symlinks=False)
|
|
|
|
| 42 |
align_frame: int,
|
| 43 |
max_frame: int,
|
| 44 |
):
|
| 45 |
+
self.download_models()
|
| 46 |
dt_file_name = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
| 47 |
outfn=os.path.abspath(os.path.join(self.output_dir, f'{dt_file_name}_demo.mp4'))
|
| 48 |
outfn_align_pose_video=os.path.abspath(os.path.join(self.output_dir, f'{dt_file_name}.mp4'))
|
|
|
|
| 313 |
def download_models(self):
|
| 314 |
repo_id = 'jhj0517/MusePose'
|
| 315 |
for name, file_path in self.model_paths.items():
|
| 316 |
+
|
| 317 |
local_dir, filename = os.path.dirname(file_path), os.path.basename(file_path)
|
| 318 |
if not os.path.exists(local_dir):
|
| 319 |
os.makedirs(local_dir)
|
| 320 |
|
| 321 |
remote_filepath = os.path.join("dwpose", filename)
|
| 322 |
if not os.path.exists(file_path):
|
| 323 |
+
print(file_path)
|
| 324 |
hf_hub_download(repo_id=repo_id, filename=remote_filepath,
|
| 325 |
local_dir=local_dir,
|
| 326 |
local_dir_use_symlinks=False)
|