ComfyUI-CogVideoXWrapper icon indicating copy to clipboard operation
ComfyUI-CogVideoXWrapper copied to clipboard

How to fix "too many indices for tensor of dimension 4"?

Open BoosterCore opened this issue 1 year ago • 11 comments

I tried cogvideox_I2V_example_01.json, and the image is 720X480, but...

CogVideoImageEncode Node got this error :"too many indices for tensor of dimension 4"

Screenshot 2024-10-25 101500

BoosterCore avatar Oct 25 '24 02:10 BoosterCore

Finally, turn off "enable_tiling" in CogVideo ImageEncode node solved my problem.

BoosterCore avatar Oct 25 '24 07:10 BoosterCore

I have the same error, unchecking enable_tiling didn't help :/

Mikerhinos avatar Oct 25 '24 08:10 Mikerhinos

This is possibly because of the fix for the tiled_encode for diffusers 0.31.0, maybe it broke it for the old ones, works for me on the latest version of the nodes and diffusers though.

kijai avatar Oct 25 '24 08:10 kijai

I activated the tiled decoding and it worked (I also changed other settings so it may be another one, anyway now it's working for me too).

Mikerhinos avatar Oct 25 '24 09:10 Mikerhinos

Still not working for me after disabling tiling, any other ideas??

yovsac avatar Oct 25 '24 14:10 yovsac

Still not working for me after disabling tiling, any other ideas??

With the nodes and diffusers both at latest version?

kijai avatar Oct 25 '24 14:10 kijai

The custom nodes and comfy are the latest. How do I check the diffusers?

yovsac avatar Oct 25 '24 14:10 yovsac

The custom nodes and comfy are the latest. How do I check the diffusers?

Depends on how your comfy is setup, you'd do pip show diffusers:

For portable: image

And to update:

python_embeded\python.exe -m pip install -U diffusers

Anyway I updated the nodes now with possible backwards compatibility version, so that might work for you as well.

kijai avatar Oct 25 '24 18:10 kijai

Thank you it seems to work now, probably due to your latest update. 👍👍

yovsac avatar Oct 26 '24 15:10 yovsac

Also had the issue but fixed now!

p80ric avatar Oct 27 '24 19:10 p80ric

The custom nodes and comfy are the latest. How do I check the diffusers?

Depends on how your comfy is setup, you'd do pip show diffusers:

For portable: image

And to update:

python_embeded\python.exe -m pip install -U diffusers

Anyway I updated the nodes now with possible backwards compatibility version, so that might work for you as well.

It turns out I have diffusers 0.30.0

When I try to update it with the command you gave me, I get a window saying " This app cant run on your pc" to find a version for your PC, check the software publisher. Is it a problem with Python? or something else?

yovsac avatar Oct 28 '24 08:10 yovsac