Error: Exception: data did not match any variant of untagged enum ModelWrapper at line 352271 column 3
Thanks for the model, on running this
from outetts.v0_1.interface import InterfaceHF, InterfaceGGUF
# Initialize the interface with the Hugging Face model
interface = InterfaceHF("OuteAI/OuteTTS-0.1-350M")
# Or initialize the interface with a GGUF model
# interface = InterfaceGGUF("path/to/model.gguf")
For GGUF models, you'll need to manually download them and directly point to the GGUF file in the interface, for example: interface = InterfaceGGUF("drive/folder/OuteTTS-0.1-350M-Q8_0.gguf")
Also, make sure to install llama-cpp-python from: https://github.com/abetlen/llama-cpp-python
same,
´´´
/usr/local/lib/python3.10/dist-packages/torch/nn/utils/weight_norm.py:143: FutureWarning: torch.nn.utils.weight_norm
is deprecated in favor of torch.nn.utils.parametrizations.weight_norm
.
WeightNorm.apply(module, name, dim)
making attention of type 'vanilla' with 768 in_channels
/usr/local/lib/python3.10/dist-packages/outetts/v0_1/decoder/pretrained.py:101: FutureWarning: You are using torch.load
with weights_only=False
(the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only
will be flipped to True
. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals
. We recommend you start setting weights_only=True
for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
state_dict_raw = torch.load(model_path, map_location="cpu")['state_dict']
Exception Traceback (most recent call last)
in <cell line: 4>()
2
3 # Initialize the interface with the Hugging Face model
----> 4 interface = InterfaceHF("OuteAI/OuteTTS-0.1-350M") # https://huggingface.co/OuteAI/OuteTTS-0.1-350M
5
6 # Or initialize the interface with a GGUF model
5 frames
/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_fast.py in init(self, *args, **kwargs)
113 elif fast_tokenizer_file is not None and not from_slow:
114 # We have a serialization from tokenizers which let us directly build the backend
--> 115 fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
116 elif slow_tokenizer is not None:
117 # We need to convert a slow tokenizer to build the backend
Exception: data did not match any variant of untagged enum ModelWrapper at line 352271 column 3
´´´
https://colab.research.google.com/drive/1mYZZYKQmopg7XOTUtWFa5ctMgEsOu4OZ#scrollTo=MrXoENyr3u8
Is this issue resolved? Is there any way to pass this error?
@mzeid
@NickyNicky
@Sk2613
The problem is due to Colab using an older version of the transformers
library, which doesn’t recognize our new BPE tokenizer. To resolve it, please update to the latest version by running:
pip install transformers --upgrade
Additionally, I’ll specify the required version in the requirements.txt
file in the GitHub repository soon.
Thank you for the solution!