open-mmlab / mmagic

OpenMMLab Multimodal Advanced, Generative, and Intelligent Creation Toolbox. Unlock the magic 🪄: Generative-AI (AIGC), easy-to-use APIs, awsome model zoo, diffusion models, for text-to-image generation, image/video restoration/enhancement, etc.
https://mmagic.readthedocs.io/en/latest/
Apache License 2.0
6.89k stars 1.06k forks source link

[Bug] MMCV-Full required but failed installation #2148

Open OtenMoten opened 2 months ago

OtenMoten commented 2 months ago

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmagic

Environment

computer_info.json

PyCharm 2024.1.1 (Professional Edition) Build #PY-241.15989.155, built on April 29, 2024

Runtime version: 17.0.10+1-b1207.14 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

Reproduces the problem - code sample

mim install mmcv-full>=1.7.2

Reproduces the problem - command or script

mim install mmcv-full>=1.7.2

Reproduces the problem - error message

error.txt

Additional information

No response

OtenMoten commented 2 months ago

I've deinstalled mmcv and installed mmcv-full 1.7.2 and now this error appears:

C:\Users\Kevin\Documents\PyCharmProjects\tools\mmagic\.venv\lib\site-packages\mmcv\__init__.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
  warnings.warn(
Traceback (most recent call last):
  File "C:\Users\Kevin\Documents\PyCharmProjects\tools\mmagic\main.py", line 1, in <module>
    import mmagic
  File "C:\Users\Kevin\Documents\PyCharmProjects\tools\mmagic\.venv\lib\site-packages\mmagic\__init__.py", line 35, in <module>
    assert (mmcv_min_version <= mmcv_version < mmcv_max_version), \
AssertionError: mmcv==1.7.2 is used but incompatible. Please install mmcv-full>=(2, 0, 0, 0, 0, 0), <(2, 2, 0, 0, 0, 0).

in this code:

import mmagic

def main():

    print(mmagic.__version__)

if __name__ == '__main__':

    main()