ConceptExpress icon indicating copy to clipboard operation
ConceptExpress copied to clipboard

found at least two devices, cuda:0 and cpu

Open senguet opened this issue 1 year ago • 1 comments

Thank you very much for your contribution, I have a question. When I run the training code, the following error occurs:

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper__index_select)

But I can't find the problem. Looking forward to your reply, thank you!

senguet avatar Dec 30 '24 07:12 senguet

Append .to(latents.device) at line 1198 and add prompt_ids = prompt_ids.to(latents.device) at line 1326 solve this issue for me.

JackChen890311 avatar Jan 29 '25 07:01 JackChen890311