Skip to content

Commit

Permalink
fix: change to auto tokenizer
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioschneider committed Oct 13, 2022
1 parent 38fddaf commit d3f27f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions audio_diffusion_pytorch/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,9 +1136,9 @@ def forward( # type: ignore
class T5Embedder(nn.Module):
def __init__(self, model: str = "t5-base", max_length: int = 64):
super().__init__()
from transformers import T5EncoderModel, T5Tokenizer
from transformers import AutoTokenizer, T5EncoderModel

self.tokenizer = T5Tokenizer.from_pretrained(model)
self.tokenizer = AutoTokenizer.from_pretrained(model)
self.transformer = T5EncoderModel.from_pretrained(model)
self.max_length = max_length

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name="audio-diffusion-pytorch",
packages=find_packages(exclude=[]),
version="0.0.62",
version="0.0.63",
license="MIT",
description="Audio Diffusion - PyTorch",
long_description_content_type="text/markdown",
Expand Down

0 comments on commit d3f27f8

Please sign in to comment.