2noise / ChatTTS

A generative speech model for daily dialogue.
https://2noise.com
Other
26.77k stars 2.91k forks source link

KeyError: 'sha256_asset_Decoder_pt' #439

Closed Westbrook077 closed 1 week ago

Westbrook077 commented 1 week ago

When I start to load hf models,I met this problem.

Code: chat = ChatTTS.Chat() chat.load(compile=False)

Error:

KeyError Traceback (most recent call last) Cell In[3], line 2 1 chat = ChatTTS.Chat() ----> 2 chat.load(compile=False)

File ~/autodl-tmp/projects/ChatTTS/ChatTTS/core.py:101, in Chat.load(self, source, force_redownload, compile, custom_path, device, coef) 92 def load( 93 self, 94 source: Literal['huggingface', 'local', 'custom']='local', (...) 99 coef: Optional[torch.Tensor] = None, 100 ) -> bool: --> 101 download_path = self.download_models(source, force_redownload, custom_path) 102 if download_path is None: 103 return False

File ~/autodl-tmp/projects/ChatTTS/ChatTTS/core.py:63, in Chat.download_models(self, source, force_redownload, custom_path) 61 if source == 'local': 62 download_path = os.getcwd() ---> 63 if not check_all_assets(update=True) or force_redownload: 64 with tempfile.TemporaryDirectory() as tmp: 65 download_all_assets(tmpdir=tmp)

File ~/autodl-tmp/projects/ChatTTS/ChatTTS/utils/dl.py:60, in check_allassets(update) 57 for model in names: 58 menv = model.replace(".", "") 59 if not check_model( ---> 60 current_dir, model, os.environ[f"sha256asset{menv}"], update 61 ): 62 return False 64 logger.get_logger().info("checking configs...")

File ~/autodl-tmp/softwares/miniconda3/envs/chattts/lib/python3.11/os.py:679, in _Environ.getitem(self, key) 676 value = self._data[self.encodekey(key)] 677 except KeyError: 678 # raise KeyError with the original key value --> 679 raise KeyError(key) from None 680 return self.decodevalue(value)

KeyError: 'sha256_asset_Decoder_pt'

fumiama commented 1 week ago

Duplicate to #438. You can check solution there.