Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

['AsymmetricAutoencoderKL is already registered in model at mmagic.models.archs'] #2133

Open
3 tasks done
Maxibugg opened this issue Mar 27, 2024 · 2 comments
Open
3 tasks done
Assignees
Labels
kind/bug something isn't working

Comments

@Maxibugg
Copy link

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

when i try "python mmagic/utils/collect_env.py",
I have the following issue :

(mmagic) INPIXALDOM\legoffp@INPIXALSTA69:~/Documents/Stage_Pierre/StageP/mmagic> python mmagic/utils/collect_env.py

Traceback (most recent call last):

File "mmagic/utils/collect_env.py", line 2, in
from mmcv.utils import collect_env as collect_base_env

File "/home/INPIXALDOM/legoffp/anaconda3/envs/mmagic/lib/python3.8/site-packages/mmcv/init.py", line 3, in
from .arraymisc import *

File "/home/INPIXALDOM/legoffp/anaconda3/envs/mmagic/lib/python3.8/site-packages/mmcv/arraymisc/init.py", line 2, in
from .quantization import dequantize, quantize

File "/home/INPIXALDOM/legoffp/anaconda3/envs/mmagic/lib/python3.8/site-packages/mmcv/arraymisc/quantization.py", line 2, in
from typing import Union

File "/home/INPIXALDOM/legoffp/Documents/Stage_Pierre/StageP/mmagic/mmagic/utils/typing.py", line 2, in
from typing import Callable, Dict, List, Sequence, Tuple, Union

ImportError: cannot import name 'Callable' from partially initialized module 'typing' (most likely due to a circular import) (/home/INPIXALDOM/legoffp/Documents/Stage_Pierre/StageP/mmagic/mmagic/utils/typing.py)

Reproduces the problem - code sample

from mmagic.apis import MMagicInferencer

Create a MMagicInferencer instance

editor = MMagicInferencer('pix2pix')

Infer a image. Input image path and output image path is needed.

results = editor.infer(img='../resources/input/translation/gt_mask_0.png', result_out_dir='../resources/output/translation/tutorial_translation_pix2pix_res.jpg')

Reproduces the problem - command or script

Inside the cell 15 from mmagic_inference_tutorial.ipynb

from mmagic.apis import MMagicInferencer

Create a MMagicInferencer instance

editor = MMagicInferencer('pix2pix')

Infer a image. Input image path and output image path is needed.

results = editor.infer(img='../resources/input/translation/gt_mask_0.png', result_out_dir='../resources/output/translation/tutorial_translation_pix2pix_res.jpg')

Reproduces the problem - error message

image
image
image
image

Additional information

Here is my major headache when i run the cell 15 from demo/mmagic_inference_tutorial.ipynb
Have anyone meet this problem ? If yes, what was your solution ?
I'm under Linux with conda envirronnement

@Maxibugg Maxibugg added the kind/bug something isn't working label Mar 27, 2024
@ZhangruiLee
Copy link

I also encountered the same problem

@chagasantena
Copy link

I also encountered the same problem

Any suggestion?

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants