How To Get Access To Stable Diffusion
Stable Diffusion is the recently launched text-to-image model that has garnered a lot of attention. This model hopes to empower billions of people to create stunning art within seconds by allowing them to run on users’ graphics processing units (GPUs). Regarded by many as a breakthrough technology in terms of speed and quality, Stable Diffusion is quickly rising up the ranks in the world of state-of-the-art artificial intelligence (AI) media generation.
Understanding Stable Diffusion
The Stable Diffusion art generator was created by Stability AI in collaboration with researchers and engineers from its developer communities, including RunwayML, LMU Munich, EleutherAI, and LAION. Stable Diffusion is open-source, meaning the original source code is available for free and may be redistributed and modified.
The codes of Stable Diffusion were first publicly published on 22nd August, 2022, but there is also an extremely permissive licence that allows users to install and run the model on their PCs for free. Its speed allows users to install Stable Diffusion and create art on computers with GPUs that meet minimum requirements.
Terms for Using Stable Diffusion
Despite having an extremely permissive licence and being free, there are terms and conditions you need to know before using Stable Diffusion.
- Stable Diffusion is licensed with CreativeML Open RAIL-M.
- The creators of Stable Diffusion claim no rights on the outputs you generate. You are free to use them any way you want, and you are responsible for ensuring their use does not go against the provisions set in the licence.
- Stability AI gives you a perpetual, worldwide, nonexclusive, no-charge, royalty-free, irrevocable copyright licence to reproduce, prepare, publicly display, publicly perform, sublicense, and distribute any art created using Stable Diffusion.
However, the licence forbids you from deliberately creating and sharing any content that violates any laws, causes any harm to others, or disseminates personal information that is meant to cause harm.
Setting Up Stable Diffusion
Although Stable Diffusion was optimised to run on individual PCs, it will not run on your phone and most laptops. To install Stable Diffusion, your computer needs to have a GPU with at least six gigabytes (GB) of VRAM and ten or more GB of storage space on the hard drive or solid-state drive. The PC also needs to run on Windows 8 or higher.
If your PC meets these requirements, you will need to install two prerequisite pieces of software: Git and Miniconda3. Git allows developers to manage different versions of the software, while Miniconda3 lets you download, install, and manage all of the libraries required for Stable Diffusion to function without much manual intervention.
To install these two software programs, take these steps:
- Download Git from the Windows x64 installer on the Git website. Follow all the prompts to install Git. On the ‘Adjusting Your PATH Environment’ page, ensure that the option is set to ‘Git From the Command Line and Also From 3rd-Party Software.’
- Download the Miniconda3 Windows 64-bit from the Miniconda3 download page. Start the installation process, but select ‘All Users’ before clicking Next and finishing the process.
Installing Stable Diffusion on Your Computer
After installing Git and Miniconda3, you are ready to install and start using Stable Diffusion. First, you will need to restart your computer. Then, download Stable Diffusion and the latest version of Checkpoint. You may need to create an account before downloading Checkpoint. After that, take these steps:
- Run Miniconda3.
- Create a folder named ‘stable-diffusion’ using the command line.
- Copy and paste the code block below into the Miniconda3 window, then press Enter.
- Open the ZIP file, ‘stable-diffusion-main.zip,’ that you downloaded. Copy the content (a folder named stable-diffusion-main) and paste it into the folder you just created.
- Return to Miniconda3 and paste the following command:
conda env create -f environment.yaml
conda activate ldm
- When you paste the command, Miniconda3 will automatically begin downloading all the files you need. It may take a while to download, so do not interrupt the process or input any command while it’s downloading.
- Copy and paste the Checkpoint file you downloaded into the folder ‘C:\stable-diffusion\stable-diffusion-main\models\ldm\stable-diffusion-v1’ in File Explorer.
- Rename the ‘sd-v1-4.ckpt’ file as ‘model.ckpt.’ You are ready to create your first image with Stable Diffusion.
While first-time installation may seem difficult, the process only needs to be done once. After that, all you need are commands in Miniconda3 to create images using Stable Diffusion.
In addition, you can also use the Stable Diffusion model on Linux and macOS. To do this, read our article on using Stable Diffusion online via Google Colaboratory. When creating online, you also don’t need to worry about your PC meeting the minimum requirement to run the Stable Diffusion locally.