bitsandbytes-foundation / bitsandbytes

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

Error occurred when executing DownloadAndLoadFlorence2Model: #1324

Closed JunpeakChen closed 1 month ago

JunpeakChen commented 1 month ago

System Info

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

Reproduction

File "E:\Comfy UI\ComfyUI-aki-v1.3\execution.py", line 316, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "E:\Comfy UI\ComfyUI-aki-v1.3\execution.py", line 191, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "E:\Comfy UI\ComfyUI-aki-v1.3\execution.py", line 168, in _map_node_over_list process_inputs(input_dict, i) File "E:\Comfy UI\ComfyUI-aki-v1.3\execution.py", line 157, in process_inputs results.append(getattr(obj, func)(inputs)) File "E:\Comfy UI\ComfyUI-aki-v1.3\custom_nodes\ComfyUI-Florence2\nodes.py", line 96, in loadmodel model = PeftModel.from_pretrained(model, adapter_name, trust_remote_code=True) File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\peft\peft_model.py", line 429, in from_pretrained model = MODEL_TYPE_TO_PEFT_MODEL_MAPPING[config.task_type](model, config, adapter_name) File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\peft\peft_model.py", line 1395, in init super().init(model, peft_config, adapter_name) File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\peft\peft_model.py", line 138, in init self.base_model = cls(model, {adapter_name: peft_config}, adapter_name) File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\peft\tuners\lora\model.py", line 139, in init super().init(model, config, adapter_name) File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\peft\tuners\tuners_utils.py", line 166, in init self.inject_adapter(self.model, adapter_name) File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\peft\tuners\tuners_utils.py", line 372, in inject_adapter self._create_and_replace(peft_config, adapter_name, target, target_name, parent, current_key=key) File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\peft\tuners\lora\model.py", line 223, in _create_and_replace new_module = self._create_new_module(lora_config, adapter_name, target, kwargs) File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\peft\tuners\lora\model.py", line 291, in _create_new_module from .bnb import dispatch_bnb_8bit File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\peft\tuners\lora\bnb.py", line 19, in import bitsandbytes as bnb File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\bitsandbytes__init__.py", line 6, in from . import cuda_setup, utils, research File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\bitsandbytes\research__init.py", line 1, in from . import nn File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\bitsandbytes\research\nn\init.py", line 1, in from .modules import LinearFP8Mixed, LinearFP8Global File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\bitsandbytes\research\nn\modules.py", line 8, in from bitsandbytes.optim import GlobalOptimManager File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\bitsandbytes\optim\init__.py", line 6, in from bitsandbytes.cextension import COMPILED_WITH_CUDA File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\bitsandbytes\cextension.py", line 20, in raise RuntimeError('''

Expected behavior

Improvements to address such issues

JunpeakChen commented 1 month ago

I solved it by pip list bitsandbytes 0.43.3