lllyasviel / lllyasviel/stable-diffusion-webui-forge

[Bug]: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

Open
#809 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [X] The issue exists after disabling all extensions
- [ ] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [ ] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [X] The issue has been reported before but has not been fixed yet

### What happened?

Tried training a dataset with Hypernetwork, but ran into the error: "RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!" when clicked on Train Hypernetwork.
I only have 1 GPU, a 3060 Ti

### Steps to reproduce the problem

1. Clicked on Train on main menu
2. Clicked on Train, again
3. Added my Hypernetwork, and changed latent sampling method to deterministic
4. Clicked on Train Hypernetwork

### What should have happened?

Training should have started

### What browsers do you use to access the UI ?

Google Chrome

### Sysinfo

[sysinfo-2024-06-12-10-44.json](https://github.com/user-attachments/files/15803385/sysinfo-2024-06-12-10-44.json)

(Deleted some file path)

### Console logs

```Shell
https://imgur.com/a/i2OqMni

Didn't see you cant put pics here, and I saved it as a pic instead of copying it.
```

### Additional information

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Train Hypernetwork flow and reproduce the failure using the reported deterministic latent sampling setting. Review the attached sysinfo and console log, then confirm the training process starts without the cuda:0 and cpu tensor device mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.