Skip to content

sondn/stable-diffusion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I. Install environment

1. Ubuntu >= 20.04

2. Install nvidia driver

https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#install-script

3. Install docker

Add Docker's official GPG key:

sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc

Add the repository to Apt sources:

echo
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update

Install docker

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

II. Deploy

1. FaceSwap

docker compose up -d

2. StableDiffusion

  • Download all required model/files (one time)

docker compose --profile download up --build

  • Deploy service

docker compose --profile auto up --scale auto_real=1 --scale auto_anime=1 -d

3. app

  • Deploy service

docker compose up -d

Go to swagger url with /docs

  • Environment parameters

    SD_MODEL_HOSTS: addRCSMRealistic_v30.safetensors,127.0.0.1,7862|helloflatcolorful2d_v21pvae.safetensors,127.0.0.1,7863 #multi model with format: modelName,host,port |

    FACESWAP_HOST: http://127.0.0.1:8000

    PORT: 8080 #8080

    MONGO_URI: mongodb://127.0.0.1:27017/dbname #mongodb://dbhost:27017/dbname

    BUCKET_NAME: ''

    AWS_ACCESS_KEY: ''

    AWS_SECRET_KEY: ''

    AWS_REGION: 'ap-southeast-1'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors