Skip to content

Commit

Permalink
xtts/stream_generator: remove duplicate import + code
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Nov 8, 2023
1 parent 5e8dc8a commit 64bb609
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TTS/tts/layers/xtts/stream_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,10 +885,10 @@ def init_stream_support():


if __name__ == "__main__":
from transformers import AutoModelForCausalLM, AutoTokenizer, PreTrainedModel
from transformers import AutoModelForCausalLM, AutoTokenizer

init_stream_support()

PreTrainedModel.generate = NewGenerationMixin.generate
PreTrainedModel.sample_stream = NewGenerationMixin.sample_stream
model = AutoModelForCausalLM.from_pretrained("bigscience/bloom-560m", torch_dtype=torch.float16)

tokenizer = AutoTokenizer.from_pretrained("bigscience/bloom-560m")
Expand Down

0 comments on commit 64bb609

Please sign in to comment.