AUTOMATIC1111 / stable-diffusion-webui-tensorrt

MIT License
310 stars 20 forks source link

Trying to create an rttensor for a lora, I got the error ERROR:root: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) Traceback (most recent call last): #76

Open left1000 opened 9 months ago

left1000 commented 9 months ago

Trying to create an rttensor for a lora, I got the error

ERROR:root: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) Traceback (most recent call last):

Which when I got it on the main rttensor page making a profile there, meant that I'd installed the extension incorrectly. But I don't think that's the case here, as I've been making profiles and generating images with them just fine as long as I didn't care about lora's at all.

Not sure how to diagnose the problem, given the misleading error message I have to go on.

left1000 commented 9 months ago

I can now no longer create any rt tensor engine profile. So clicking the button on the Apply LoRA checkpoint to TensorRT model page seems to have broken my installation of the extension, and the only way I know of to fix this issue, is to reinstall automatic1111 entirely. Thankfully I made a backup of it, so I am hoping I can just use that as a jumping off point rather than reinstalling from scratch.

left1000 commented 9 months ago

Even moving a known good copy of all the related files over still results in the error

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)

which apparently I can only fix my re-installing automatic1111webgui from scratch, strange that the installation could be so horribly ruined by clicking a button on this extension's secondary page. I suppose though the reason for the drastic measure is my lack of comprehension of what the error message is saying.

left1000 commented 9 months ago

The known good copy of automatic1111 didn't work to fix this error. Which makes me think there's something wrong with something cuda related installed to my wider system installation of python. Which is strange, as the venv of automatic1111 prebuild shouldn't be interacting with those python files in the first place.

left1000 commented 9 months ago

Reinstalling from scratch got things working again, but it's strange, the self-contained environment of the prebuilt automatic1111webgui, should've meant restoring a known good backup would've fixed it. Yet it didn't. But again it's hard to tell why when I do not comprehend this extra cuda error message.

TLDR: Never ever make a mistake with this extension because if you do you'll have to redo random steps for dozens of minutes. But if you never ever enter anything incorrectly or do anything wrong, it appears to work flawlessly.

kalle07 commented 8 months ago

sorry left1000 seems that tensor freaks here not talk no users

FMsunyh commented 7 months ago

same issue, who can fix it, thanks