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

Fix tensors in different device error. #41

Merged
merged 2 commits into from
Feb 7, 2025
Merged

Conversation

broken-rotor
Copy link
Contributor

This fixes #35 for me.

Copy link

@adydeejay adydeejay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix resolves the issues reported in #35 and #24
Just tested Latent Batch / Comfyui Queue Batch / Comfyui Queue (Instant) = OK
Thanks!

@adydeejay adydeejay mentioned this pull request Nov 29, 2024
@aqidesign
Copy link

thanks!

@king19871214
Copy link

This fix resolves the issues reported in #35 and #24此修复解决了中报告的问题 #35#24 Just tested Latent Batch / Comfyui Queue Batch / Comfyui Queue (Instant) = OK刚刚测试 Latent Batch / Comfyui Queue Batch / Comfyui Queue (Instant) = OK Thanks! 谢谢!

如何解决的,谢谢

@aqidesign
Copy link

This fix resolves the issues reported in #35 and #24此修复解决了中报告的问题 #35#24 Just tested Latent Batch / Comfyui Queue Batch / Comfyui Queue (Instant) = OK刚刚测试 Latent Batch / Comfyui Queue Batch / Comfyui Queue (Instant) = OK Thanks! 谢谢!

如何解决的,谢谢

上面切换到commits,查看文档手动修改本地文件 pulidflux.py

@reitani
Copy link

reitani commented Dec 4, 2024

This fix resolves the issues reported in #35 and #24此修复解决了中报告的问题 #35#24 Just tested Latent Batch / Comfyui Queue Batch / Comfyui Queue (Instant) = OK刚刚测试 Latent Batch / Comfyui Queue Batch / Comfyui Queue (Instant) = OK Thanks! 谢谢!

如何解决的,谢谢

上面切换到commits,查看文档手动修改本地文件 pulidflux.py

这是什么意思?不懂编程,博主能讲清楚点吗?

@reitani
Copy link

reitani commented Dec 4, 2024

This fix resolves the issues reported in #35 and #24 Just tested Latent Batch / Comfyui Queue Batch / Comfyui Queue (Instant) = OK Thanks!

What's that meaning and how should I do that?

@adydeejay
Copy link

What's that meaning and how should I do that?

@reitani Just download this file pulidflux.py and place it in this folder (overwrite the original file):
..\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-PuLID-Flux-Enhanced
Start/Restart your ComfyUI

@reitani
Copy link

reitani commented Dec 5, 2024

What's that meaning and how should I do that?

@reitani Just download this file pulidflux.py and place it in this folder (overwrite the original file): ..\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-PuLID-Flux-Enhanced Start/Restart your ComfyUI

I did that and it worked! Thank you so much for telling me!

@OvO111111
Copy link

I tried this method but it didn't work. If you have the same issue, you can try using ComfyUI-PuLID-Flux-master instead of Enhanced. I noticed the error message indicated master, so I used the pulidflux.py mentioned above to overwrite the same file in master, and it worked successfully.

@king19871214
Copy link

king19871214 commented Dec 11, 2024 via email

@tiemriver
Copy link

What's that meaning and how should I do that?

@reitani Just download this file pulidflux.py and place it in this folder (overwrite the original file): ..\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-PuLID-Flux-Enhanced Start/Restart your ComfyUI

think you so much,it's helped me

@santosli
Copy link

thx, it saves my days

@adydeejay
Copy link

This fix resolves the issues reported in #35 and #24
Just tested Latent Batch / Comfyui Queue Batch / Comfyui Queue (Instant) = OK

@sipie800 Could you please merge the @broken-rotor 's PR?

Fixes errors we still encounter in ComfyUI (already tested to the latest version) using PuLID Flux Enhanced : "Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument weight in method wrapper_CUDA__native_layer_norm)" and "Enable Batch Processing >1 in Image Generation"

@StanislavShashkov
Copy link

Я попробовал этот метод, но он не сработал. Если у вас та же проблема, вы можете попробовать использовать ComfyUI-PuLID-Flux-master вместо Enhanced . Я заметил, что сообщение об ошибке указывает на master, поэтому я использовал pulidflux.py, упомянутый выше, чтобы перезаписать тот же файл в master, и это сработало успешно.

Where can I download the master version? Tell me, I can't solve the error issue by any means either.

@adydeejay
Copy link

Where can I download the master version? Tell me, I can't solve the error issue by any means either.

@StanislavShashkov This PR is not merged yet so you need to download this file pulidflux.py and place it in this folder (overwrite the original file):
..\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-PuLID-Flux-Enhanced
Start/Restart your ComfyUI

@Alasundru
Copy link

I am also still getting this issue, after 1 or 2 queues it comes up with the "Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument weight in method wrapper_CUDA__native_layer_norm)" error. I tried downloading the [pulidflux.py](https://github.com/sipie800/ComfyUI-PuLID-Flux-Enhanced/blob/95f15884511af22c49394c54227914a2bbc7bbb1/pulidflux.py) file and restarting, and I still have the error.

I hope a fix comes soon.

@broken-rotor
Copy link
Contributor Author

I am also still getting this issue, after 1 or 2 queues it comes up with the "Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument weight in method wrapper_CUDA__native_layer_norm)" error. I tried downloading the [pulidflux.py](https://github.com/sipie800/ComfyUI-PuLID-Flux-Enhanced/blob/95f15884511af22c49394c54227914a2bbc7bbb1/pulidflux.py) file and restarting, and I still have the error.

I hope a fix comes soon.

Do you have a full stack trace?

muchl added a commit to muchl/ComfyUI-PuLID-Flux that referenced this pull request Jan 8, 2025
error:
Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument weight in method wrapper_CUDA__native_layer_norm)
sipie800/ComfyUI-PuLID-Flux-Enhanced#41
sipie800/ComfyUI-PuLID-Flux-Enhanced#35
@Quaximodo666
Copy link

Quaximodo666 commented Jan 11, 2025

这是什么意思?我该怎么做?

@reitani只需下载此文件pulidflux.py并将其放在此文件夹中(覆盖原始文件): ..\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-PuLID-Flux-Enhanced 启动/重新启动您的 ComfyUI

我这边出现的问题是覆盖并重启comfyui后提示缺失pulid节点,尝试修复再重启comfyui这个节点仍然缺失,只能卸载了这个节点重新安装,但又出现了最初的报错提示。可能我的配置存在错误?

@adydeejay
Copy link

我这边出现的问题是覆盖并重启comfyui后提示缺失pulid节点,尝试修复再重启comfyui这个节点仍然缺失,只能卸载了这个节点重新安装,但又出现了最初的报错提示。可能我的配置存在错误?

You're probably encountering this problem because @sipie800 already pulled an older PR (last week #51 ).

So ... Try updating ComfyUI-PuLID-Flux-Enhanced and then modifying that file manually, following the changes made by @broken-rotor here:

https://github.com/sipie800/ComfyUI-PuLID-Flux-Enhanced/pull/41/files#diff-b6d1f4c2ebbf2cb04e44181273c926373971831a376d7f36e83b0d9b24779ea7

For reference (ONLY!), I have also attached my file, with which ComfyUI-PuLID-Flux-Enhanced works (on Win10/RTX4090).
pulidflux.py.ady.txt

I hope this information helps you.

@sipie800 sipie800 merged commit 04e1b52 into sipie800:main Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet