Skip to content

Conversation

@a904guy
Copy link

@a904guy a904guy commented Sep 19, 2025

(venv) mike@Alexandra:/project/video/Wan2.2$ python ./wan/modules/animate/preprocess/preprocess_data.py --ckpt_path ./Wan2.2-Animate-14B/process_checkpoint/ --video_path ./source/source.mp4 --refer_path ./source/person.png --save_path ./source/progress/ --resolution_area 1280 720 --iterations 3 --k 7 --w_len 1 --h_len 1 --replace_flag
{'ckpt_path': './Wan2.2-Animate-14B/process_checkpoint/', 'video_path': './source/source.mp4', 'refer_path': './source/person.png', 'save_path': './source/progress/', 'resolution_area': [1280, 720], 'fps': 30, 'replace_flag': True, 'retarget_flag': False, 'use_flux': False, 'iterations': 3, 'k': 7, 'w_len': 1, 'h_len': 1}
frame_num: 2646
video_fps: 30.0
fps: 30
target_num: 2646
2025-09-19 08:28:13.438 | INFO | process_pipepline:call:67 - Processing pose meta
2025-09-19 08:29:23.335 | INFO | process_pipepline:call:82 - Processing reference image: ./source/person.png
2025-09-19 08:29:23.352 | INFO | process_pipepline:call:89 - Processing template video: ./source/source.mp4
video frame: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 400/400 [00:07<00:00, 50.11it/s]
Traceback (most recent call last):
File "/project/video/Wan2.2/./wan/modules/animate/preprocess/preprocess_data.py", line 109, in
process_pipeline(video_path=args.video_path,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/project/video/Wan2.2/wan/modules/animate/preprocess/process_pipepline.py", line 97, in call
masks = self.get_mask(frames, 400, tpl_pose_metas)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/project/video/Wan2.2/wan/modules/animate/preprocess/process_pipepline.py", line 319, in get_mask
self.predictor.reset_state(inference_state)
File "/project/video/.venv/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 120, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/project/video/.venv/lib/python3.11/site-packages/sam2/sam2_video_predictor.py", line 678, in reset_state
self._reset_tracking_results(inference_state)
File "/project/video/.venv/lib/python3.11/site-packages/sam2/sam2_video_predictor.py", line 701, in _reset_tracking_results
for v in inference_state["frames_tracked_per_obj"].values():
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'frames_tracked_per_obj'

(venv) mike@Alexandra:/project/video/Wan2.2$ python ./wan/modules/animate/preprocess/preprocess_data.py     --ckpt_path ./Wan2.2-Animate-14B/process_checkpoint/     --video_path ./source/source.mp4     --refer_path ./source/person.png     --save_path ./source/progress/     --resolution_area 1280 720     --iterations 3     --k 7     --w_len 1     --h_len 1     --replace_flag
{'ckpt_path': './Wan2.2-Animate-14B/process_checkpoint/', 'video_path': './source/source.mp4', 'refer_path': './source/person.png', 'save_path': './source/progress/', 'resolution_area': [1280, 720], 'fps': 30, 'replace_flag': True, 'retarget_flag': False, 'use_flux': False, 'iterations': 3, 'k': 7, 'w_len': 1, 'h_len': 1}
frame_num: 2646
video_fps: 30.0
fps: 30
target_num: 2646
2025-09-19 08:28:13.438 | INFO     | process_pipepline:__call__:67 - Processing pose meta
2025-09-19 08:29:23.335 | INFO     | process_pipepline:__call__:82 - Processing reference image: ./source/fabio.png
2025-09-19 08:29:23.352 | INFO     | process_pipepline:__call__:89 - Processing template video: ./source/cousin.mp4
video frame: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 400/400 [00:07<00:00, 50.11it/s]
Traceback (most recent call last):
  File "/project/video/Wan2.2/./wan/modules/animate/preprocess/preprocess_data.py", line 109, in <module>
    process_pipeline(video_path=args.video_path, 
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/project/video/Wan2.2/wan/modules/animate/preprocess/process_pipepline.py", line 97, in __call__
    masks = self.get_mask(frames, 400, tpl_pose_metas)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/project/video/Wan2.2/wan/modules/animate/preprocess/process_pipepline.py", line 319, in get_mask
    self.predictor.reset_state(inference_state)
  File "/project/video/.venv/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 120, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/project/video/.venv/lib/python3.11/site-packages/sam2/sam2_video_predictor.py", line 678, in reset_state
    self._reset_tracking_results(inference_state)
  File "/project/video/.venv/lib/python3.11/site-packages/sam2/sam2_video_predictor.py", line 701, in _reset_tracking_results
    for v in inference_state["frames_tracked_per_obj"].values():
             ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'frames_tracked_per_obj'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant