instruct-pix2pix
instruct-pix2pix copied to clipboard
Indices should be either on cpu or on the same device as the indexed tensor (cpu)
When starting training, line 1043 of ./stable_diffusion/ldm/models/diffusion/ddpm_edit.py
logvar_t = self.logvar[t].to(self.device)
will result in an error
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)
I tried to fix it to
logvar_t = self.logvar[t.cpu()].to(self.device)
and it could be continued to run.
I wonder if anyone else has encountered this problem ? and what is the reasonable solution to this problem? Is it because of my hardware configuration that this problem is wrong?
of course, I got the same problem