sonalkum commited on
Commit
5450f67
·
1 Parent(s): d510743
stable/stable_audio_tools/models/conditioners.py CHANGED
@@ -5,7 +5,7 @@ import logging, warnings
5
  import string
6
  import typing as tp
7
  import gc
8
-
9
  from .adp import NumberEmbedder
10
  from ..inference.utils import set_audio_channels
11
  from .factory import create_pretransform_from_config
@@ -283,6 +283,8 @@ class T5Conditioner(Conditioner):
283
  # self.tokenizer = T5Tokenizer.from_pretrained(t5_model_name, model_max_length = max_length)
284
  # model = T5EncoderModel.from_pretrained(t5_model_name, max_length=max_length).train(enable_grad).requires_grad_(enable_grad)
285
  self.tokenizer = AutoTokenizer.from_pretrained(t5_model_name)
 
 
286
  ckpt = torch.load('../try_t5.pt')
287
  model = T5EncoderModel.from_pretrained(t5_model_name).train(enable_grad).requires_grad_(enable_grad).to(torch.float16)
288
  model.load_state_dict(ckpt,strict=True)
 
5
  import string
6
  import typing as tp
7
  import gc
8
+ import os
9
  from .adp import NumberEmbedder
10
  from ..inference.utils import set_audio_channels
11
  from .factory import create_pretransform_from_config
 
283
  # self.tokenizer = T5Tokenizer.from_pretrained(t5_model_name, model_max_length = max_length)
284
  # model = T5EncoderModel.from_pretrained(t5_model_name, max_length=max_length).train(enable_grad).requires_grad_(enable_grad)
285
  self.tokenizer = AutoTokenizer.from_pretrained(t5_model_name)
286
+ cwd = os.getcwd()
287
+ print("==========", cwd)
288
  ckpt = torch.load('../try_t5.pt')
289
  model = T5EncoderModel.from_pretrained(t5_model_name).train(enable_grad).requires_grad_(enable_grad).to(torch.float16)
290
  model.load_state_dict(ckpt,strict=True)