bitsandbytes-foundation / bitsandbytes

Accessible large language models via k-bit quantization for PyTorch.
https://huggingface.co/docs/bitsandbytes/main/en/index
MIT License
6.23k stars 625 forks source link

Error occurred when executing DownloadAndLoadMimicMotionModel - CUDA Setup failed despite GPU being available: python -m bitsandbytes #1277

Open schneegecko opened 3 months ago

schneegecko commented 3 months ago

System Info

Windows 10 python 3.10.11 Lenovo Laptop, Intel CPU with 4090 16gb rtx graphics card

Reproduction

running comfyui samlple workfow of MimicmotionModule

Expected behavior

Running of the workflow MimicMotion Module.

I've tried so far: uninstall bitsandbytes via pip, reinstall bitsandbytes v0.41.2

Did not work, so I reinstalled bitsandbytes 0.43.1 -> same error message


Full error message:

Loading model from: H:\sd\ComfyUI_windows_portable\ComfyUI\models\mimicmotion\MimicMotionMergedUnet_1-0-fp16.safetensors Loading UNET Loading VAE Loading IMAGE_ENCODER Loading POSE_NET ===================================BUG REPORT===================================

The following directories listed in your path were found to be non-existent: {WindowsPath('AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAbOE8jecGMkqq+pL5c9J9rQQAAAACAAAAAAAQZgAAAAEAACAAAABj+AuPKeEXxEk0wAcS5owqqdI9cOOVmOpku9t/cv0j4gAAAAAOgAAAAAIAACAAAABkWAM5dw6jN480b0Oajd7b55rqRlV4jeBHicn4uqgELWAAAAAAdac5uyVzK3T5foQhbH7eU3bmwoQkE/vcuOGxamyPbIwmP3bRgb56yBszUP+lpW/tisixKHwMyHOPFXCj5h/+0aA+sxrg/dOwAiGZHkf6mEfyalWJ0BH5nH9fx0s4RnFAAAAA/6+7c1hj72ub7iDdEzzb35Gz/ni7Pcf3AHqsgDgrVRbjBXxOGLBduYM3BWXAu1zYPY0WiaUzr7/ZEWtc2SptCw==')} CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths... The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')} DEBUG: Possible options found for libcudart.so: set() CUDA SETUP: PyTorch settings found: CUDA_VERSION=121, Highest Compute Capability: 8.9. CUDA SETUP: To manually override the PyTorch CUDA version please see:https://github.com/TimDettmers/bitsandbytes/blob/main/how_to_use_nonpytorch_cuda.md CUDA SETUP: Loading binary H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\bitsandbytes\libbitsandbytes_cuda121.so... argument of type 'WindowsPath' is not iterable CUDA SETUP: Problem: The main issue seems to be that the main CUDA runtime library was not detected. CUDA SETUP: Solution 1: To solve the issue the libcudart.so location needs to be added to the LD_LIBRARY_PATH variable CUDA SETUP: Solution 1a): Find the cuda runtime library via: find / -name libcudart.so 2>/dev/null CUDA SETUP: Solution 1b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_1a CUDA SETUP: Solution 1c): For a permanent solution add the export from 1b into your .bashrc file, located at ~/.bashrc CUDA SETUP: Solution 2: If no library was found in step 1a) you need to install CUDA. CUDA SETUP: Solution 2a): Download CUDA install script: wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/cuda_install.sh CUDA SETUP: Solution 2b): Install desired CUDA version to desired location. The syntax is bash cuda_install.sh CUDA_VERSION PATH_TO_INSTALL_INTO. CUDA SETUP: Solution 2b): For example, "bash cuda_install.sh 113 ~/local/" will download CUDA 11.3 and install into the folder ~/local !!! Exception during processing!!! CUDA Setup failed despite GPU being available. Please run the following command to get more information:

python -m bitsandbytes

Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them
to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes
and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues

Traceback (most recent call last): File "H:\sd\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\sd\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\sd\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\sd\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MimicMotionWrapper\nodes.py", line 143, in loadmodel pipeline = MimicMotionPipeline( ^^^^^^^^^^^^^^^^^^^^ File "H:\sd\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-MimicMotionWrapper\mimicmotion\pipelines\pipeline_mimicmotion.py", line 111, in init self.register_modules( File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 159, in register_modules library, class_name = fetch_class_library_tuple(module) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\pipelines\pipeline_loading_utils.py", line 733, in fetch_class_library_tuple not_compiled_module = unwrap_model(module) ^^^^^^^^^^^^^^^^^^^^^ File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\pipelines\pipeline_loading_utils.py", line 236, in unwrap_model from peft import PeftModel File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\peft_init.py", line 22, in from .auto import ( File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\peft\auto.py", line 31, in from .config import PeftConfig File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\peft\config.py", line 23, in from .utils import CONFIG_NAME, PeftType, TaskType File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\peft\utils_init.py", line 21, in from .loftq_utils import replace_lora_weights_loftq File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\peft\utils\loftq_utils.py", line 35, in import bitsandbytes as bnb File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\bitsandbytes_init.py", line 6, in from . import cuda_setup, utils, research File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\bitsandbytes\research_init.py", line 1, in from . import nn File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\bitsandbytes\research\nninit.py", line 1, in from .modules import LinearFP8Mixed, LinearFP8Global File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\bitsandbytes\research\nn\modules.py", line 8, in from bitsandbytes.optim import GlobalOptimManager File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\bitsandbytes\optiminit.py", line 6, in from bitsandbytes.cextension import COMPILED_WITH_CUDA File "H:\sd\ComfyUI_windows_portable\python_embeded\Lib\site-packages\bitsandbytes\cextension.py", line 20, in raise RuntimeError(''' RuntimeError: CUDA Setup failed despite GPU being available. Please run the following command to get more information:

python -m bitsandbytes

Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them
to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes
and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues

and:

H:\sd\ComfyUI_windows_portable\ComfyUI\custom_nodes>python -m bitsandbytes ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++ BUG REPORT INFORMATION ++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++ OTHER +++++++++++++++++++++++++++ CUDA specs: CUDASpecs(highest_compute_capability=(8, 9), cuda_version_string='118', cuda_version_tuple=(11, 8)) PyTorch settings found: CUDA_VERSION=118, Highest Compute Capability: (8, 9). To manually override the PyTorch CUDA version please see: https://github.com/TimDettmers/bitsandbytes/blob/main/docs/source/nonpytorchcuda.mdx The directory listed in your path is found to be non-existent: C:\WINDOWS\ConfigSetRoot The directory listed in your path is found to be non-existent: \Users\gecko The directory listed in your path is found to be non-existent: \GECKO-LEGION CUDA SETUP: WARNING! CUDA runtime files not found in any environmental path. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++ DEBUG INFO END ++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Checking that the library is importable and CUDA is callable... SUCCESS! Installation was successful!


COMFYUI MIMICMOTION WORKFLOW

{ "last_node_id": 58, "last_link_id": 151, "nodes": [ { "id": 9, "type": "GetImageSizeAndCount", "pos": [ 825, 518 ], "size": { "0": 210, "1": 86 }, "flags": {}, "order": 6, "mode": 0, "inputs": [ { "name": "image", "type": "IMAGE", "link": 112 } ], "outputs": [ { "name": "image", "type": "IMAGE", "links": [ 148 ], "shape": 3, "slot_index": 0 }, { "name": "576 width", "type": "INT", "links": null, "shape": 3 }, { "name": "1024 height", "type": "INT", "links": null, "shape": 3 }, { "name": "16 count", "type": "INT", "links": null, "shape": 3 } ], "properties": { "Node name for S&R": "GetImageSizeAndCount" } }, { "id": 42, "type": "MimicMotionGetPoses", "pos": [ 327, 702 ], "size": { "0": 330, "1": 126 }, "flags": {}, "order": 5, "mode": 0, "inputs": [ { "name": "ref_image", "type": "IMAGE", "link": 110 }, { "name": "pose_images", "type": "IMAGE", "link": 111 } ], "outputs": [ { "name": "poses_with_ref", "type": "IMAGE", "links": [ 112, 114 ], "shape": 3, "slot_index": 0 }, { "name": "pose_images", "type": "IMAGE", "links": [ 138 ], "shape": 3, "slot_index": 1 } ], "properties": { "Node name for S&R": "MimicMotionGetPoses" }, "widgets_values": [ true, true, true ] }, { "id": 3, "type": "LoadImage", "pos": [ -393, 311 ], "size": { "0": 213.0849151611328, "1": 410.70074462890625 }, "flags": {}, "order": 0, "mode": 0, "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 61 ], "shape": 3, "slot_index": 0 }, { "name": "MASK", "type": "MASK", "links": null, "shape": 3 } ], "properties": { "Node name for S&R": "LoadImage" }, "widgets_values": [ "demo1.jpg", "image" ] }, { "id": 35, "type": "ImageResizeKJ", "pos": [ -75, 781 ], "size": { "0": 315, "1": 242 }, "flags": {}, "order": 4, "mode": 0, "inputs": [ { "name": "image", "type": "IMAGE", "link": 86 }, { "name": "get_image_size", "type": "IMAGE", "link": null }, { "name": "width_input", "type": "INT", "link": 88, "widget": { "name": "width_input" } }, { "name": "height_input", "type": "INT", "link": 89, "widget": { "name": "height_input" } } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 111, 137 ], "shape": 3, "slot_index": 0 }, { "name": "width", "type": "INT", "links": null, "shape": 3 }, { "name": "height", "type": "INT", "links": null, "shape": 3 } ], "properties": { "Node name for S&R": "ImageResizeKJ" }, "widgets_values": [ 576, 1024, "lanczos", false, 64, 0, 0 ] }, { "id": 28, "type": "ImageResizeKJ", "pos": [ -71, 481 ], "size": { "0": 315, "1": 242 }, "flags": {}, "order": 3, "mode": 0, "inputs": [ { "name": "image", "type": "IMAGE", "link": 61 }, { "name": "get_image_size", "type": "IMAGE", "link": null }, { "name": "width_input", "type": "INT", "link": null, "widget": { "name": "width_input" } }, { "name": "height_input", "type": "INT", "link": null, "widget": { "name": "height_input" } } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 95, 110, 147 ], "shape": 3, "slot_index": 0 }, { "name": "width", "type": "INT", "links": [ 88 ], "shape": 3, "slot_index": 1 }, { "name": "height", "type": "INT", "links": [ 89 ], "shape": 3, "slot_index": 2 } ], "properties": { "Node name for S&R": "ImageResizeKJ" }, "widgets_values": [ 576, 1024, "lanczos", true, 64, 0, 0 ] }, { "id": 16, "type": "VHS_VideoCombine", "pos": [ 1895, 155 ], "size": [ 2861.660400390625, 1586.960177951389 ], "flags": {}, "order": 11, "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", "link": 93 }, { "name": "audio", "type": "VHS_AUDIO", "link": null }, { "name": "meta_batch", "type": "VHS_BatchManager", "link": null }, { "name": "vae", "type": "VAE", "link": null } ], "outputs": [ { "name": "Filenames", "type": "VHS_FILENAMES", "links": null, "shape": 3 } ], "properties": { "Node name for S&R": "VHS_VideoCombine" }, "widgets_values": { "frame_rate": 12, "loop_count": 0, "filename_prefix": "MimicMotion", "format": "video/h264-mp4", "pix_fmt": "yuv420p", "crf": 19, "save_metadata": true, "pingpong": false, "save_output": false, "videopreview": { "hidden": false, "paused": false, "params": { "filename": "MimicMotion_00002.mp4", "subfolder": "", "type": "temp", "format": "video/h264-mp4", "frame_rate": 12 } } } }, { "id": 17, "type": "ImageConcatMulti", "pos": [ 1644, 830 ], "size": { "0": 210, "1": 190 }, "flags": {}, "order": 10, "mode": 0, "inputs": [ { "name": "image_1", "type": "IMAGE", "link": 95 }, { "name": "image_2", "type": "IMAGE", "link": 137 }, { "name": "image_3", "type": "IMAGE", "link": 138 }, { "name": "image_4", "type": "IMAGE", "link": 151 } ], "outputs": [ { "name": "images", "type": "IMAGE", "links": [ 93 ], "shape": 3, "slot_index": 0 } ], "properties": {}, "widgets_values": [ 4, "right", false, null ] }, { "id": 58, "type": "MimicMotionDecode", "pos": [ 1466, 396 ], "size": { "0": 255.466796875, "1": 78 }, "flags": {}, "order": 9, "mode": 0, "inputs": [ { "name": "mimic_pipeline", "type": "MIMICPIPE", "link": 150, "slot_index": 0 }, { "name": "samples", "type": "LATENT", "link": 149 } ], "outputs": [ { "name": "images", "type": "IMAGE", "links": [ 151 ], "shape": 3, "slot_index": 0 } ], "properties": { "Node name for S&R": "MimicMotionDecode" }, "widgets_values": [ 4 ] }, { "id": 37, "type": "VHS_VideoCombine", "pos": [ 678, 897 ], "size": [ 440, 998.6666666666666 ], "flags": {}, "order": 7, "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", "link": 114 }, { "name": "audio", "type": "VHS_AUDIO", "link": null }, { "name": "meta_batch", "type": "VHS_BatchManager", "link": null }, { "name": "vae", "type": "VAE", "link": null } ], "outputs": [ { "name": "Filenames", "type": "VHS_FILENAMES", "links": null, "shape": 3 } ], "properties": { "Node name for S&R": "VHS_VideoCombine" }, "widgets_values": { "frame_rate": 8, "loop_count": 0, "filename_prefix": "MimicPose", "format": "image/webp", "pingpong": false, "save_output": false, "videopreview": { "hidden": false, "paused": false, "params": { "filename": "MimicPose_00006.webp", "subfolder": "", "type": "temp", "format": "image/webp", "frame_rate": 8 } } } }, { "id": 5, "type": "VHS_LoadVideo", "pos": [ -402, 787 ], "size": [ 235.1999969482422, 658.5777723524305 ], "flags": {}, "order": 1, "mode": 0, "inputs": [ { "name": "meta_batch", "type": "VHS_BatchManager", "link": null }, { "name": "vae", "type": "VAE", "link": null } ], "outputs": [ { "name": "IMAGE", "type": "IMAGE", "links": [ 86 ], "shape": 3, "slot_index": 0 }, { "name": "frame_count", "type": "INT", "links": null, "shape": 3 }, { "name": "audio", "type": "VHS_AUDIO", "links": null, "shape": 3 }, { "name": "video_info", "type": "VHS_VIDEOINFO", "links": null, "shape": 3 } ], "properties": { "Node name for S&R": "VHS_LoadVideo" }, "widgets_values": { "video": "pose1.mp4", "force_rate": 0, "force_size": "Disabled", "custom_width": 512, "custom_height": 512, "frame_load_cap": 15, "skip_first_frames": 0, "select_every_nth": 2, "choose video to upload": "image", "videopreview": { "hidden": false, "paused": false, "params": { "frame_load_cap": 15, "skip_first_frames": 0, "force_rate": 0, "filename": "pose1.mp4", "type": "input", "format": "video/mp4", "select_every_nth": 2 } } } }, { "id": 2, "type": "DownloadAndLoadMimicMotionModel", "pos": [ 658, 230 ], "size": [ 404.81472289843646, 89.03937164746077 ], "flags": {}, "order": 2, "mode": 0, "outputs": [ { "name": "mimic_pipeline", "type": "MIMICPIPE", "links": [ 146, 150 ], "shape": 3 } ], "properties": { "Node name for S&R": "DownloadAndLoadMimicMotionModel" }, "widgets_values": [ "MimicMotionMergedUnet_1-0-fp16.safetensors", "fp16" ] }, { "id": 57, "type": "MimicMotionSampler", "pos": [ 1101, 419 ], "size": { "0": 315, "1": 430 }, "flags": {}, "order": 8, "mode": 0, "inputs": [ { "name": "mimic_pipeline", "type": "MIMICPIPE", "link": 146 }, { "name": "ref_image", "type": "IMAGE", "link": 147 }, { "name": "pose_images", "type": "IMAGE", "link": 148 }, { "name": "optional_scheduler", "type": "DIFFUSERS_SCHEDULER", "link": null } ], "outputs": [ { "name": "samples", "type": "LATENT", "links": [ 149 ], "shape": 3, "slot_index": 0 } ], "properties": { "Node name for S&R": "MimicMotionSampler" }, "widgets_values": [ 20, 2, 2, 42, "fixed", 15, 0, 16, 6, false, 1, 0, 1, 1 ] } ], "links": [ [ 61, 3, 0, 28, 0, "IMAGE" ], [ 86, 5, 0, 35, 0, "IMAGE" ], [ 88, 28, 1, 35, 2, "INT" ], [ 89, 28, 2, 35, 3, "INT" ], [ 93, 17, 0, 16, 0, "IMAGE" ], [ 95, 28, 0, 17, 0, "IMAGE" ], [ 110, 28, 0, 42, 0, "IMAGE" ], [ 111, 35, 0, 42, 1, "IMAGE" ], [ 112, 42, 0, 9, 0, "IMAGE" ], [ 114, 42, 0, 37, 0, "IMAGE" ], [ 137, 35, 0, 17, 1, "IMAGE" ], [ 138, 42, 1, 17, 2, "IMAGE" ], [ 146, 2, 0, 57, 0, "MIMICPIPE" ], [ 147, 28, 0, 57, 1, "IMAGE" ], [ 148, 9, 0, 57, 2, "IMAGE" ], [ 149, 57, 0, 58, 1, "LATENT" ], [ 150, 2, 0, 58, 0, "MIMICPIPE" ], [ 151, 58, 0, 17, 3, "IMAGE" ] ], "groups": [], "config": {}, "extra": { "ds": { "scale": 0.5131581182307069, "offset": { "0": 572.9068982237912, "1": 109.246958798682 } } }, "version": 0.4 }

hanetyb commented 3 months ago

seem i meet the same issue by same mimicmotion plug, any adivce here. image