zyddnys / sd_animation_optical_flow

stabilizing SD generated video
73 stars 6 forks source link

Failed to import CuPy #1

Open alexfredo opened 1 year ago

alexfredo commented 1 year ago

Hi I have install cupy but when I try to execute for example "py ofgen_pixel_inpaint.py --i 1.mp4 --o C:\AUTOMATIC1111\SDOPTICALFLOW\save_dir\1.mp4"

I have this error : warnings.warn(f''' Traceback (most recent call last): File "C:\Users\Alex\AppData\Local\Programs\Python\Python39\lib\site-packages\cupy__init.py", line 17, in from cupy import _core # NOQA File "C:\Users\Alex\AppData\Local\Programs\Python\Python39\lib\site-packages\cupy_core__init__.py", line 3, in from cupy._core import core # NOQA File "cupy_core\core.pyx", line 1, in init cupy._core.core File "C:\Users\Alex\AppData\Local\Programs\Python\Python39\lib\site-packages\cupy\cuda\init__.py", line 8, in from cupy.cuda import compiler # NOQA File "C:\Users\Alex\AppData\Local\Programs\Python\Python39\lib\site-packages\cupy\cuda\compiler.py", line 13, in from cupy.cuda import device File "cupy\cuda\device.pyx", line 1, in init cupy.cuda.device ImportError: DLL load failed while importing runtime: Le module spécifié est introuvable.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\AUTOMATIC1111\SDOPTICALFLOW\ofgen_pixel_inpaint.py", line 17, in from pdcnet_of import warp_frame_latent as warp_frame_latent_pdcnet, warp_frame as warp_frame_pdcnet File "C:\AUTOMATIC1111\SDOPTICALFLOW\pdcnet_of.py", line 8, in from models.PDCNet.PDCNet import PDCNet_vgg16 File "C:\AUTOMATIC1111\SDOPTICALFLOW\models\PDCNet\PDCNet.py", line 8, in from models.modules.local_correlation import correlation File "C:\AUTOMATIC1111\SDOPTICALFLOW\models\modules\local_correlation\correlation.py", line 3, in import cupy File "C:\Users\Alex\AppData\Local\Programs\Python\Python39\lib\site-packages\cupy__init__.py", line 19, in raise ImportError(f''' ImportError:

Failed to import CuPy.

If you installed CuPy via wheels (cupy-cudaXXX or cupy-rocm-X-X), make sure that the package matches with the version of CUDA or ROCm installed.

On Linux, you may need to set LD_LIBRARY_PATH environment variable depending on how you installed CUDA/ROCm. On Windows, try setting CUDA_PATH environment variable.

Check the Installation Guide for details: https://docs.cupy.dev/en/latest/install.html

Original error: ImportError: DLL load failed while importing runtime: Le module spécifié est introuvable.

alexfredo commented 1 year ago

I fixed the error but now I have another bug : Traceback (most recent call last): File "C:\AUTOMATIC1111\SDOPTICALFLOW\ofgen_pixel_inpaint.py", line 17, in from pdcnet_of import warp_frame_latent as warp_frame_latent_pdcnet, warp_frame as warp_frame_pdcnet File "C:\AUTOMATIC1111\SDOPTICALFLOW\pdcnet_of.py", line 8, in from models.PDCNet.PDCNet import PDCNet_vgg16 File "C:\AUTOMATIC1111\SDOPTICALFLOW\models\PDCNet\PDCNet.py", line 8, in from models.modules.local_correlation import correlation File "C:\AUTOMATIC1111\SDOPTICALFLOW\models\modules\local_correlation\correlation.py", line 278, in @cupyutil.memoize(for_each_device=True) AttributeError: module 'cupy' has no attribute 'memoize'

alexfredo commented 1 year ago

What version of cupy I need to install ? thanks

zyddnys commented 1 year ago

I use cupy==11.6.0 on Linux machine, don't know if it works on windows