shadowcz007 / comfyui-mixlab-nodes

Workflow-to-APP、ScreenShare&FloatingVideo、GPT & 3D、SpeechRecognition&TTS
https://mixlabnodes.com
MIT License
1.33k stars 85 forks source link

ValueError: Expected a torch.device with a specified index or an integer, but got:cuda #152

Open whmc76 opened 10 months ago

whmc76 commented 10 months ago

ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "E:\IMAGE\ComfyUI-aki-v1\execution.py", line 155, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "E:\IMAGE\ComfyUI-aki-v1\execution.py", line 85, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "E:\IMAGE\ComfyUI-aki-v1\execution.py", line 69, in map_node_over_list results.append(getattr(obj, func)(input_data_all)) File "E:\IMAGE\ComfyUI-aki-v1\custom_nodes\comfyui-mixlab-nodes\nodes\TextGenerateNode.py", line 292, in run prompt =text_generate(text_pipe,t,seed) File "E:\IMAGE\ComfyUI-aki-v1\custom_nodes\comfyui-mixlab-nodes\nodes\TextGenerateNode.py", line 84, in text_generate sequences = text_pipe(input, max_length=random.randint(60, 90), num_return_sequences=8) File "E:\IMAGE\ComfyUI-aki-v1\python\lib\site-packages\transformers\pipelines\text_generation.py", line 210, in call return super().call(text_inputs, kwargs) File "E:\IMAGE\ComfyUI-aki-v1\python\lib\site-packages\transformers\pipelines\base.py", line 1084, in call return self.run_single(inputs, preprocess_params, forward_params, postprocess_params) File "E:\IMAGE\ComfyUI-aki-v1\python\lib\site-packages\transformers\pipelines\base.py", line 1091, in run_single model_outputs = self.forward(model_inputs, **forward_params) File "E:\IMAGE\ComfyUI-aki-v1\python\lib\site-packages\transformers\pipelines\base.py", line 984, in forward with self.device_placement(): File "E:\IMAGE\ComfyUI-aki-v1\python\lib\contextlib.py", line 135, in enter return next(self.gen) File "E:\IMAGE\ComfyUI-aki-v1\python\lib\site-packages\transformers\pipelines\base.py", line 871, in device_placement torch.cuda.set_device(self.device) File "E:\IMAGE\ComfyUI-aki-v1\python\lib\site-packages\torch\cuda__init__.py", line 402, in set_device device = _get_device_index(device) File "E:\IMAGE\ComfyUI-aki-v1\python\lib\site-packages\torch\cuda_utils.py", line 39, in _get_device_index return _torch_get_device_index(device, optional, allow_cpu) File "E:\IMAGE\ComfyUI-aki-v1\python\lib\site-packages\torch_utils.py", line 787, in _get_device_index raise ValueError( ValueError: Expected a torch.device with a specified index or an integer, but got:cuda

whmc76 commented 10 months ago

prompt generate node

bigybin commented 10 months ago

相同的问题,好几个节点运行的时候都是这几个地方报错,解决了吗

whmc76 commented 10 months ago

相同的问题,好几个节点运行的时候都是这几个地方报错,解决了吗

还没有 我之前自己部署的就没事,这个是秋叶安装包出现的

linuxdevopscn commented 4 months ago

中文翻译的 TextGenerateNode.py 的 323,417 行我直接写死了device="cuda:0"