
Stable Diffusion is a deep learning model that can generate detailed images based on input text descriptions. It can also be used to enhance an existing image or generate a new one based on another, guided by a text description prompt. This guide explains how to create a Stable Diffusion web UI on a Vultr Cloud GPU running on Ubuntu 22.04 using this Stable Diffusion web UI repository on GitHub.
This guide creates a web UI for Stable Diffusion, but does not provide any protection from unwanted users or attacks. We strongly recommend that you protect your installation with a proxy or firewall, like these options:
Install Git Large File Storage (LFS) to clone the Stable Diffusion model.
Initialize Git Large File Storage (LFS).
Clone the Stable Diffusion repository. Enter your Hugging Face account credentials twice when prompted.
You only need the weights or the sd-v1-4.ckpt checkpoint file from this repository.
Wait for the cloning to finish.
Clone the Stable Diffusion Web UI Repository.
Copy the sd-v1-4.ckpt checkpoint file from the Stable Diffusion directory to the stable-diffusion-webui/models/Stable-diffusion/ Web UI directory and rename it as model.ckpt
Remove the Stable Diffusion folder you have cloned because you only need the sd-v1-4.ckpt file.
Install the FastAPI framework using pip.
The Stable Diffusion Web UI runs on port 7860 by default, so you must enable port 7860 on your firewall.
When you run your Stable Diffusion Web UI on a normal SSH session, the Web UI's process closes when you exit the SSH session. To continuously run your Web UI even when you leave the SSH session, use tmux, a terminal multiplexer.
To create a Tmux session, run:
You may change StableDiffusion with any session name you prefer. Please see How to Install and Use Tmux for more information about Tmux.
Change the directory to stable-diffusion-webui.
Launch the Stable Diffusion Web UI by running launch.py using python.
The --listen argument makes your Web UI listen to network connections, not just on localhost. Please see Command Line Arguments and Settings for more information.
Wait until your server launches.
Detach from the Tmux session by pressing Ctrl + B then D.
7860 at your server's IP address. For example, http://192.0.1.2:7860.model.ckpt.You have successfully created a Stable Diffusion Web UI on a Vultr Cloud GPU.
To learn more about Stable Diffusion, please see these resources:
0 Comments
Be the first to comment and share your perspective with the community.