Closed hscspring closed 4 days ago
Hey @hscspring, thanks for opening the issue, this is something that needs to be improved but I actually used the same tokenizer but with two different sets of parameters during training: https://github.com/huggingface/parler-tts/blob/10016fb0300c0dc31a0fb70e26f3affee7b62f16/training/run_parler_tts_training.py#L900-L918
So to do batching we should probably load two tokenizers:
tokenizer = AutoTokenizer.from_pretrained("parler-tts/parler_tts_mini_v0.1", padding_side="right",)
prompt_tokenizer = AutoTokenizer.from_pretrained("parler-tts/parler_tts_mini_v0.1", padding_side="left",)
and modify the prompt_input_ids
sentence to:
prompt_input_ids = prompt_tokenizer([prompt1, prompt2], padding=True, truncation=True, return_tensors="pt").input_ids.to(device)
thanks, great work
code as below:
The result seems not stable.