mirror of
https://github.com/jasonppy/VoiceCraft.git
synced 2025-06-05 21:49:11 +02:00
Merge branch 'fix/downloadingmodepath'
This commit is contained in:
@@ -99,7 +99,7 @@ def load_models(whisper_backend_name, whisper_model_name, alignment_model_name,
|
|||||||
|
|
||||||
encodec_fn = f"{MODELS_PATH}/encodec_4cb2048_giga.th"
|
encodec_fn = f"{MODELS_PATH}/encodec_4cb2048_giga.th"
|
||||||
if not os.path.exists(encodec_fn):
|
if not os.path.exists(encodec_fn):
|
||||||
os.system(f"wget https://huggingface.co/pyp1/VoiceCraft/resolve/main/encodec_4cb2048_giga.th")
|
os.system(f"wget https://huggingface.co/pyp1/VoiceCraft/resolve/main/encodec_4cb2048_giga.th -O " + encodec_fn)
|
||||||
|
|
||||||
voicecraft_model = {
|
voicecraft_model = {
|
||||||
"config": config,
|
"config": config,
|
||||||
@@ -602,6 +602,7 @@ if __name__ == "__main__":
|
|||||||
parser.add_argument("--models-path", default="./pretrained_models", help="Path to voicecraft models directory")
|
parser.add_argument("--models-path", default="./pretrained_models", help="Path to voicecraft models directory")
|
||||||
parser.add_argument("--port", default=7860, type=int, help="App port")
|
parser.add_argument("--port", default=7860, type=int, help="App port")
|
||||||
parser.add_argument("--share", action="store_true", help="Launch with public url")
|
parser.add_argument("--share", action="store_true", help="Launch with public url")
|
||||||
|
parser.add_argument("--server_name", default="127.0.0.1", type=str, help="Server name for launching the app. 127.0.0.1 for localhost; 0.0.0.0 to allow access from other machines in the local network. Might also give access to external users depends on the firewall settings.")
|
||||||
|
|
||||||
os.environ["USER"] = os.getenv("USER", "user")
|
os.environ["USER"] = os.getenv("USER", "user")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
@@ -610,4 +611,4 @@ if __name__ == "__main__":
|
|||||||
MODELS_PATH = args.models_path
|
MODELS_PATH = args.models_path
|
||||||
|
|
||||||
app = get_app()
|
app = get_app()
|
||||||
app.queue().launch(share=args.share, server_port=args.port)
|
app.queue().launch(share=args.share, server_name=args.server_name, server_port=args.port)
|
||||||
|
Reference in New Issue
Block a user