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

Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! #428

Open
rayanarman opened this issue Mar 7, 2025 · 8 comments

Comments

@rayanarman
Copy link

The line causing the issue:

latents = latents * (1 - latent_timestep / 1000) + latent_timestep / 1000 * noise

I added the following before that line to fix it:

latents = latents.to(device)
latent_timestep = latent_timestep.to(device)
noise = noise.to(device)

@kijai
Copy link
Owner

kijai commented Mar 7, 2025

With what workflow exactly? I couldn't replicate this with I2V, T2V or V2V workflow examples with current version at least.

@rayanarman
Copy link
Author

I'm doing a 2-step generation using a low-res generation first, then upscaling the latent and providing that latentt to another HunyuanVideoSampler node on the input for samples, with denoise set to 0.6.
If I set denoise to 1.0 on the second HunyuanVideoSampler then error would not occur but below 1.0 was the error.

@eas125
Copy link

eas125 commented Mar 7, 2025

I have the same thing. Works if the second sampler has denoise set to 1, but results in 2 different vids with pixelation.

Image

Image

@eas125
Copy link

eas125 commented Mar 7, 2025

To clarify, this is t2v, not i2v.

@kijai
Copy link
Owner

kijai commented Mar 8, 2025

I have the same thing. Works if the second sampler has denoise set to 1, but results in 2 different vids with pixelation.

Image

Image

It should work with the latest version of the nodes.

@eas125
Copy link

eas125 commented Mar 8, 2025

Sorry, still getting it. Deleting and cloned new repository didn't help.

@kijai
Copy link
Owner

kijai commented Mar 8, 2025

Sorry, still getting it. Deleting and cloned new repository didn't help.

Can you try again now, it's working for me at least with latest push.

@eas125
Copy link

eas125 commented Mar 8, 2025

Looks like you got it. Tested with and without riflex just in case. Thank you.
I am getting an oom error with 720 and higher resolutions when using riflex now, but I'm not sure if that has anything to do with the sampler. 4090 card.

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

3 participants