|
67 | 67 | "LoadSpeechModel = False #@param {type:\"boolean\"}\n", |
68 | 68 | "SpeechModel = \"https://huggingface.co/koboldcpp/whisper/resolve/main/whisper-base.en-q5_1.bin\" #@param [\"https://huggingface.co/koboldcpp/whisper/resolve/main/whisper-base.en-q5_1.bin\"]{allow-input: true}\n", |
69 | 69 | "WCommand = \"\"\n", |
| 70 | + "#@markdown <hr>\n", |
| 71 | + "LoadTTSModel = False #@param {type:\"boolean\"}\n", |
| 72 | + "TTSModel = \"https://huggingface.co/koboldcpp/tts/resolve/main/OuteTTS-0.2-500M-Q4_0.gguf\" #@param [\"https://huggingface.co/koboldcpp/tts/resolve/main/OuteTTS-0.2-500M-Q4_0.gguf\"]{allow-input: true}\n", |
| 73 | + "WavTokModel = \"https://huggingface.co/koboldcpp/tts/resolve/main/WavTokenizer-Large-75-Q4_0.gguf\" #@param [\"https://huggingface.co/koboldcpp/tts/resolve/main/WavTokenizer-Large-75-Q4_0.gguf\"]{allow-input: true}\n", |
| 74 | + "TTSCommand = \"\"\n", |
70 | 75 | "\n", |
71 | 76 | "import os\n", |
72 | 77 | "if not os.path.isfile(\"/opt/bin/nvidia-smi\"):\n", |
|
85 | 90 | " WCommand = \"--whispermodel wmodel.bin\"\n", |
86 | 91 | "else:\n", |
87 | 92 | " WCommand = \"\"\n", |
| 93 | + "if TTSModel and WavTokModel and LoadTTSModel:\n", |
| 94 | + " TTSCommand = \"--ttsmodel ttsmodel.bin --ttswavtokenizer ttswavtok.bin --ttsgpu\"\n", |
| 95 | + "else:\n", |
| 96 | + " TTSCommand = \"\"\n", |
88 | 97 | "if FlashAttention:\n", |
89 | 98 | " FACommand = \"--flashattention\"\n", |
90 | 99 | "else:\n", |
|
110 | 119 | " !aria2c -x 10 -o imodel.gguf --summary-interval=5 --download-result=default --allow-overwrite=true --file-allocation=none $ImgModel\n", |
111 | 120 | "if WCommand:\n", |
112 | 121 | " !aria2c -x 10 -o wmodel.bin --summary-interval=5 --download-result=default --allow-overwrite=true --file-allocation=none $SpeechModel\n", |
113 | | - "!./koboldcpp_linux model.gguf --usecublas 0 mmq --multiuser --gpulayers $Layers --contextsize $ContextSize --websearch --quiet --remotetunnel $FACommand $MPCommand $VCommand $SCommand $WCommand\n" |
| 122 | + "if TTSCommand:\n", |
| 123 | + " !aria2c -x 10 -o ttsmodel.bin --summary-interval=5 --download-result=default --allow-overwrite=true --file-allocation=none $TTSModel\n", |
| 124 | + " !aria2c -x 10 -o ttswavtok.bin --summary-interval=5 --download-result=default --allow-overwrite=true --file-allocation=none $WavTokModel\n", |
| 125 | + "!./koboldcpp_linux model.gguf --usecublas 0 mmq --multiuser --gpulayers $Layers --contextsize $ContextSize --websearch --quiet --remotetunnel $FACommand $MPCommand $VCommand $SCommand $WCommand $TTSCommand\n" |
114 | 126 | ] |
115 | 127 | } |
116 | 128 | ], |
|
0 commit comments