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

[Bug] 安装错误 #511

Open
3 tasks done
Keshawn opened this issue Aug 2, 2023 · 1 comment
Open
3 tasks done

[Bug] 安装错误 #511

Keshawn opened this issue Aug 2, 2023 · 1 comment

Comments

@Keshawn
Copy link

Keshawn commented Aug 2, 2023

Prerequisite

Task

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

Environment

当前环境

NVIDIA Driver Version: 510.47.03
CUDA Version: 11.6
torch 1.13.1+cu116
torchvision 0.14.1+cu116
mmcv-full 1.7.1
openmim 0.3.9
mmgen 0.7.3 /home/keshawn/mmgen/mmgeneration

env

Reproduces the problem - code sample

from mmgen.apis import init_model, sample_unconditional_model

config_file = 'configs/styleganv2/stylegan2_c2_lsun-church_256_b4x8_800k.py'

you can download this checkpoint in advance and use a local file path.

checkpoint_file = 'https://download.openmmlab.com/mmgen/stylegan2/official_weights/stylegan2-church-config-f-official_20
210327_172657-1d42b7d1.pth'
device = 'cuda:0'

init a generatvie

model = init_model(config_file, checkpoint_file, device=device)

sample images

fake_imgs = sample_unconditional_model(model, 4)

Reproduces the problem - command or script

执行此文件报错:

python 1.py

Reproduces the problem - error message

Traceback (most recent call last):
File "1.py", line 1, in
from mmgen.apis import init_model, sample_unconditional_model
File "/home/keshawn/mmgen/mmgeneration/mmgen/init.py", line 21, in
mmcv_version = digit_version(mmcv.version)
AttributeError: module 'mmcv' has no attribute 'version'

Additional information

如果同时安装 mmcv 和 mmcv-full
也一样会报错

@mm-assistant
Copy link

mm-assistant bot commented Aug 2, 2023

We recommend using English or English & Chinese for issues so that we could have broader discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant