Skip to content

Commit

Permalink
Merge branch 'seamless_v2' of https://github.com/GooeyAI/gooey-gpu in…
Browse files Browse the repository at this point in the history
…to seamless_v2
  • Loading branch information
SanderGi committed Jun 10, 2024
2 parents 32964e5 + 063a875 commit b62238b
Show file tree
Hide file tree
Showing 9 changed files with 491 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "retro/Wav2Lip"]
path = retro/Wav2Lip
url = https://github.com/Rudrabha/Wav2Lip.git
[submodule "retro/SadTalker"]
path = retro/SadTalker
url = https://github.com/OpenTalker/SadTalker
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ gooey-gpu also provides a small python helper library to make it easy to write c
7. Run the development script
```bash
./scripts/run-dev.sh common my_model
./scripts/run-dev.sh common common.my_model
```
8. Test the model by sending a request to the celery worker.
Expand Down Expand Up @@ -202,7 +202,11 @@ gooey-gpu also provides a small python helper library to make it easy to write c
docker tag gooey-gpu-common <registry>/<image>:<tag>
docker push <registry>/<image>:<tag>
```
You might need to login to your container registry before pushing the image. Eg for azure:
```bash
az acr login --name <registry>
```
11. Update the `model-values.yaml` file with the new image (or create a new file)
- Under `rabbitmqAutoscaling`, add the new env var name
```yaml
Expand Down
12 changes: 12 additions & 0 deletions chart/model-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ rabbitmqAutoscaling:
- BARK_MODEL_IDS
- SEAMLESS_MODEL_IDS
- MMS_MODEL_IDS
- SADTALKER_MODEL_IDS
defaultQueueLength: "3"

commonImg: &commonImg "us-docker.pkg.dev/dara-c1b52/cloudbuild/gooey-gpu/common@sha256:43ce3db1869b8eb151989270a7dfe4f9a68ee887fa5d86ca0d238e185b4e96c1"
Expand Down Expand Up @@ -293,6 +294,17 @@ deployments:
thenlper/gte-large
thenlper/gte-base
- name: "retro-sadtalker"
image: "crgooeyprodwestus1.azurecr.io/gooey-gpu-retro:2"
limits:
memory: "22Gi"
cpu: "2"
env:
IMPORTS: |-
retro.sadtalker
SADTALKER_MODEL_IDS: |-
SadTalker_V0.0.2_512.safetensors
- name: "retro-wav2lip-gan"
image: *retroImg
minReplicaCount: 3
Expand Down
5 changes: 5 additions & 0 deletions gooey_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,10 @@ def upload_audio_from_bytes(audio: bytes, url: str):
r.raise_for_status()


def upload_video_from_bytes(video, url: str):
r = requests.put(url, headers={"Content-Type": "video/mp4"}, data=video)
r.raise_for_status()


# Add some missing mimetypes
mimetypes.add_type("audio/wav", ".wav")
4 changes: 3 additions & 1 deletion retro/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

COPY retro/*.txt .
RUN pip install --no-cache-dir cython \
RUN pip install --no-cache-dir -U cython wheel setuptools pip \
&& pip install --no-cache-dir -r requirements1.txt \
&& pip install --no-cache-dir -r requirements2.txt \
&& pip install --no-cache-dir git+https://github.com/elliottzheng/batch-face.git@master

RUN pip install --no-cache-dir safetensors~=0.4.3 facexlib~=0.3.0 yacs~=0.1.8 gfpgan~=1.3.8 imageio==2.19.3 imageio-ffmpeg==0.4.7

# copy sources
COPY . .

Expand Down
1 change: 1 addition & 0 deletions retro/SadTalker
Submodule SadTalker added at cd4c04
Loading

0 comments on commit b62238b

Please sign in to comment.