MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / find_motion_file

Function find_motion_file

scripts/organize_mbench_results.py:92–109  ·  view source on GitHub ↗

Find the motion .pt file in a folder, prioritizing motion-conditioned results.

(folder_path: Path)

Source from the content-addressed store, hash-verified

90
91
92def find_motion_file(folder_path: Path) -> Path:
93 """Find the motion .pt file in a folder, prioritizing motion-conditioned results."""
94 motion_files = [
95 'motion_gen_condition_on_motion.pt',
96 'motion_gen_condition_on_text.pt',
97 ]
98
99 for motion_file in motion_files:
100 file_path = folder_path / motion_file
101 if file_path.exists():
102 return file_path
103
104 # Fallback: find any .pt file
105 pt_files = list(folder_path.glob('*.pt'))
106 if pt_files:
107 return pt_files[0]
108
109 return None
110
111
112def main():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected