Skip to content

Commit

Permalink
add some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gorkemgoknar committed Oct 30, 2023
1 parent a90c1a8 commit 8dfdbd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-push-to-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
file: Dockerfile
push: false
cache-from: type=registry,ref=ghcr.io/coqui-ai/xtts-streaming-server:latest-cache
cache-to: type=registry,ref=ghcr.io/coqui-ai/xtts-streaming-server:latest-cache
tags: coqui-ai/xtts-streaming-server:${{ env.RELEASE_VERSION }}-${{ github.sha }}
#build-args:

Expand Down
4 changes: 4 additions & 0 deletions server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@
device = torch.device("cuda")

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

print("Loading XTTS")
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.")

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

0 comments on commit 8dfdbd6

Please sign in to comment.