Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug found for guidance branch. RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu) #90

Open
BrandeisPatrick opened this issue Mar 9, 2024 · 0 comments

Comments

@BrandeisPatrick
Copy link

BrandeisPatrick commented Mar 9, 2024

Error message:

File "/home/patrickli/working/DiGressGuidance/src/diffusion/noise_schedule.py", line 79, in get_alpha_bar
return self.alphas_bar[t_int.long()]
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)

Solution:

replace
return self.alphas_bar[t_int.long()]
with
return self.alphas_bar.to(t_int.device)[t_int.long()]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant