Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

加载量化版的4bit chatglm3 运行报错,RuntimeError: Library cudart is not initialized #79

Open
jasoncow007 opened this issue Aug 23, 2024 · 1 comment

Comments

@jasoncow007
Copy link

cpm_kernels库已经正确安装,但还是会出下如下错误,求解!

Load TEXT_ENCODER...
!!! Exception during processing !!! Library cudart is not initialized
Traceback (most recent call last):
File "D:\ComfyUI-aki-v1.2\execution.py", line 317, 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 "D:\ComfyUI-aki-v1.2\execution.py", line 192, 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 "D:\ComfyUI-aki-v1.2\execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "D:\ComfyUI-aki-v1.2\execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-KwaiKolorsWrapper\nodes.py", line 188, in loadmodel
text_encoder.quantize(4)
File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-KwaiKolorsWrapper\kolors\models\modeling_chatglm.py", line 852, in quantize
quantize(self.encoder, weight_bit_width)
File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-KwaiKolorsWrapper\kolors\models\quantization.py", line 155, in quantize
layer.self_attention.query_key_value = QuantizedLinear(
File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-KwaiKolorsWrapper\kolors\models\quantization.py", line 139, in init
self.weight = compress_int4_weight(self.weight)
File "D:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-KwaiKolorsWrapper\kolors\models\quantization.py", line 78, in compress_int4_weight
kernels.int4WeightCompression(
File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\cpm_kernels\kernels\base.py", line 48, in call
func = self._prepare_func()
File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\cpm_kernels\kernels\base.py", line 36, in _prepare_func
curr_device = cudart.cudaGetDevice()
File "D:\ComfyUI-aki-v1.2\python\lib\site-packages\cpm_kernels\library\base.py", line 72, in wrapper
raise RuntimeError("Library %s is not initialized" % self.__name)
RuntimeError: Library cudart is not initialized

@xm1085
Copy link

xm1085 commented Aug 25, 2024

请问你解决了吗,我也是这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants