VGen icon indicating copy to clipboard operation
VGen copied to clipboard

Exception: Failed to invoke function <function inference_i2vgen_entrance at 0x7f56eb98d5e0>, with indices should be either on cpu or on the same device as the indexed tensor (cpu)

Open howardgriffin opened this issue 2 years ago • 3 comments

File "/ldm_ani/i2vgen-xl/tools/modules/diffusions/diffusion_ddim.py", line 13, in _i return tensor[t].view(shape).to(x) RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu) How to solve it?

howardgriffin avatar Dec 15 '23 07:12 howardgriffin

We found that this issue may arise in different environments. It has been fixed, you can pull the latest code again.

Steven-SWZhang avatar Dec 15 '23 09:12 Steven-SWZhang

Or you can change the code, refer to here

Steven-SWZhang avatar Dec 15 '23 09:12 Steven-SWZhang

Or you can change the code, refer to here

Wow, your method is so simple, I actually passed in the gpu id to modify the device

zhanghongyong123456 avatar Dec 15 '23 09:12 zhanghongyong123456