You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Indeed, a "custom model dir" feature is necessary and worth developing.
Regarding the "custom model dir" functionality, I'd like to add some context about the current code logic:
Currently, almost all environment variables correspond one-to-one with runtime parameters (argv). The specific implementation and logic can be found in modules/utils/env.py.
The implementation of runtime parameters is split into setup_xx and process_xx. This separation facilitates different levels of execution scripts. For example, uvicorn parameters won't be parsed in the webui.
After parsing, both environment variables and runtime parameters are mounted to config.runtime_env_vars[key] (This might be a bit confusing as the runtime_env_vars object doesn't have any typed attributes).
In short, this feature shouldn't be too difficult to implement. Feel free to ask if you have any questions.
Regarding the SenseVoice model adaptation, I suggest opening a new issue to track and discuss it, as it might not be straightforward. For ASR models, we currently support the Whisper model, but we may not have considered issues like multiple models, model switching, or API parameters. Therefore, there might be matters unrelated to SenseVoice that need to be considered alongside it.
确认清单
功能描述
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
we can define environment variables in
.env.global
just like.env.api
or.env.webui
The text was updated successfully, but these errors were encountered: