kijai / ComfyUI-Florence2

Inference Microsoft Florence2 VLM
MIT License
773 stars 53 forks source link

Error: Tensor Size Mismatch in Florence2Run on Mac M2 #64

Open vglushkov opened 3 months ago

vglushkov commented 3 months ago

When setting num_beams to 1, the node runs fine. With any other setting it returns the error.

The expanded size of the tensor (1025) must match the existing size (14) at non-singleton dimension 8. Target sizes: [1025]. Tensor sizes: [14]

Florence2Run_error
21Machines commented 2 months ago

I can't get it to run at all, Mac Studio 96GB 38-core GPU. Are you running this command at startup;
[python3.11 main.py --cpu] It's painfully slow but it will work.

vglushkov commented 2 months ago

It works running on CPU, though not really usable on my MacBook Pro M2 16GB 12-core. Have you tried mps with num_beams set to 1?

21Machines commented 2 months ago

Yes, I notice that after I posted my comment. Just about every ComfyUI workflow comes back with an error, "not supported on MPS". Guess I'll need to buy a CUDA machine if I want to explore AI. Shame.