Skip to content

Commit

Permalink
immediate print status
Browse files Browse the repository at this point in the history
  • Loading branch information
gorkemgoknar committed Oct 30, 2023
1 parent b6b1bdb commit 3b09ead
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@
device = torch.device("cuda")

model_name = "tts_models/multilingual/multi-dataset/xtts_v1.1"
print("Downloading XTTS Model:",model_name)
print("Downloading XTTS Model:",model_name,flush=True)
ModelManager().download_model(model_name)
model_path = os.path.join(get_user_data_dir("tts"), model_name.replace("/", "--"))
print("XTTS Model downloaded")
print("XTTS Model downloaded",flush=True)

print("Loading XTTS")
print("Loading XTTS",flush=True)
config = XttsConfig()
config.load_json(os.path.join(model_path, "config.json"))
model = Xtts.init_from_config(config)
model.load_checkpoint(config, checkpoint_dir=model_path, eval=True, use_deepspeed=True)
model.to(device)
print("XTTS Loaded.")
print("XTTS Loaded.",flush=True)

print("Running XTTS Server ...",flush=True)

##### Run fastapi #####
app = FastAPI(
Expand Down

0 comments on commit 3b09ead

Please sign in to comment.