How to run Stable Diffusion? 5 methods for online and local operation

AI Tutorial 2023-12-16

Stable Diffusion is a text to image generation model released in 2022 by the startup Stability AI and researchers from the University of Munich and Runway. It supports functions such as text to image generation, image to image generation, image modification, and low resolution image filling. 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.

How to Run Stable Diffusion Online

DreamStudio

Dream Studio Stable Diffusion

DreamStudio is an official website application 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 gift of 25 points, which can generate approximately 30 standard images. If you need more generation times, you can purchase them for a fee of 1000 points for $10.

Official website address:https://beta.dreamstudio.ai/generate

Clipdrop Stable Diffusion XL

Clipdrop Stable Diffusion XL

Clipdrop is a series of AI image processing tool suites launched by StabilityAI, which supports AI image functions such as image erasure, image enlargement, image lighting, background removal, background replacement, scaling and filling. In addition to these features, Clipdrop supports the latest Stable Diffusion XL version, where users can access its website, enter prompt text description, select image style, and click the Generate button to generate images. At present, the free version of Clipdrop allows users to generate 400 images daily using Stable Diffusion XL, with a small Clipdrop watermark in the bottom right corner. If you want more generation times and watermark removal, 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 modeling community that gathers globally renowned AI models. Users can download AI model datasets through Hugging Face and directly run them 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 Generate image to generate an image. Due to the huge user base of Hugging Face, the speed of generating images may be slow, taking approximately 10 seconds or more.

Official website address:https://huggingface.co/spaces/stabilityai/stable-diffusion

Replicate

Replicate Stable Diffusion

Replicate 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 conversion, etc. Users only need to add a few lines of code to quickly develop their own AI applications. The platform of Replicate also provides an online running environment for Stable Diffusion, and compared to Hugging Face, the generation speed of Replicate is faster.

Official website address:https://replicate.com/stability-ai/stable-diffusion

How to run Stable Diffusion locally

If you are willing to tinker and want to fine tune the data model with the provided input, 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

To install Python version 3.10.6, you can download and install it from the official Python website. After installation, you can open a command-line terminal and enter python -version to check the Python version. Next, we will install the code management tool Git. You can download the installation package from Git's official website.

Step 2: Register for GitHub and Hugging Face accounts

GitHub is used for hosting software code, while Hugging Face is an open-source AI model community. Registering accounts on both 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 the local computer

Stable Diffusion Web-UI是一个开源的基于Gradio开发的Stable Diffusion网页界面项目,可以帮助开发者快速创建Stable Diffusion的用户界面。首先创建一个文件夹,如sd-project,然后使用cd命令定位到该文件夹,cd sd-project

Stable Diffusion Web UI is an open-source Stable Diffusion web interface project developed based on Gradio, which can help developers quickly create user interfaces for Stable Diffusion. First, create a folder, such as sd project, and then use the cd command to locate the folder, cd sd-project. Then run the git clone command to download the project,git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

Step 4: Download the Stable Diffusion model from Hugging Face

Visit the Hugging Face official website, log in to the registered account, download Stable Diffusion 1.5 version, and after the model download is complete, navigate to the "models" folder in the stable diffusion webui folder, and then place the model here.

Step 5: Set up Stable Diffusion Web UI

Open a command-line terminal and use the cd command to locate the stable diffusion-webui folder, such as cd xx/sd-project/stable-diffusion-webui, then enter webui-user.bat to install the 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 distribution web ui.

Stable Diffusion Web-UI


Disclaimer: This website only reposts or shares content from other websites or online sources for the purpose of transmitting information technology, etc. The content is for reference only, and we maintain neutrality towards their views. Copyright belongs to the original author. If there is any infringement, please contact us promptly 1743542898@qq.com Delete, thank you!

Related Articles