MagicDrive icon indicating copy to clipboard operation
MagicDrive copied to clipboard

Library Version Compatibility Issues When Running run.py

Open Su-Jiaqi opened this issue 6 months ago • 5 comments

Hi,

I’d like to ask: what are the correct versions I should be using for mmcv, mmdet-full, mmdet3d, gradio, as well as PyTorch and CUDA?

Right now, I’ve successfully run the GUI demo, but when I try to run the following command:

cd ${ROOT}
python demo/run.py resume_from_checkpoint=magicdrive-log/SDv1.5mv-rawbox_2023-09-07_18-39_224x400

I keep encountering library version conflicts. Could you please clarify the recommended or working version combinations?

Thanks!

Su-Jiaqi avatar Jun 10 '25 02:06 Su-Jiaqi

it would always comes up with this:

(mdrive)~/MagicDrive$ python demo/run.py \
>     resume_from_checkpoint=pretrained/SDv1.5mv-rawbox_2023-09-07_18-39_224x400 \
>     ++runner.enable_xformers_memory_efficient_attention=false
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ //MagicDrive/demo/run.py:18 in <module>                                              │
│                                                                                                  │
│    15 # fmt: on                                                                                  │
│    16                                                                                            │
│    17 sys.path.append(".")  # noqa                                                               │
│ ❱  18 from magicdrive.runner.utils import concat_6_views                                         │
│    19 from magicdrive.misc.test_utils import (                                                   │
│    20 │   prepare_all, run_one_batch                                                             │
│    21 )                                                                                          │
│                                                                                                  │
MagicDrive/./magicdrive/runner/utils.py:10 in <module>                             │
│                                                                                                  │
│    7 from accelerate.scheduler import AcceleratedScheduler                                       │
│    8                                                                                             │
│    9 from magicdrive.runner.map_visualizer import *                                              │
│ ❱ 10 from magicdrive.runner.box_visualizer import *                                              │
│   11 from magicdrive.runner.img_utils import *                                                   │
│   12                                                                                             │
│   13                                                                                             │

/MagicDrive/./magicdrive/runner/box_visualizer.py:13 in <module>                    │
│                                                                                                  │
│    10 import torch                                                                               │
│    11 from accelerate.scheduler import AcceleratedScheduler                                      │
│    12                                                                                            │
│ ❱  13 from mmdet3d.core.bbox import LiDARInstance3DBoxes                                         │
│    14 from mmdet3d.core.utils import visualize_camera                                            │
│    15                                                                                            │
│    16                                                                                            │
│                                                                                                  │
/miniconda3/envs/mdrive/lib/python3.8/site-packages/mmdet3d/__init__.py:21 in       │
│ <module>                                                                                         │
│                                                                                                  │
│   18 mmdet_maximum_version = '3.1.0'                                                             │
│   19 mmdet_version = digit_version(mmdet.__version__)                                            │
│   20                                                                                             │
│ ❱ 21 assert (mmcv_version >= digit_version(mmcv_minimum_version)                                 │
│   22 │   │   and mmcv_version < digit_version(mmcv_maximum_version)), \                          │
│   23 │   f'MMCV=={mmcv.__version__} is used but incompatible. ' \                                │
│   24 │   f'Please install mmcv>={mmcv_minimum_version}, <{mmcv_maximum_version}.'                │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AssertionError: MMCV==1.4.5 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.1.0.

Su-Jiaqi avatar Jun 10 '25 02:06 Su-Jiaqi

This issue is stale because it has been open for 7 days with no activity. If you do not have any follow-ups, the issue will be closed soon.

github-actions[bot] avatar Jun 17 '25 16:06 github-actions[bot]

it would always comes up with this:

(mdrive)~/MagicDrive$ python demo/run.py \
>     resume_from_checkpoint=pretrained/SDv1.5mv-rawbox_2023-09-07_18-39_224x400 \
>     ++runner.enable_xformers_memory_efficient_attention=false
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ //MagicDrive/demo/run.py:18 in <module>                                              │
│                                                                                                  │
│    15 # fmt: on                                                                                  │
│    16                                                                                            │
│    17 sys.path.append(".")  # noqa                                                               │
│ ❱  18 from magicdrive.runner.utils import concat_6_views                                         │
│    19 from magicdrive.misc.test_utils import (                                                   │
│    20 │   prepare_all, run_one_batch                                                             │
│    21 )                                                                                          │
│                                                                                                  │
MagicDrive/./magicdrive/runner/utils.py:10 in <module>                             │
│                                                                                                  │
│    7 from accelerate.scheduler import AcceleratedScheduler                                       │
│    8                                                                                             │
│    9 from magicdrive.runner.map_visualizer import *                                              │
│ ❱ 10 from magicdrive.runner.box_visualizer import *                                              │
│   11 from magicdrive.runner.img_utils import *                                                   │
│   12                                                                                             │
│   13                                                                                             │

/MagicDrive/./magicdrive/runner/box_visualizer.py:13 in <module>                    │
│                                                                                                  │
│    10 import torch                                                                               │
│    11 from accelerate.scheduler import AcceleratedScheduler                                      │
│    12                                                                                            │
│ ❱  13 from mmdet3d.core.bbox import LiDARInstance3DBoxes                                         │
│    14 from mmdet3d.core.utils import visualize_camera                                            │
│    15                                                                                            │
│    16                                                                                            │
│                                                                                                  │
/miniconda3/envs/mdrive/lib/python3.8/site-packages/mmdet3d/__init__.py:21 in       │
│ <module>                                                                                         │
│                                                                                                  │
│   18 mmdet_maximum_version = '3.1.0'                                                             │
│   19 mmdet_version = digit_version(mmdet.__version__)                                            │
│   20                                                                                             │
│ ❱ 21 assert (mmcv_version >= digit_version(mmcv_minimum_version)                                 │
│   22 │   │   and mmcv_version < digit_version(mmcv_maximum_version)), \                          │
│   23 │   f'MMCV=={mmcv.__version__} is used but incompatible. ' \                                │
│   24 │   f'Please install mmcv>={mmcv_minimum_version}, <{mmcv_maximum_version}.'                │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AssertionError: MMCV==1.4.5 is used but incompatible. Please install mmcv>=2.0.0rc4, <2.1.0.

Hi,

I’d like to ask: what are the correct versions I should be using for mmcv, mmdet-full, mmdet3d, gradio, as well as PyTorch and CUDA?

Right now, I’ve successfully run the GUI demo, but when I try to run the following command:

cd ${ROOT}
python demo/run.py resume_from_checkpoint=magicdrive-log/SDv1.5mv-rawbox_2023-09-07_18-39_224x400

I keep encountering library version conflicts. Could you please clarify the recommended or working version combinations?

Thanks!

I would like to inquire about your CUDA version, and what version of PyTorch and CUDA you have installed. When you run the GUI, is it sufficient to just install gui.txt

facethewindha avatar Jul 09 '25 17:07 facethewindha

Please install mmdet3d from third-party/bevfusion if you need it.

flymin avatar Jul 12 '25 03:07 flymin

This issue is stale because it has been open for 7 days with no activity. If you do not have any follow-ups, the issue will be closed soon.

github-actions[bot] avatar Jul 19 '25 16:07 github-actions[bot]