open-mmlab / mmpose

OpenMMLab Pose Estimation Toolbox and Benchmark.
https://mmpose.readthedocs.io/en/latest/
Apache License 2.0
5.26k stars 1.17k forks source link

[Bug] RuntimeError: [srcBuf length] > 0 INTERNAL ASSERT FAILED #3031

Open kensamare opened 2 months ago

kensamare commented 2 months ago

Prerequisite

Environment

PyTorch = 2.1.2 openpose = 1.3.1 mmcv = 2.1.0 mmdet = 3.2.0 mmengine = 0.10.4

Reproduces the problem - code sample

from mmpose.apis import MMPoseInferencer
from mmpose.utils import register_all_modules

register_all_modules()

img_path = 'DSC_0079.MOV' 

inferencer = MMPoseInferencer('human')

result_generator = inferencer(img_path, show=True, device='cpu', pred_out_dir='predictions')
results = [result for result in result_generator]

The program code is run on the video recording and the following error is received. However, when using photos everything is fine. Runs on Apple M1

  File "/opt/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmdet/models/utils/misc.py", line 338, in filter_scores_and_topk
    scores, idxs = scores.sort(descending=True)
RuntimeError: [srcBuf length] > 0 INTERNAL ASSERT FAILED at "/Users/runner/work/_temp/anaconda/conda-bld/pytorch_1702400154748/work/aten/src/ATen/native/mps/OperationUtils.mm":327, please report a bug to PyTorch. Placeholder tensor is empty!