entrpn / serving-diffusion-ui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serving Diffusion UI

Serving Diffusion UI

Setup

Note I added an auth layer, which you can change or remove. It is located at the end of the file webui_playground.py, in demo.launch() method.

  1. Build the image

    docker build . --build-arg port=80 --build-arg aip_endpoint_name=projects/{project_id}/locations/us-central1/endpoints/{endpoint_id} -t gcr.io/jfacevedo-demos/serving-diffusion-ui:latest
  2. Push image to GCR

    docker push gcr.io/{project_id}/serving-diffusion-ui:latest
  3. Deploy image to cloud run.

    gcloud run deploy --port 80 --region us-central1 serving-diffusion-ui --image gcr.io/{project_id}/serving-diffusion-ui:latest --timeout 3600 ----no-cpu-throttling --cpu=8 --memory 8Gi

    When this is deployed, you'll get a URL where you can access the webui. Make the url public by following this link

  4. You might have organizational policies that don't allow public internet to access your instance. If that's the case, add Domain restricted sharing to All. Be aware this can create a security loophole.

About

License:GNU Affero General Public License v3.0


Languages

Language:Python 88.7%Language:JavaScript 8.8%Language:CSS 1.9%Language:Dockerfile 0.6%