Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade SeamlessM4T to v2 and add text2speech + translation support #24

Merged
merged 8 commits into from
Aug 12, 2024
Merged
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
Loading