mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-21 23:57:58 +01:00
Ability to run the Coqui TTS extension on the CPU (#5365)
This commit is contained in:
parent
828be63f2c
commit
69622930c7
@ -3,6 +3,7 @@ import json
|
||||
import os
|
||||
import random
|
||||
import time
|
||||
import torch
|
||||
from pathlib import Path
|
||||
|
||||
import gradio as gr
|
||||
@ -23,7 +24,7 @@ params = {
|
||||
"voice": "female_01.wav",
|
||||
"language": "English",
|
||||
"model_name": "tts_models/multilingual/multi-dataset/xtts_v2",
|
||||
"device": "cuda"
|
||||
"device": "cuda" if torch.cuda.is_available() else "cpu"
|
||||
}
|
||||
|
||||
this_dir = str(Path(__file__).parent.resolve())
|
||||
|
Loading…
Reference in New Issue
Block a user