Skip to content

Commit

Permalink
Merge pull request #24 from GooeyAI/seamless_v2
Browse files Browse the repository at this point in the history
Upgrade SeamlessM4T to v2 and add text2speech + translation support
  • Loading branch information
devxpy authored Aug 12, 2024
2 parents beaaafd + db6a4f4 commit 68dbd5c
Show file tree
Hide file tree
Showing 12 changed files with 147 additions and 496 deletions.
14 changes: 9 additions & 5 deletions celeryconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import typing

from celery import Celery
from celery.exceptions import WorkerShutdown
from celery.signals import worker_init
from kombu import Queue

Expand Down Expand Up @@ -34,12 +35,15 @@ def setup_queues(
queue_prefix: str = os.environ.get("QUEUE_PREFIX", "gooey-gpu"),
):
def init(**kwargs):
for model_id in model_ids:
try:
model_id = None
try:
for model_id in model_ids:
load_fn(model_id)
except Exception as e:
traceback.print_exc()
raise
except:
# for some reason, celery seems to swallow exceptions in init
print(f"Error loading {model_id}:")
traceback.print_exc()
raise WorkerShutdown()

init_fns.append(init)

Expand Down
8 changes: 4 additions & 4 deletions chart/model-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,16 @@ deployments:
bark
- name: "common-seamless"
image: *commonImg
image: "crgooeyprodwestus1.azurecr.io/gooey-gpu-common:6"
limits:
memory: "20Gi"
gpu: "10Gi"
memory: "28Gi" # (220 / 80) * 10
cpu: "1"
env:
IMPORTS: |-
common.seamless_asr
SEAMLESS_MODEL_IDS: |-
facebook/hf-seamless-m4t-large
facebook/hf-seamless-m4t-medium
facebook/seamless-m4t-v2-large
- name: "common-diffusion-instruct-pix2pix"
image: *commonImg
Expand Down
4 changes: 4 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ spec:
value: "{{ $value }}"
{{- end }}
{{- end }}
{{- range $name, $value := .limits }}
- name: "RESOURCE_LIMITS_{{ $name | upper }}"
value: "{{ $value }}"
{{- end }}
livenessProbe:
exec:
command: [ "bash", "-c", "celery inspect ping -d celery@$HOSTNAME" ]
Expand Down
2 changes: 1 addition & 1 deletion common/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nvidia/cuda:12.2.0-devel-ubuntu20.04
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04

ARG DEBIAN_FRONTEND=noninteractive

Expand Down
137 changes: 0 additions & 137 deletions common/deepfloyd.py

This file was deleted.

Loading

0 comments on commit 68dbd5c

Please sign in to comment.