标题: 办理Stable Diffusion TensorRT转换模型报错cpu and cuda:0! (when checkin [打印本页] 作者: 尚未崩坏 时间: 2024-7-24 09:09 标题: 办理Stable Diffusion TensorRT转换模型报错cpu and cuda:0! (when checkin 纪录Stable Diffusion webUI TensorRT插件使用过程的报错:
RuntimeError: 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)
拷贝下面的代码覆盖extensions\stable-diffusion-webui-tensorrt里的export_onnx.py文件,将模型和相关的张量移动到GPU,即可办理。