How to run a Stable Diffusion server on Google Cloud Platform (GCP)

Click for: original source

Open-sourced alternative to OpenAI’s gated DALLĀ·E 2 with comparable quality, Stable Diffusion offers something to everyone: end-users can generate images virtually for free, developers can embed the model into their service, ML engineers can investigate and modify the code, and researchers have full leeway to push the state of the art even further. By Iulia Turc.

This article includes all the painful little details author had to figure out, hoping that it saves you time. Here are the high-level steps (we will dive deeper into each one of them below):

  • Make sure you have enough GPU quota
  • Create a virtual machine with a GPU attached
  • Download Stable Diffusion and test inference
  • Bundle Stable Diffusion into a Flask app
  • Deploy and make your webserver publicly accessible

Since GPUs are still not cheap, Google is running a tight ship when it comes to its GPU fleet, provisioning its limited supply to those who need it the most, and those who are willing to pay. By default, free trial accounts do not have GPU quota. Good read!

[Read More]

Tags gcp devops data-science open-source google