ChatTTS-Forge
ChatTTS-Forge copied to clipboard
[Feature] Support customized models path
确认清单
功能描述
I used common models for different projects, but I don't want to copy these models to each projects cuz some model weight files consume large disk space. We can config model path in environments.
可能的解决方案
When we load model from path, we can firstly read from relative environment variables, if not found, we use default ./models/
path.
For ChatTTS example in modules/core/models/zoo/ChatTTS.py
# before in line 32
custom_path="./models/ChatTTS",
# after
custom_path=os.getenv("CHATTTS_MODEL_PATH", "./models/ChatTTS"),
we can define environment variables in .env.global
just like .env.api
or .env.webui