easy_ViTPose icon indicating copy to clipboard operation
easy_ViTPose copied to clipboard

Unable to use model_split

Open ani-bg opened this issue 6 months ago • 1 comments

I downloaded the vitpose-huge ckpt form here and tried using

python model_split.py --source models/vitpose-h.pth --prefix coco --target models/vit_train 

However I got this error

File "/home/easy_ViTPose/model_split.py", line 56, in main value = torch.cat([value, experts[key.replace('fc2.', f'experts.{target_expert}.')]], dim=0) ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'backbone.blocks.0.mlp.experts.0.weight'

is model_split implemented correctly? Can I use the script in the original repo and still use this code to train my model?

ani-bg avatar Aug 06 '25 03:08 ani-bg

Hello! Sorry for this late reply, I'm on vacation...

Check the discussion on https://github.com/JunkyByte/easy_ViTPose/issues/8#issuecomment-1671773308 You have to use vitpose+ ckpts, model split should work correctly.

After you get the ckpt you should be able to train with this code as well. I can take a look in a couple weeks:)

JunkyByte avatar Aug 14 '25 07:08 JunkyByte