Spaces:
Sleeping
Sleeping
File size: 1,238 Bytes
74272e7 cab1c25 74272e7 cab1c25 a3901af cab1c25 74272e7 cab1c25 a3901af 74272e7 cab1c25 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
import argparse
import subprocess
def main():
# 设置命令行参数解析器
parser = argparse.ArgumentParser(description="启动 WebUI")
parser.add_argument(
"--llama-checkpoint-path",
type=str,
default="checkpoints/fish-speech-1.4-sft-yth-lora",
help="Llama 检查点路径",
)
parser.add_argument(
"--decoder-checkpoint-path",
type=str,
default="checkpoints/fish-speech-1.4/firefly-gan-vq-fsq-8x1024-21hz-generator.pth",
help="解码器检查点路径",
)
parser.add_argument(
"--decoder-config-name",
type=str,
default="firefly_gan_vq",
help="解码器配置名称",
)
parser.add_argument(
"--device",
type=str,
default="cpu",
help="设备类型",
)
# 解析命令行参数
args = parser.parse_args()
# 启动 WebUI
subprocess.run([
"python",
"tools/webui.py",
"--llama-checkpoint-path", args.llama_checkpoint_path,
"--decoder-checkpoint-path", args.decoder_checkpoint_path,
"--decoder-config-name", args.decoder_config_name,
"--device", args.device,
])
if __name__ == "__main__":
main()
|