An open API service indexing awesome lists of open source software.

https://github.com/andrewhsugithub/synthhead-fusion


https://github.com/andrewhsugithub/synthhead-fusion

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

# Getting Started

1. git clone

```bash
git clone git@github.com:andrewhsugithub/SynthHead-Fusion.git --recursive
git submodule update --recursive
pnpm i
```

2. copy env files

```bash
cp ./scripts/.env.sh.template ./scripts/.env.sh
cp ./scripts/services/.env.server ./scripts/services/.env.server
```

Enter the env values

3. update user db

```bash
cd packages/user
docker compose up
pnpm user:db
docker compose down
```

4. copy env and paste your pubic key(.pem file) into keys folder for each microservice

- auth service

```bash
cd packages/auth/
cp .env.template .env
```

- bucket service

```bash
cd packages/bucket/
cp .env.template .env
cp .env.server.template .env.server
```

- GPT-Audio

```bash
cd packages/GPT-Audio/
cp .env.template .env
cp .env.server.template .env.server
```

- GPT-SoVITS-Inference

```bash
cd packages/GPT-SoVITS-Inference/
cp .env.server.template .env.server
```

- LivePortrait

```bash
cd packages/LivePortrait/
cp .env.server.template .env.server
```

- MuseTalk

```bash
cd packages/MuseTalk/
cp .env.template .env
cp .env.server.template .env.server
```

- Real3DPortrait

```bash
cd packages/Real3DPortrait/
cp .env.server.template .env.server
```

Enter the env values

5. spin up servers

```bash
docker compose up
pnpm dev:remote
```

> Note: all env values can be found in discord

## Spinning up the servers for each microservice

Run each service in an independent shell.

1. GPT-SoVITS-Inference

```bash
bash ./scripts/services/GPT-SoVITS-Inference.sh
```

Port: 5000

2. GPT-Audio (depends on GPT-SoVITS-Inference)

```bash
bash ./scripts/services/GPT-Audio.sh
```

Port: 7998

3. MuseTalk

```bash
bash ./scripts/services/MuseTalk.sh
```

Port:7999

4. Real3DPortrait

```bash
bash ./scripts/services/Real3DPortrait.sh
```

Port: 8001

5. LivePortrait

```bash
bash ./scripts/services/LivePortrait.sh
```

Port: 8000

6. Bucket

```bash
bash ./scripts/services/bucket.sh
```

Port: 3002

# Adding submodules

> Note: to avoid sync errors I've temporarily put the repos that are not submodules in `.gitignore`, so if you've decided to add your repo to submodules **_remember to remove them from `.gitignore`_**

```bash
cd ml/
git submodule add

git status # (optional): see your repo is untracked or not
git add
git commit -m
git push
```

# Updating repo

```bash
git switch main
git pull
git submodule update --recursive
```

or (WIP: need to wait for all submodules to be added)

```bash
cd ml/scripts/
bash sync_repo.sh
```

# Contributing on same server

To see who's name is it now:

```bash
cd
git config --local --list
```

Remember to change your name when contributing

```bash
cd
git config --local user.email
git config --local user.name
```

example:

```bash
cd LivePortrait/
git config --local user.email andrew1mail@gmail.com
git config --local user.name andrewhsugithub

git config --local user.email h0920185003@gmail.com
git config --local user.name h44343880
```

# How to run each model respectively

Real3DPortrait:

```bash
cd Real3DPortrait/
bash ./start.sh
```

GPT-SoVITS-Inference:

```bash
cd GPT-SoVITS-Inference/
bash ./start.sh
```

LivePortrait:

```bash
cd LivePortrait/
bash ./start.sh
```

GPT-Audio:

```bash
cd GPT-Audio
bash ./start.sh
```

# How to run all

1. add env variables

```bash
cp ./scripts/.env.sh.template ./scripts/.env.sh
```

2.

```bash
bash ./scripts/run_all.sh
```

## TODO

- [ ] add logger, openapi, docs to every service
- [ ] add Read3D-Interface into submodule
- [ ] add videoCutting into submodule
- [ ] turn into web app
- [ ] make realtime
- [ ] use gfpgan to make higher resolution (can this be done in realtime though?)
- [ ] use frame interpolation methods to make video more smooth (for demo purposes, can't do this in realtime)