How to run Stable Diffusion? 5 methods for online and local operation
Stable Diffusion is a text to image generation model released by start-up company Stability AI and researchers from the University of Munich and Runway in 2022. It supports functions such as text to image generation, image generation, image modification, and filling in low resolution images. Due to its free and open-source nature, as well as the high quality of the generated images, it is widely loved by creators. This article will explain how to run Stable Diffusion online and locally, allowing you to quickly get started generating the desired images.
Article Table of Contents
Running Stable Diffusion online
DreamStudio
Clipdrop Stable Diffusion XL
Hugging Face
Copy
Run Stable Diffusion locally
How to run Stable Diffusion online
DreamStudio
DreamStudio is a website application officially launched by StabilityAI that facilitates user generated images. Based on the Stable Diffusion model, users can input natural language and adjust parameter controls to create custom images. It also supports API access for use in their own developed applications or robots. After registering and logging into DreamStudio, you can receive a free 25 points bonus, which can generate approximately 30 standard images. If you need more generation times, you can pay for it. For $10, you can purchase 1000 points.
Official website address: https://beta.dreamstudio.ai/generate
Clipdrop Stable Diffusion XL
Clipdrop is a series of AI image processing tool kits launched by StabilityAI, which supports AI image functions such as image erasing, image enlargement, image lighting, background removal, background replacement, scaling and filling. In addition to these features, Clipdrop supports the latest Stable Diffusion XL version, allowing users to access its website, enter prompt text descriptions, select image styles, and click the Generate button to generate images. Currently, the free version of Clipdrop allows users to generate 400 images per day using Stable Diffusion XL, with a small watermark on the Clipdrop in the lower right corner. If you want to generate more times and remove watermarks, you can consider upgrading to the advanced version of Clipdrop. After payment, you can generate 1500 images per day and have unlimited access to other AI features.
Official website address: https://clipdrop.co/stable-diffusion
Hugging Face
Hugging Face is a well-known open-source AI model community that gathers well-known AI models from around the world on the platform. Users can download the dataset of AI models through Hugging Face or run it online to view real-time effects. The Stable Diffusion on Hugging Face was officially created by StabilityAI and is currently version 2.1. Users can directly enter a description and click on Generate image to generate an image. Due to the large number of users on Hugging Face, the speed of generating images may be slower, taking approximately 10 seconds or more.
Official website address: https://huggingface.co/spaces/stabilityai/stable-diffusion
Copy
Copy is a platform that helps users quickly run open-source machine learning models, such as language models, video creation and editing, image resolution improvement, image restoration, image text translation, etc. Users only need to add a few lines of code to quickly develop their own AI applications. The online running environment for Stable Diffusion is also provided on the platform of Copy, and compared to Hugging Face, the generation speed of Copy is faster.
Official website address: https://replicate.com/stability-ai/stable-diffusion
How to run Stable Diffusion locally
If you are willing to tinker with the provided input and want to fine tune the data model, or for privacy and security reasons, running the Stable Diffusion model on your local computer may be a good choice. The following are the steps to run Stable Diffusion locally:
Step 1: Install Python and Git
Install Python version 3.10.6. You can download and install it from the official Python website. After installation, you can open the command line terminal and enter to check the Python version. Next, we will install the code management tool Git, which can be downloaded from Git’s official website.
Step 2: Register GitHub and Hugging Face accounts
GitHub is used to host software code, while Hugging Face is an open-source AI model community. Registering an account for these two platforms can facilitate the synchronization and management of your subsequent code, as well as downloading the Stable Diffusion model.
Step 3: Clone Stable Diffusion Web UI to local computer
Stable Diffusion Web UI is an open-source, Gradio based project that helps developers quickly create a user interface for Stable Diffusion. First, create a folder, such as SD project, and then use the cd command to locate it,. Then run the git clone command to download the project,
Step 4: Download the Stable Diffusion model from Hugging Face
Visit the Hugging Face official website, log in to the registered account, download the Stable Diffusion 1.5 version. After downloading the model, navigate to the “models” folder in the stable differentiation webui folder, and then place the model here.
Step 5: Set Stable Diffusion Web UI
Open the command line terminal and use the cd command to navigate to the stable differentiation webui folder, such as, and then enter the installation dependencies.
Step 6: Run Stable Diffusion
After successfully installing the dependency, a URL will appear in the command prompt: http://127.0.0.1:7860 . Copy and paste it into the browser address bar to run stable differentiation web ui.