luosiallen / Diff-Foley

Diff-Foley: Synchronized Video-to-Audio Synthesis with Latent Diffusion Models
Apache License 2.0
147 stars 15 forks source link

Environment script/help with mmcv in inference notebook #6

Closed juliawilkins closed 9 months ago

juliawilkins commented 10 months ago

Hi all, thanks for the great work! I am having some trouble running the inference notebook due to some environment/package issues.

I'm trying to run Step 1: Loading Stage 1 CAVP model but getting the following error:

File Diff-Foley-main/inference/model/cavp_model.py:3
----> 3 from .cavp_modules import ResNet3dSlowOnly, Cnn14
      4 import torch.nn as nn 
      5 import torch

File Diff-Foley-main/inference/model/cavp_modules.py:8
      6 import torch
      7 import torch.nn as nn
----> 8 from mmcv.cnn import ConvModule, kaiming_init
      9 from mmcv.runner import _load_checkpoint, load_checkpoint
     10 from mmcv.utils import print_log

ImportError: cannot import name 'kaiming_init' from 'mmcv.cnn' (/opt/conda/envs/video_prep/lib/python3.8/site-packages/mmcv/cnn/__init__.py)

I have the following versions related to mmcv/openmim:

openmim                       0.3.9
mmcv                          2.1.0
mmengine                      0.9.1
opencv-python                 4.8.1.78

Do you have any tips on this or would you be able to release an environment setup script? Thank you!

luosiallen commented 10 months ago

Hi, you can refer to the installation of mmcv here: https://github.com/open-mmlab/mmcv

luosiallen commented 10 months ago

also you can try this: mim install mmcv==1.3.11

juliawilkins commented 9 months ago

Thank you, the above worked!