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.95k stars 1.06k forks source link

[Bug] When I RUN the "QUICK RUN" in the documentation, something goes wrong #2122

Closed slantingsun closed 8 months ago

slantingsun commented 8 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

git clone https://github.com/open-mmlab/mmagic.git cd mmagic pip3 install -e . -v

Reproduces the problem - code sample

python demo/mmagic_inference_demo.py --model-name stable_diffusion --text "A panda is having dinner at KFC" --result-out-dir ./output/sd_res.png

Reproduces the problem - command or script

python demo/mmagic_inference_demo.py --model-name stable_diffusion --text "A panda is having dinner at KFC" --result-out-dir ./output/sd_res.png

Reproduces the problem - error message

Traceback (most recent call last): File "demo/mmagic_inference_demo.py", line 5, in from mmagic.apis import MMagicInferencer File "c:\users\headt\develop\mmagic\mmagic\apis__init.py", line 2, in from .inferencers.inference_functions import init_model File "c:\users\headt\develop\mmagic\mmagic\apis\inferencers__init__.py", line 16, in from .translation_inferencer import TranslationInferencer File "c:\users\headt\develop\mmagic\mmagic\apis\inferencers\translation_inferencer.py", line 12, in from mmagic.models.base_models import BaseTranslationModel File "c:\users\headt\develop\mmagic\mmagic\models\init.py", line 6, in from .editors import * # noqa: F401, F403 from .vico import ViCo File "c:\users\headt\develop\mmagic\mmagic\models\editors\vico\init__.py", line 2, in from .vico import ViCo File "c:\users\headt\develop\mmagic\mmagic\models\editors\vico\vico.py", line 16, in from .vico_utils import set_vico_modules File "c:\users\headt\develop\mmagic\mmagic\models\editors\vico\vico_utils.py", line 9, in from diffusers.models.attention import Attention, BasicTransformerBlock ImportError: cannot import name 'Attention' from 'diffusers.models.attention' (C:\Users\headt\miniconda3\envs\mmagic\lib\site-packages\diffusers\models\attention.py)

Additional information

No response