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] linux环境,运行视频超分程序,中断 #2131

Open
3 tasks done
Danny0802 opened this issue Mar 21, 2024 · 1 comment
Open
3 tasks done

[Bug] linux环境,运行视频超分程序,中断 #2131

Danny0802 opened this issue Mar 21, 2024 · 1 comment
Assignees
Labels
kind/bug something isn't working

Comments

@Danny0802
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

python mmagic/utils/collect_env.py 这个文件不能运行....

环境:
一、pip安装包
absl-py 2.1.0
addict 2.4.0
albumentations 1.4.2
aliyun-python-sdk-core 2.15.0
aliyun-python-sdk-kms 2.16.2
attrs 23.2.0
av 11.0.0
cachetools 5.3.3
certifi 2024.2.2
cffi 1.16.0
charset-normalizer 3.3.2
click 8.1.7
colorama 0.4.6
contourpy 1.1.1
controlnet-aux 0.0.7
crcmod 1.7
cryptography 42.0.5
cycler 0.12.1
diffusers 0.24.0
einops 0.7.0
face-alignment 1.3.4
facexlib 0.3.0
filelock 3.9.0
filterpy 1.4.5
flatbuffers 24.3.7
fonttools 4.50.0
fsspec 2024.3.1
google-auth 2.29.0
google-auth-oauthlib 1.0.0
grpcio 1.62.1
huggingface-hub 0.21.4
idna 3.6
imageio 2.34.0
importlib_metadata 7.1.0
importlib_resources 6.3.2
jax 0.4.13
jaxlib 0.4.13
Jinja2 3.1.2
jmespath 0.10.0
joblib 1.3.2
kiwisolver 1.4.5
lazy_loader 0.3
llvmlite 0.41.1
lmdb 1.4.1
lpips 0.1.4
Markdown 3.6
markdown-it-py 3.0.0
MarkupSafe 2.1.3
matplotlib 3.7.5
mdurl 0.1.2
mediapipe 0.10.11
ml-dtypes 0.2.0
mmagic 1.2.0
mmcv 2.1.0
mmengine 0.10.3
model-index 0.1.11
mpmath 1.3.0
networkx 3.0
numba 0.58.1
numpy 1.24.4
nvidia-cublas-cu11 11.11.3.6
nvidia-cuda-cupti-cu11 11.8.87
nvidia-cuda-nvrtc-cu11 11.8.89
nvidia-cuda-runtime-cu11 11.8.89
nvidia-cudnn-cu11 8.7.0.84
nvidia-cufft-cu11 10.9.0.58
nvidia-curand-cu11 10.3.0.86
nvidia-cusolver-cu11 11.4.1.48
nvidia-cusparse-cu11 11.7.5.86
nvidia-nccl-cu11 2.19.3
nvidia-nvtx-cu11 11.8.86
oauthlib 3.2.2
opencv-contrib-python 4.9.0.80
opencv-python 4.9.0.80
opencv-python-headless 4.9.0.80
opendatalab 0.0.10
openmim 0.3.9
openxlab 0.0.36
opt-einsum 3.3.0
ordered-set 4.1.0
oss2 2.17.0
packaging 24.0
pandas 2.0.3
pillow 10.2.0
pip 23.3.1
platformdirs 4.2.0
protobuf 3.20.3
pyasn1 0.5.1
pyasn1-modules 0.3.0
pycparser 2.21
pycryptodome 3.20.0
Pygments 2.17.2
pyparsing 3.1.2
python-dateutil 2.9.0.post0
pytz 2023.4
PyWavelets 1.4.1
PyYAML 6.0.1
regex 2023.12.25
requests 2.28.2
requests-oauthlib 1.4.0
resize-right 0.0.2
rich 13.4.2
rsa 4.9
safetensors 0.4.2
scikit-image 0.21.0
scikit-learn 1.3.2
scipy 1.10.1
setuptools 60.2.0
six 1.16.0
sounddevice 0.4.6
sympy 1.12
tabulate 0.9.0
tensorboard 2.14.0
tensorboard-data-server 0.7.2
termcolor 2.4.0
threadpoolctl 3.4.0
tifffile 2023.7.10
timm 0.9.16
tokenizers 0.15.2
tomli 2.0.1
torch 2.2.1+cu118
torchaudio 2.2.1+cu118
torchvision 0.17.1+cu118
tqdm 4.65.2
transformers 4.38.2
triton 2.2.0
typing 3.7.4.3
typing_extensions 4.10.0
tzdata 2024.1
urllib3 1.26.18
Werkzeug 3.0.1
wheel 0.41.2
yapf 0.40.2
zipp 3.18.1

二、环境配置
8核32G 显存24G
ubuntu22.04-cuda11.8

三、安装pytorch
通过conda创建虚拟环境,从官网选择对应的版本,执行下面命令

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

Reproduces the problem - code sample

import os
from mmagic.apis import MMagicInferencer
from mmengine import mkdir_or_exist
import mmcv
import matplotlib.pyplot as plt

Create a MMagicInferencer instance and infer

video = '/mnt/workspace/father_full.mp4'
result_out_dir = '/mnt/workspace/father_super.mp4'
mkdir_or_exist(os.path.dirname(result_out_dir))
editor = MMagicInferencer('basicvsr')
results = editor.infer(video=video, result_out_dir=result_out_dir)

Reproduces the problem - command or script

代码文件名:super_video.py
执行命令:
python super_video.py

Reproduces the problem - error message

(mmaginc) root@dsw-353602-84cb88567-4zmwn:/mnt/workspace# python super_video.py

/opt/conda/envs/mmaginc/lib/python3.8/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_5m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_5m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/opt/conda/envs/mmaginc/lib/python3.8/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_11m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_11m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/opt/conda/envs/mmaginc/lib/python3.8/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/opt/conda/envs/mmaginc/lib/python3.8/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_384 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_384. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/opt/conda/envs/mmaginc/lib/python3.8/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_512 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_512. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/opt/conda/envs/mmaginc/lib/python3.8/site-packages/diffusers/utils/outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
torch.utils._pytree._register_pytree_node(
/opt/conda/envs/mmaginc/lib/python3.8/site-packages/diffusers/utils/outputs.py:63: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
torch.utils._pytree._register_pytree_node(
03/21 11:44:12 - mmengine - INFO - Loads checkpoint by http backend from path: https://download.openmmlab.com/mmediting/restorers/basicvsr/spynet_20210409-c6c1bd09.pth
Loads checkpoint by http backend from path: https://download.openmmlab.com/mmediting/restorers/basicvsr/basicvsr_reds4_20120409-0e599677.pth
The model and loaded state dict do not match exactly

missing keys in source state_dict: step_counter

03/21 11:44:15 - mmengine - WARNING - Failed to search registry with scope "mmagic" in the "function" registry tree. As a workaround, the current "function" registry in "mmengine" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmagic" is a correct scope, or whether the registry is initialized.
/opt/conda/envs/mmaginc/lib/python3.8/site-packages/mmengine/visualization/visualizer.py:196: UserWarning: Failed to add <class 'mmengine.visualization.vis_backend.LocalVisBackend'>, please provide the save_dir argument.
warnings.warn(f'Failed to add {vis_backend.class}, '
已杀死

Additional information

No response

@Danny0802 Danny0802 added the kind/bug something isn't working label Mar 21, 2024
@Feynman1999
Copy link

你好,非官方,路人回复下,也许你可以在BaseMMagicInferencer类里面的_init_model方法里打印下load的pth的keys,看看和模型的有什么不同

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

3 participants