[Bug] ImportError: DLL load failed while importing _C, what might cause this error
Checklist
- [x] 1. I have searched for related issues and FAQs (https://github.com/mit-han-lab/nunchaku/discussions/262) but was unable to find a solution.
- [x] 2. The issue persists in the latest version.
- [x] 3. Please note that without environment information and a minimal reproducible example, it will be difficult for us to reproduce and address the issue, which may delay our response.
- [x] 4. If your report is a question rather than a bug, please submit it as a discussion at https://github.com/mit-han-lab/nunchaku/discussions/new/choose. Otherwise, this issue will be closed.
- [x] 5. If this is related to ComfyUI, please report it at https://github.com/mit-han-lab/ComfyUI-nunchaku/issues.
- [x] 6. I will do my best to describe the issue in English.
Describe the Bug
Traceback (most recent call last):
File "K:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 2153, in load_custom_node
module_spec.loader.exec_module(module)
File "
Environment
win10, python 3.11, 2.8.0.dev20250414+cu126, cuda 12.6
Reproduction Steps
run run_nvidia_gpu.bat for comfyui
Likely an incompatible rotch version. In my case using a different version of torch and torcvision helped (but I'm using torch 2.8 nightly)
Likely an incompatible rotch version. In my case using a different version of torch and torcvision helped (but I'm using torch 2.8 nightly)
Thanks, I'm using torch 2.8 nightly too, and updated it to the recent version. Nunchaku is OK with older torch 2.8 nightly version(0405 e.g.), but recent HiDreamSampler reports error with older torch 2.8 nightly.
Move to previous version of torch totally helps, thanks!
🚀 here wheels for my setup
python -m pip install "https://download.pytorch.org/whl/nightly/cu128/torch-2.8.0.dev20250405%2Bcu128-cp312-cp312-win_amd64.whl" "https://download.pytorch.org/whl/nightly/cu128/torchvision-0.22.0.dev20250406%2Bcu128-cp312-cp312-win_amd64.whl"
you can find your wheels here.
Move to previous version of
torchtotally helps, thanks!🚀 here wheels for my setup
python -m pip install "https://download.pytorch.org/whl/nightly/cu128/torch-2.8.0.dev20250405%2Bcu128-cp312-cp312-win_amd64.whl" "https://download.pytorch.org/whl/nightly/cu128/torchvision-0.22.0.dev20250406%2Bcu128-cp312-cp312-win_amd64.whl"you can find your wheels here.
Thank you, your method is very effective. The current NVIDIA drivers are not stable.
Getting the same error on win11 with a blackwell gpu. Environment has:
python version: 3.13.2 torch version: 2.8.0.dev20250419+cu128 cuda version (torch): 12.8 torchvision version: 0.22.0.dev20250420+cu128 transformers version: 4.51.3 diffusers version: 0.33.1 accelerate version: 1.6.0 protobuf version: 6.30.2 sentencepiece version: 0.2.0 huggingface_hub version: 0.30.2
Installed nunchaku from nunchaku-0.2.0+torch2.8-cp313-cp313-win_amd64.whl Should be working, right?
EDIT: I even built it following the instructions. The build completed and installed without any issue, but the problem remains.
"ImportError: DLL load failed while importing _C: The specified procedure could not be found."
Our Torch 2.8 wheels are not compatible with your current installation because Torch 2.8 is a nightly build that changes frequently. In this case, we recommend compiling Nunchaku from source.
To help you with the process, we’ve provided step-by-step tutorial videos in both English and Chinese.
You can also follow the corresponding text guide in our documentation: docs/setup_windows.md.