ImportError: cannot import name 'Xcodec2Model' from 'transformers'
#1
by
anandaswarup
- opened
When I try to use the code snippet given in the Model Card I am getting the following error:
ImportError: cannot import name 'Xcodec2Model' from 'transformers'
I have installed transformers in my project directory using uv add transformers and the transformers version is 4.57.1
Hi @anandaswarup thanks for your message, this is actually a draft model card as XCodec2 isn't yet merged into Transformers: https://github.com/huggingface/transformers/pull/37868
You can use the model by installing code from the fork
pip install git+https://github.com/Deep-unlearning/transformers.git@add-xcodec2
Ok thanks a lot for your reply. Any timeline on when it will be merged into the main Transformers branch? In the meanwhile, I will use your fork.
Not sure yet, there's some pending additions/reviews that first need to be addressed