Stable Diffusion is a powerful text-to-image model that allows users to generate high-quality images from textual descriptions. In this guide, we will walk you through the steps of installing and running Stable Diffusion on your local machine.
To ensure a smooth installation, please check the following system requirements:
Before we begin the installation, you'll need to install some required software:
Open your terminal or command prompt and run the following command:
git clone https://github.com/CompVis/stable-diffusion.git
Navigate to the Stable Diffusion directory and create a virtual environment:
cd stable-diffusion
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Once your virtual environment is activated, install the necessary dependencies:
pip install -r requirements.txt
You will need to download pre-trained model weights. Follow these steps:
Now you're ready to generate images. Use the following command to start the model:
python scripts/txt2img.py --prompt "A fantasy landscape" --plms
Replace "A fantasy landscape" with your desired prompt to generate different images.
Congratulations! You have successfully installed Stable Diffusion on your local machine. Experiment with different prompts and settings to create stunning visuals.
For further exploration, consider joining the community forums or Discord channels dedicated to Stable Diffusion and AI-generated art.