Welcome back to Vector Z! I’m Akash, and today we are diving into something super exciting: AI art generation. This tutorial series is separate from our Game Dev series, where we use generative AI to create visually stunning user interfaces and other visual elements for mobile games. In this tutorial, I’ll show you how to generate AI art using Stable Diffusion. We’ll start with the beginner-friendly Automatic1111 interface and move on to more advanced tools like ComfyUI in future videos. All the tools we’ll use are free and open source. Let’s get started!
Step 1: Download Automatic1111
First, open your browser and search for “Automatic1111 GitHub.” Navigate to the GitHub page, or use this link. Scroll down to the Windows installation section and download the SD Web UI zip file.
Step 2: Extract and Move Files
Once the zip file is downloaded, go to your downloads folder and extract it. Move the extracted folder to your preferred directory. You can rename it to something like “automatic1111” for easier access.
Step 3: Run the Setup Script
Navigate to the extracted folder and run the webui-user.bat
file. Click “More info” and then “Run anyway” if prompted by Windows. The script will install the necessary components and start the web UI.
Step 4: Download Stable Diffusion Models
The setup script will automatically download the Stable Diffusion 1.5 model (around 3.97 GB). You can verify the download by checking the models/Stable-diffusion
folder in your installation directory. If the model isn’t downloaded, visit the Hugging Face website and download the model files manually.
Step 5: Start the Web Interface
After the setup is complete, the web UI will start automatically. Open your browser and go to http://localhost:7860
to access the Stable Diffusion interface provided by Automatic1111.
Step 6: Generate Your First Image
In the web interface, you can write prompts to generate images. For example, type “10-year-old boy in Superman costume” in the positive prompt field. In the negative prompt field, you can specify elements you don’t want in the image, such as “bad anatomy” or “blurry.”
Set the image size to 512×512 and click “Generate.” The AI will take some time to generate the image based on your prompts.
Step 7: Speed Up Image Generation
If image generation is slow, it might be using your CPU instead of the GPU. To configure it to use your GPU, edit the webui-user.bat
file. Add the command --use-cpu
to the command line arguments to force the use of your GPU. Save the file and restart the web UI.
Step 8: Enhance Image Quality
You can improve image quality by increasing the sampling steps. Set the sampling steps to 50 for better results. Enable “Face restoration” in the settings to fix any deformities in the generated faces. Click “Apply settings” and reload the UI.
Step 9: Download Additional Models
For better results, download additional models like DreamShaper from sites like CivitAI. Move the downloaded model files to the models/Stable-diffusion
folder. Refresh the web UI and select the new model from the dropdown menu.
Step 10: Experiment with Prompts and Settings
Experiment with different prompts and settings to see how they affect the generated images. For example, adding “Pixar style” to the prompt can change the artistic style of the image. Adjust the width, height, and CFG scale to fine-tune the output.
Congratulations! You’ve successfully installed and set up Stable Diffusion with Automatic1111 on your local machine. You can now start generating stunning AI art. Stay tuned for future tutorials where we’ll cover advanced features like inpainting and ControlNet. Don’t forget to subscribe to my YouTube channel for more updates and tutorials. If you have any questions, feel free to leave a comment below. Happy creating!
Thank you for reading! If you have any questions or need further assistance, feel free to leave a comment below. Happy art generating!