Skip to content

KeyError: 'frames_tracked_per_obj' #219 #239

@gamechanger-creator

Description

@gamechanger-creator

python ./wan/modules/animate/preprocess/preprocess_data.py --ckpt_path ./Wan2.2-Animate-14B/process_checkpoint --video_path ./examples/wan_animate/replace/video.mp4 --refer_path ./examples/wan_animate/replace/image.jpeg --save_path ./examples/wan_animate/replace/process_results --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': './examples/wan_animate/replace/video.mp4', 'refer_path': './examples/wan_animate/replace/image.jpeg', 'save_path': './examples/wan_animate/replace/process_results', '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: 106
video_fps: 30.0
fps: 30
target_num: 106
2025-10-17 08:20:44.839 | INFO | process_pipepline:call:67 - Processing pose meta
2025-10-17 08:20:51.165 | INFO | process_pipepline:call:82 - Processing reference image: ./examples/wan_animate/replace/image.jpeg
2025-10-17 08:20:51.209 | INFO | process_pipepline:call:89 - Processing template video: ./examples/wan_animate/replace/video.mp4
video frame: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 106/106 [00:02<00:00, 39.27it/s]
Traceback (most recent call last):
File "/home/ubuntu/Wan2.2/./wan/modules/animate/preprocess/preprocess_data.py", line 109, in
process_pipeline(video_path=args.video_path,
File "/home/ubuntu/Wan2.2/wan/modules/animate/preprocess/process_pipepline.py", line 97, in call
masks = self.get_mask(frames, 400, tpl_pose_metas)
File "/home/ubuntu/Wan2.2/wan/modules/animate/preprocess/process_pipepline.py", line 319, in get_mask
self.predictor.reset_state(inference_state)
File "/home/ubuntu/miniconda3/envs/wan/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/home/ubuntu/Wan2.2/sam2/sam2/sam2_video_predictor.py", line 678, in reset_state
self._reset_tracking_results(inference_state)
File "/home/ubuntu/Wan2.2/sam2/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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions