ComfyUI_ExtraModels icon indicating copy to clipboard operation
ComfyUI_ExtraModels copied to clipboard

[Bug]Found at least two devices, cuda:0 and cpu!

Open yeungmozhu opened this issue 1 year ago • 8 comments

yeungmozhu avatar Jun 15 '24 11:06 yeungmozhu

Selecting cpu in T5 loader node and getting this error when running to ksample node. Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

yeungmozhu avatar Jun 15 '24 11:06 yeungmozhu

having the exact problem when trying your implementation of hunyuan dit

ReyJ94 avatar Jun 16 '24 08:06 ReyJ94

File "D:\ComfyUI_2\custom_nodes\ComfyUI_ExtraModels\HunYuanDiT\models\poolers.py", line 19, in forward x = x + self.positional_embedding[:, None, :].to(x.dtype) # (L+1)NC ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! 看到几乎相同的问题曾经提出并已被关闭,我重启comfyui并没有解决。

lger4567 avatar Jun 16 '24 13:06 lger4567

Update and try again? I suspect it will still fail on low vram machines but maybe it'll work.

city96 avatar Jun 16 '24 15:06 city96

昨天刚刚更新了本体和插件,看到别人8G显存可以跑呀。内存也足够大,不知是不是本体更新导致的,还是什么原因,感谢您的回复,希望有时间时看一下,非常感谢。

lger4567 avatar Jun 16 '24 15:06 lger4567

昨天

I've pushed changes ~30 minutes ago ( https://github.com/city96/ComfyUI_ExtraModels/commit/5101719ca859a2d75f5e830230011668213b559d ) that might fix the issue, so please update again. If you see loading in lowvram mode in the console then it will still error due to not having enough VRAM and not being able to partially offload the model.

city96 avatar Jun 16 '24 15:06 city96

city96,非常感谢这么快地回复,明天我再试一下,晚安。

lger4567 avatar Jun 16 '24 16:06 lger4567

更新后可以跑通了,很流畅。非常棒,再次感谢。

lger4567 avatar Jun 17 '24 02:06 lger4567