Add initial support for pickletensor models to F5-TTS
* Tested with @RASPAUDIO french model available here : https://huggingface.co/RASPIAUDIO/F5-French-MixedSpeakers-reduced
This commit is contained in:
1 parent
5ce8a6681e
commit
e72a7bf5c9
1 file changed
+13
@@ -400,9 +400,16 @@ class tts_class:
|
||||
if model_dir.is_dir():
|
||||
# First try to find model_*.safetensors files
|
||||
model_files = list(model_dir.glob("model_*.safetensors"))
|
||||
if not model_files:
|
||||
# Try finding the pt model file as fallback
|
||||
# If no model_*.safetensors found, try finding a .pt model file
|
||||
model_files = list(model_dir.glob("model_*.pt"))
|
||||
if not model_files:
|
||||
# If no model_*.safetensors found, try any .safetensors file
|
||||
model_files = list(model_dir.glob("*.safetensors"))
|
||||
if not model_files:
|
||||
# If no model_*.safetensors found, try any .pt file
|
||||
model_files = list(model_dir.glob("*.pt"))
|
||||
|
||||
vocab_file = model_dir / "vocab.txt"
|
||||
vocos_dir = model_dir / "vocos"
|
||||
@@ -508,9 +515,15 @@ class tts_class:
|
||||
|
||||
# Dynamically find the safetensors model file
|
||||
model_files = list(model_dir.glob("model_*.safetensors"))
|
||||
if not model_files:
|
||||
# Try finding the pt model file as fallback
|
||||
model_files = list(model_dir.glob("model_*.pt"))
|
||||
if not model_files:
|
||||
# Try finding any safetensors file as fallback
|
||||
model_files = list(model_dir.glob("*.safetensors"))
|
||||
if not model_files:
|
||||
# Try finding any pt file as fallback
|
||||
model_files = list(model_dir.glob("*.pt"))
|
||||
|
||||
if not model_files:
|
||||
print(f"[{self.branding}ENG] \033[91mError\033[0m: No model's safetensors file was found in the F5-TTS models directory.")
|
||||
|
||||
Reference in new issue
Block a user