Skip to content

RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu) #7

@hoalarious

Description

@hoalarious

Getting an error:

Traceback (most recent call last):
  File "/kaggle/working/diffused-heads-colab/sample.py", line 24, in main
    samples = diffusion.sample(id_frame, audio_emb.unsqueeze(0), **args.unet)
  File "/kaggle/working/diffused-heads-colab/diffusion.py", line 42, in sample
    sample_frame = self.sample_loop(xT[:, i].to(x_cond.device), x_cond, motion_frames, audio_emb[:, audio_ids])
  File "/kaggle/working/diffused-heads-colab/diffusion.py", line 54, in sample_loop
    mean, logvar = self.get_p_params(xt, timesteps_ids, nn_out)
  File "/kaggle/working/diffused-heads-colab/diffusion.py", line 67, in get_p_params
    p_logvar = nu * self.expand(torch.log(self.beta[timesteps])) + (1 - nu) * self.expand(self.log_beta_tilde_clipped[timesteps])
RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Trying to get this working on colab/kaggle.

Need to setup my local environment to debug this better. Wondering if anyone has a fix for this in the mean time?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions