Skip to content

Commit

Permalink
tts/layers/xtts/stream_generator.py: remove duplicate import + code
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Oct 30, 2023
1 parent 7012aef commit b2b9d4a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 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,9 @@ 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 b2b9d4a

Please sign in to comment.