Skip to content

KeyError: 'frames_tracked_per_obj' #219

@XuJianzhi

Description

@XuJianzhi

(venv_2) root@llmdevelop-46-74c75987bd-zlvmv:/data/try/Wan2.2# 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}
/data/try/Wan2.2/venv_2/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:123: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
warnings.warn(
frame_num: 164
video_fps: 24.0
fps: 30
target_num: 205
2025-10-09 05:42:17.053 | INFO | process_pipepline:call:67 - Processing pose meta
2025-10-09 05:43:28.828 | INFO | process_pipepline:call:82 - Processing reference image: ./examples/wan_animate/replace/image.jpeg
2025-10-09 05:43:28.901 | INFO | process_pipepline:call:89 - Processing template video: ./examples/wan_animate/replace/video.mp4
video frame: 100%|██████████████████████████| 205/205 [00:07<00:00, 27.23it/s]
Traceback (most recent call last):
File "/data/try/Wan2.2/./wan/modules/animate/preprocess/preprocess_data.py", line 109, in
process_pipeline(video_path=args.video_path,
File "/data/try/Wan2.2/wan/modules/animate/preprocess/process_pipepline.py", line 97, in call
masks = self.get_mask(frames, 400, tpl_pose_metas)
File "/data/try/Wan2.2/wan/modules/animate/preprocess/process_pipepline.py", line 319, in get_mask
self.predictor.reset_state(inference_state)
File "/data/try/Wan2.2/venv_2/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 120, in decorate_context
return func(*args, **kwargs)
File "/data/try/Wan2.2/venv_2/lib/python3.10/site-packages/sam2/sam2_video_predictor.py", line 678, in reset_state
self._reset_tracking_results(inference_state)
File "/data/try/Wan2.2/venv_2/lib/python3.10/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_2) root@llmdevelop-46-74c75987bd-zlvmv:/data/try/Wan2.2# pip list
Package Version


accelerate 1.10.1
aiohappyeyeballs 2.6.1
aiohttp 3.13.0
aiosignal 1.4.0
antlr4-python3-runtime 4.9.3
async-timeout 5.0.1
attrs 25.4.0
audioread 3.0.1
beautifulsoup4 4.14.2
certifi 2025.10.5
cffi 2.0.0
charset-normalizer 3.4.3
coloredlogs 15.0.1
conformer 0.3.2
contourpy 1.3.2
cryptography 46.0.2
cycler 0.12.1
dashscope 1.24.6
decorator 5.2.1
decord 0.6.0
diffusers 0.35.1
easydict 1.13
einops 0.8.1
filelock 3.20.0
flatbuffers 25.9.23
fonttools 4.60.1
frozenlist 1.8.0
fsspec 2025.9.0
ftfy 6.3.1
gdown 5.2.0
gitdb 4.0.12
GitPython 3.1.45
hf-xet 1.1.10
huggingface-hub 0.35.3
humanfriendly 10.0
hydra-core 1.3.2
HyperPyYAML 1.2.2
idna 3.10
imageio 2.37.0
imageio-ffmpeg 0.6.0
importlib_metadata 8.7.0
inflect 7.5.0
iopath 0.1.10
Jinja2 3.1.6
joblib 1.5.2
kaldifst 1.7.17
kiwisolver 1.4.9
lazy_loader 0.4
librosa 0.11.0
lightning 2.5.5
lightning-utilities 0.15.2
llvmlite 0.45.1
loguru 0.7.3
markdown-it-py 4.0.0
MarkupSafe 3.0.3
matplotlib 3.10.7
mdurl 0.1.2
modelscope 1.30.0
more-itertools 10.8.0
moviepy 2.2.1
mpmath 1.3.0
msgpack 1.1.2
multidict 6.7.0
networkx 3.4.2
numba 0.62.1
numpy 1.26.4
nvidia-cublas-cu12 12.8.4.1
nvidia-cuda-cupti-cu12 12.8.90
nvidia-cuda-nvrtc-cu12 12.8.93
nvidia-cuda-runtime-cu12 12.8.90
nvidia-cudnn-cu12 9.10.2.21
nvidia-cufft-cu12 11.3.3.83
nvidia-cufile-cu12 1.13.1.3
nvidia-curand-cu12 10.3.9.90
nvidia-cusolver-cu12 11.7.3.90
nvidia-cusparse-cu12 12.5.8.93
nvidia-cusparselt-cu12 0.7.1
nvidia-nccl-cu12 2.27.3
nvidia-nvjitlink-cu12 12.8.93
nvidia-nvtx-cu12 12.8.90
omegaconf 2.3.0
onnxruntime 1.23.1
openai-whisper 20250625
opencv-python 4.11.0.86
packaging 25.0
pillow 11.3.0
pip 23.0.1
platformdirs 4.5.0
pooch 1.8.2
portalocker 3.2.0
proglog 0.1.12
propcache 0.4.1
protobuf 6.32.1
psutil 7.1.0
pyarrow 21.0.0
pycparser 2.23
Pygments 2.19.2
pyparsing 3.2.5
PySocks 1.7.1
python-dateutil 2.9.0.post0
python-dotenv 1.1.1
pytorch-lightning 2.5.5
pyworld 0.3.5
PyYAML 6.0.3
regex 2025.9.18
requests 2.32.5
rich 14.1.0
ruamel.yaml 0.18.15
ruamel.yaml.clib 0.2.14
safetensors 0.6.2
sam2 1.1.0
scikit-learn 1.7.2
scipy 1.15.3
sentencepiece 0.2.1
setuptools 65.5.0
six 1.17.0
smmap 5.0.2
soundfile 0.13.1
soupsieve 2.8
soxr 1.0.0
sympy 1.14.0
threadpoolctl 3.6.0
tiktoken 0.12.0
tokenizers 0.21.4
torch 2.8.0
torchmetrics 1.8.2
torchvision 0.23.0
tqdm 4.67.1
transformers 4.51.3
triton 3.4.0
typeguard 4.4.4
typing_extensions 4.15.0
urllib3 2.5.0
wcwidth 0.2.14
websocket-client 1.9.0
wetext 0.1.0
wget 3.2
yarl 1.22.0
zipp 3.23.0

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