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 23, 2023
1 parent 77f0655 commit 419dc71
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions TTS/tts/layers/xtts/stream_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,10 +1008,8 @@ def init_stream_support():


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

PreTrainedModel.generate = NewGenerationMixin.generate
PreTrainedModel.sample_stream = NewGenerationMixin.sample_stream
from transformers import AutoModelForCausalLM, AutoTokenizer
init_stream_support()
model = AutoModelForCausalLM.from_pretrained(
"bigscience/bloom-560m", torch_dtype=torch.float16
)
Expand Down

0 comments on commit 419dc71

Please sign in to comment.