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

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat2 in method wrapper_CUDA_mm) #41

Open
bagelbig opened this issue Nov 26, 2024 · 3 comments

Comments

@bagelbig
Copy link

Using the img2img workflow downloaded from here, no changes, got the error message:

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat2 in method wrapper_CUDA_mm)

I am running on a system with:
1xGPU (20GB VRAM)
2xCPU

I could find no way to tell it to specifically stick in GPUs.
It did not look like it ran out of VRAM.

Any suggestions?

@herocoming777
Copy link

same error.

@bitsentinel-cell
Copy link

same

@bagelbig
Copy link
Author

bagelbig commented Dec 2, 2024

I have unexpectedly seemed to work around this problem. On the same system, I did the following:

  1. Remove the env for ComfyUI.
  2. Recreate a new env for ComfyUI.
  3. Install the latest version of ComfyUI.
  4. Load the workflow, and only install missing nodes.

It now launches and runs as expected.

It is possible there was something amiss in one of the other custom nodes installed, or in the version (or installation thereof) of ComfyUI itself.

It's a bit of a bother, but I recommend trying to setup a whole new ComfyUI environment and hope for the best!

(Note, this was done on WSL2).

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