siliconflow / onediff

OneDiff: An out-of-the-box acceleration library for diffusion models.
https://github.com/siliconflow/onediff/wiki
Apache License 2.0
1.71k stars 105 forks source link

[Bug] Oneflow, onediff with pytorch 2.4.1 ImportError: libcudnn_cnn_infer.so.8 #1125

Closed liho00 closed 2 weeks ago

liho00 commented 4 weeks ago

Your current environment information

Traceback (most recent call last): File "/home/shadeform/miniconda3/envs/miner/lib/python3.10/site-packages/onediff/utils/import_utils.py", line 16, in check_module_availability importlib.import_module(module_name) File "/home/shadeform/miniconda3/envs/miner/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/shadeform/miniconda3/envs/miner/lib/python3.10/site-packages/oneflow/init.py", line 26, in import oneflow._oneflow_internal ImportError: libcudnn_cnn_infer.so.8: cannot open shared object file: No such file or directory

🐛 Describe the bug

onediff==1.2.1.dev24+g9231f556 pytorch==2.4.1

python3 -m pip install -U --pre oneflow -f https://github.com/siliconflow/oneflow_releases/releases/expanded_assets/community_cu118 python3 -m pip install -U --pre oneflow -f https://github.com/siliconflow/oneflow_releases/releases/expanded_assets/community_cu121 python3 -m pip install -U --pre oneflow -f https://github.com/siliconflow/oneflow_releases/releases/expanded_assets/community_cu122 tried above three oneflow installation.

seems like oneflow not supporting pytorch==2.4.1, if i install pytorch==2.3.1 then it works

strint commented 3 weeks ago

What is the cudnn version are you using?

You can get it with:

import torch

if torch.backends.cudnn.is_available():
    cudnn_version = torch.backends.cudnn.version()
    print(f"cuDNN version: {cudnn_version}")
else:
    print("cuDNN is not available.")
techzuhaib commented 3 weeks ago

This worked for me: sudo apt install libcudnn8

strint commented 2 weeks ago
python3 -m pip install nvidia-cudnn-cu11==8.7.0.84

can fix this.

liho00 commented 1 week ago
python3 -m pip install nvidia-cudnn-cu11==8.7.0.84

can fix this.

after running this python3 -m pip install nvidia-cudnn-cu11==8.7.0.84 i got below error ImportError: libcudnn.so.9: cannot open shared object file: No such file or directory

strint commented 1 week ago

libcudnn.so.9

which package is reporting this error

liho00 commented 1 week ago

libcudnn.so.9

which package is reporting this error

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. torch 2.4.1 requires nvidia-cudnn-cu12==9.1.0.70; platform_system == "Linux" and platform_machine == "x86_64", but you have nvidia-cudnn-cu12 8.9.7.29 which is incompatible.

im using pytorch 2.4.1

is oneflow dont support pytorch 2.4.1 libcudnn_cnn_infer.so.9 and above? i used nexfort its working tho.

its pytorch with 2.4.1 throwing this error, could you verify with pytorch 2.4.1?

liho00 commented 1 week ago

This worked for me: sudo apt install libcudnn8

not working as well

sudo apt update sudo apt install libcudnn8 Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package libcudnn8

+-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 550.90.12 Driver Version: 550.90.12 CUDA Version: 12.4 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA H100 80GB HBM3 On | 00000000:07:00.0 Off | 0 | | N/A 24C P0 69W / 700W | 1MiB / 81559MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ | 1 NVIDIA H100 80GB HBM3 On | 00000000:08:00.0 Off | 0 | | N/A 26C P0 69W / 700W | 1MiB / 81559MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | No running processes found |

liho00 commented 1 week ago

libcudnn.so.9

which package is reporting this error

im using onediff with comfyui

marigoold commented 5 days ago

@liho00 try

pip install nvidia-cudnn-cu12==8.9.0.131