Comfy-Org / Comfy-Org/ComfyUI

[BUG] Expected all tensors to be on the same device - Triggered from VAE Encode for Inpaint Node

Open
#2,556 2 comments 0 reactions 0 assignees View on GitHub
User Support
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

I'm on commit `f9e55d84` dated Jan 15 (today)

```
commit f9e55d8463da692954d84f51ca354161396fe1b8 (HEAD -> master, origin/master, backup_branch_2024-01-15_12_17_21, backup_branch_2024-01-15_12_17_10)
Author: comfyanonymous
Date: Mon Jan 15 03:10:22 2024 -0500

Only auto enable bf16 VAE on nvidia GPUs that actually support it.
```

Trying to run this workflow:

https://github.com/cubiq/ComfyUI_Workflows/blob/main/in-out_painting/inpaint.json

and I'm getting this error message:

```
Error occurred when executing VAEEncodeForInpaint:

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

File "G:\ComfyUI_windows_portable\ComfyUI\execution.py", line 155, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\ComfyUI_windows_portable\ComfyUI\execution.py", line 85, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\ComfyUI_windows_portable\ComfyUI\execution.py", line 78, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 356, in encode
pixels[:,:,:,i] *= m
```

![image](https://github.com/AUTOMATIC1111/stable-diffusion-webui/assets/903488/8ad3d3fc-9a00-4b7a-9233-bf7808b5a8b5)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.