Open langbowang opened 2 months ago
Joy_caption
Expected `device_type` of type `str`, got: `<class 'torch.device'>`
The same error
If you switch off Joy_caption and leave Florence 2 and MiniCPM v2_6 then works. Seems error causing only Joy_caption node.
yep, same problem here
同样错误,双gpu
It worked for me when integrating the changes of #23 in ComfyUI\custom_nodes\ComfyUI_HF_Servelress_Inference\nodes\Joy_Caption.py
D:\AIProject\ComfyUI\custom_nodes\ComfyUI_HF_Servelress_Inference\nodes\ 找到这一行: pythonCopywith torch.amp.autocast_mode.autocast(DEVICE, enabled=True):
将其更改为: pythonCopywith torch.amp.autocast_mode.autocast(DEVICE.type if isinstance(DEVICE, torch.device) else DEVICE, enabled=True):
Joy_Caption.py
Works thank you!
Just small update:
IF Joy_caption has error:
"Expected device_type of type str, got: <class 'torch.device'>"
Under
ComfyUI\custom_nodes\ComfyUI_HF_Servelress_Inference\nodes\Joy_Caption.py
replace
"with torch.amp.autocast_mode.autocast(DEVICE, enabled=True):"
to
"with torch.amp.autocast_mode.autocast(DEVICE.type if isinstance(DEVICE, torch.device) else DEVICE, enabled=True):"
ComfyUI Error Report
Error Details
Exception Message: Expected
device_type
of typestr
, got:<class 'torch.device'>
Stack Trace