where is the preprocessor_config.json for this model?
#1
by
adityaedy01
- opened
I need preprocessor_config.json to fine tune this model, where can i find that?
Hey
@adityaedy01
- this is a text-to-speech model. Therefore, it uses a tokenizer to pre-process the text inputs to token ids. It doesn't need a preprocessor_config.json
, which is only used to define speech feature extractors (speech -> input features). That means in practice, you can use the tokenizer directly to as follows, without a need for a feature extractor:
from transformers import VitsModel, AutoTokenizer
import torch
model = VitsModel.from_pretrained("facebook/mms-tts-som")
tokenizer = AutoTokenizer.from_pretrained("facebook/mms-tts-som")
text = "some example text in the Somali language"
# pre-processing of input text to token ids
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
output = model(**inputs).waveform