NVIDIA / Stable-Diffusion-WebUI-TensorRT

TensorRT Extension for Stable Diffusion Web UI
MIT License
1.92k stars 146 forks source link

ONNX Export Error: Tensors on Different Devices (CPU and CUDA) #339

Open YS-YYDS opened 4 months ago

YS-YYDS commented 4 months ago

Hello,

I'm experiencing an issue similar to the one described in this comment. When exporting to ONNX, I encounter an error indicating that tensors are on different devices (CPU and CUDA). The error log is as follows: ERROR:root:Exporting to ONNX failed. Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument mat1 in method wrapper_CUDA_addmm) ... Could you please help me understand what might be causing this issue and how I can resolve it? Thank you!

bartmobil commented 4 months ago

Try to run disabling options like lowvram or medvram