Expected all tensors to be on the same device

Hey there, I'm creating pods to use Stable Diffusion WebUI, using the tempates offered by RunPod. In both templates, if I use any model that's not default, I get the following error: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument index in method wrapper_CUDA index select) Any ideas on this? There's not much helpful source about this issue. Thanks
34 Replies
ashleyk
ashleyk11mo ago
Which templates? There are multiple WebUI templates. Also, which model and how did you download it? Sounds like your model may be corrupt or something.
snowmonkey
snowmonkeyOP11mo ago
@ashleyk thanks for the answer. I've tried runpod/stable-diffusion:web-ui-10.2.1 runpod/stable-diffusion:fast-stable-diffusion-2.4.0 Both had same exact issues.
ashleyk
ashleyk11mo ago
Which model?
snowmonkey
snowmonkeyOP11mo ago
In a fresh installation I can reproduce this error with sd_xl_base_1.0.safetensors [31e35c80fc]
ashleyk
ashleyk11mo ago
Did you set your resolution to 1024x1024?
snowmonkey
snowmonkeyOP11mo ago
I also installed some extra models, if I select them, the webui switches back to sd_xl_base automatically.
No description
snowmonkey
snowmonkeyOP11mo ago
Just tried now. same issue
No description
ashleyk
ashleyk11mo ago
What kind of pod is this?
snowmonkey
snowmonkeyOP11mo ago
RTX A5000. I can run these models locally with no problems.
No description
ashleyk
ashleyk11mo ago
I don't know why this is happening, everything looks okay to me. @Madiator2011 [EU] any idea?
snowmonkey
snowmonkeyOP11mo ago
Isn't it reproducable for others? I created so many pods in past a few days, every one of them had this issue
Madiator2011
Madiator201111mo ago
corupted model
ashleyk
ashleyk11mo ago
I also suspected that but the SDXL base model is included with the template so it shouldn't be corrupt, maybe some issue with the storage in SE or something thats causing the models to become corrupt.
Madiator2011
Madiator201111mo ago
Would need to see full error messages
snowmonkey
snowmonkeyOP11mo ago
If there's a corrupt model in the same folder, would we get the same error, for an uncorrupt model?
ashleyk
ashleyk11mo ago
No
snowmonkey
snowmonkeyOP11mo ago
I see that my uploads have been timing out. Which is another problem. I'm not sure how to download large models from civitai, which requires login for download.
ashleyk
ashleyk11mo ago
Maybe the corrupt model messed up the tensors and you have to restart your pod to clear them Try restarting your pod and then using the SDXL base model again
snowmonkey
snowmonkeyOP11mo ago
I created another pod already
ashleyk
ashleyk11mo ago
Use the CivitAI extension, you have to pay for it though
snowmonkey
snowmonkeyOP11mo ago
any reliable way to upload? why does scp time out so often?
ashleyk
ashleyk11mo ago
GitHub
GitHub - runpod/runpodctl: 🧰 | RunPod CLI for pod management
🧰 | RunPod CLI for pod management. Contribute to runpod/runpodctl development by creating an account on GitHub.
snowmonkey
snowmonkeyOP11mo ago
Installation fails
❯ brew tap runpod/runpodctl

==> Tapping runpod/runpodctl
Cloning into '/opt/homebrew/Library/Taps/runpod/homebrew-runpodctl'...
Username for 'https://github.com':
Password for 'https://github.com':
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/runpod/homebrew-runpodctl/'
Error: Failure while executing; `git clone https://github.com/runpod/homebrew-runpodctl /opt/homebrew/Library/Taps/runpod/homebrew-runpodctl --origin=origin --template= --config core.fsmonitor=false` exited with 128.
❯ brew tap runpod/runpodctl

==> Tapping runpod/runpodctl
Cloning into '/opt/homebrew/Library/Taps/runpod/homebrew-runpodctl'...
Username for 'https://github.com':
Password for 'https://github.com':
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/runpod/homebrew-runpodctl/'
Error: Failure while executing; `git clone https://github.com/runpod/homebrew-runpodctl /opt/homebrew/Library/Taps/runpod/homebrew-runpodctl --origin=origin --template= --config core.fsmonitor=false` exited with 128.
ashleyk
ashleyk11mo ago
Don't use homebrew Oh I see they updated the instructions
snowmonkey
snowmonkeyOP11mo ago
No description
ashleyk
ashleyk11mo ago
Do you have Intel or Apple Silicon?
snowmonkey
snowmonkeyOP11mo ago
M1 the wget way also does not work
ashleyk
ashleyk11mo ago
wget https://github.com/runpod/runpodctl/releases/download/v1.13.0/runpodctl-darwin-arm64
chmod +x runpodctl-darwin-arm64
sudo mv runpodctl-darwin-arm64 /usr/local/bin/runpodctl
runpodctl -v
wget https://github.com/runpod/runpodctl/releases/download/v1.13.0/runpodctl-darwin-arm64
chmod +x runpodctl-darwin-arm64
sudo mv runpodctl-darwin-arm64 /usr/local/bin/runpodctl
runpodctl -v
snowmonkey
snowmonkeyOP11mo ago
this worked, thanks! I'll try uploading now
ashleyk
ashleyk11mo ago
@Justin Merrell homebrew instructions for runpodctl for Mac are not working
snowmonkey
snowmonkeyOP11mo ago
I also don't get how file transfer works. send command doesn't specify a pod name. It's sending a file. but to where? there seems to be a lot of issues with the runpodctl
✦ ❯ runpodctl send models
Zipping models to models.zip
Adding models/ultraspiceXLTURBO_v10.safetensors
Sending 'models.zip' (19.5 GB)
Code is: 1103-monday-garage-history-1
On the other computer run

runpodctl receive 1103-monday-garage-history-1
✦ ❯ runpodctl send models
Zipping models to models.zip
Adding models/ultraspiceXLTURBO_v10.safetensors
Sending 'models.zip' (19.5 GB)
Code is: 1103-monday-garage-history-1
On the other computer run

runpodctl receive 1103-monday-garage-history-1
I have no clue what's going on here... it zips, then gives a code, files are getting uploaded somewhere and it also says "On the other computer run" It's very poetic output, but a simple file upload leaves the user clueless
ashleyk
ashleyk11mo ago
You don't need the pod name, you type the recieve command that it gives you into your pod to receive the data
Madiator2011
Madiator201111mo ago
You can also download from api directly
curl -LOJH "Authorization: Bearer xxxxxx" https://civitai.com/api/download/models/143906?type=Model&format=SafeTensor&size=pruned&fp=fp16
curl -LOJH "Authorization: Bearer xxxxxx" https://civitai.com/api/download/models/143906?type=Model&format=SafeTensor&size=pruned&fp=fp16
Note you need generate api key on civatic example for Ultraspice would be
curl -LOJH "Authorization: Bearer xxxxxx" https://civitai.com/api/download/models/342732?type=Model&format=SafeTensor&size=pruned&fp=fp16
curl -LOJH "Authorization: Bearer xxxxxx" https://civitai.com/api/download/models/342732?type=Model&format=SafeTensor&size=pruned&fp=fp16
Madiator2011
Madiator201111mo ago
@snowmonkey the api key you can get from https://civitai.com/user/account
Civitai: The Home of Open-Source Generative AI
Explore thousands of high-quality Stable Diffusion models, share your AI-generated art, and engage with a vibrant community of creators
Want results from more Discord servers?
Add your server