Unleash Your Inner Artist: Create Stunning Images for Free with Stable Diffusion WebUI — No Coding Skills Needed!

Mahesh
7 min readJun 19, 2023
Source: https://civitai.com/models/4384/dreamshaper

Master the Art of Image Generation: Step-by-Step Guide to Generating Captivating Images for Free with AI-Powered Stable Diffusion WebUI — No Coding Required!

Generative AI

Generative AI is an innovative technology that empowers computers to create original content, such as images, music, and even text. It involves training machine learning models on vast amounts of data, enabling them to understand patterns and generate new outputs that resemble the input data. By harnessing the power of generative AI, we can unlock endless creative possibilities, allowing computers to produce unique and captivating content that was once solely the domain of human creativity.

Generative AI has found applications in various domains, showcasing its versatility and creative potential. Here are a few examples:

  1. Image Generation: Generative Adversarial Networks (GANs) can generate realistic images that never existed before. For instance, NVIDIA’s StyleGAN has been used to create incredibly lifelike human faces. Source: NVIDIA AI Playground
  2. Music Composition: Deep learning models like OpenAI’s MuseNet have been trained on vast musical datasets, enabling them to compose original pieces across different genres and styles. Source: OpenAI Blog
  3. Text Generation: Language models such as GPT-3 can generate coherent and contextually relevant text. They have been used to generate news articles, stories, and even assist in content creation. Source: OpenAI Playground
  4. Artistic Style Transfer: Style transfer algorithms, like DeepArt’s NeuralStyle, can transform ordinary images into visually stunning artworks inspired by famous artists. Source: DeepArt.io
  5. Video Synthesis: Generative models like NVIDIA’s vid2vid can generate realistic videos from simple sketches or semantic labels, allowing for easy video editing and content creation. Source: NVIDIA AI Research

These examples demonstrate how generative AI is revolutionizing various creative domains, enabling new possibilities for artists, musicians, writers, and content creators alike.

Text to Image

Generative AI in image generation using text offers immense potential for brands and companies. By leveraging this technology, businesses can streamline their creative processes and enhance their visual content production.

For instance, with a simple textual description or a set of keywords, generative AI can automatically generate high-quality images that align with a brand’s identity or product offerings. This not only saves time and resources but also ensures consistency in visual branding across different platforms, if done right.

Moreover, generative AI enables companies to rapidly prototype and iterate on visual designs, empowering them to efficiently explore various creative directions. Ultimately, harnessing generative AI in image generation can help brands and companies accelerate their content creation, maintain visual cohesiveness, and deliver visually engaging experiences to their audiences.

While generative AI in image generation using text offers advantages, there are some counter arguments to consider:

  1. Lack of Authenticity: Generated images may lack the authenticity and human touch that resonates with audiences. This can result in a loss of emotional connection and brand credibility.
  2. Limited Creative Control: Relying solely on generative AI for image generation may limit the ability to express unique brand characteristics and creative vision. It might not capture the nuanced details and subtle messaging that human designers can provide.
  3. Brand Differentiation: Generic or formulaic generated images may not effectively differentiate a brand from its competitors. Customized visual elements and carefully curated designs created by human designers can better reflect a brand’s personality and set it apart.
  4. Legal and Ethical Concerns: Using generative AI to generate images could raise copyright or intellectual property concerns if the AI model is trained on copyrighted material. Additionally, ethical considerations surrounding data usage and potential biases within the AI system need to be addressed.
  5. Lack of Adaptability: Generative AI models might struggle to adapt to specific visual requirements or changing market trends. Human designers are often more adept at understanding cultural nuances, target audience preferences, and evolving design trends.

It’s important to strike a balance between leveraging generative AI for efficiency and creativity, while also incorporating the expertise and creative insights of human designers to maintain authenticity and brand distinctiveness.

Let’s take a look at step by step on how you can leverage Generative AI for your business needs.

Steps

1. Depending on your OS, you will have to install the following programs:
a. Git — Instructions
b. Python — Instructions
c. Miniconda — Instructions
Your current OS might already have Git and Python. In that case, install miniconda and create a new environment and install git and python in that environment.

2. Once miniconda is installed, create a new environment for stable diffusion webui:

conda create --name stablediff-env python=3.9 git

Once environment creation is complete, activate it using:

conda activate stablediff-env

3. Now, under your desired directory, create a new directory and either start a new terminal from that directory or change to this directory from your terminal:

mkdir stablediffusion && cd stablediffusion

4. If you are comfortable with git, use the following command; else, download the files from this git repository

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
My Directory Location

This is the Stable Diffusion web UI

4. After cloning is complete, enter the stable diffusion folder:

cd stable-diffusion-webui

Inside this, you will see a `model` directory:

Inside models directory, navigate to theStable-diffusion directory.

5. Now open brower and go this website, https://civitai.com/ and download any checkpoint model. After download is complete, the extension of the file should be .safetensors.

(Be mindful of the file size while picking the model, as the large model weights might not fit in your small system memory)

6. Place the downloaded .safetensors extension file in the Stable-diffusion directory

I have three models in Stable-diffusion directory

7. Now go back to your terminal and from the root of stable diffusion webui git directory

cd ../../

enter the following command to start the web ui:

/bin/bash webui.sh

It will take some time to start the webui, and once up, it will give you the local url:

My Local URL

Access it from you browser and you will see the stable diffusion webui:

WebUI

8. From the top Stable Difussion checkpoint, you can change the model from the available models in your model/Stable-difussion directory:

9. Enter prompt in the input section and click on Generate button on the right. Depending on your input parameters at the bottom, it will generate a new image, that you can save and is now totally yours )

Example of Prompt

The following images were generated using the stable diffusion web UI on my system with an Intel i7 processor, 8 GB RAM, Linux Mint OS, and Nvidia 960M GPU. Keeping RAM size in mind, I had to set the Width and Height parameters as 256 and 256 px, respectively. And I used DreamShaper’s latest checkpoint at the time of writing this.

Prompt: realistic exhibition hall, big, lights, crowd, commerce
Prompt: A portrait of a cyborg in a golden suit, D&D sci-fi, artstation, concept art, highly detailed illustration

Notice how giving definite details in prompt improves the final image.

Prompt: inside of a mind of an enlightened being
Prompt: a knight in armor on a thick strong warhorse by mike allred and frazetta and karol bak sharp digital painting. dreaming latent space. matte painting, concept art. artstation. digital render. realistic, 8 k

Single-word prompts will not fetch you anything.

Prompt: Godzilla

Whereas a more detailed prompt gives much better output:

Prompt: godzilla in the ocean, massive being, ultra realistic, 8K, real

Do more than just funky images

Once you have got your prompts figured out, explore various other parameters, like click on take to extras and in that panel, you can download model models that will work on your generated image to make in more upscale, realistic and so on.

In this pane the models will be automatically once any option is selected.

Extras Pane

For example in my models/Lora directory, I have a model that makes images more realistic (or fine tunes it) :

Lora

You should definately read more about Lora and automatic1111 if you are serious about stable diffusion.

If you are an veteran in CS, then it is better to fire up a cloud instance with GPU (instances without GPU will also work) and let the cloud do all the heavy lifting.

After finishing your work, you can terminate the instance and pay for only the duration of your usage.

The above instructions will not work in Google Colab, as the webui.sh scripts will throw root permission error.

If you see errors like “disable half point” or something like that after the first time you have played with image generation, then your models files have become corrupt after first time usage. Therfore delete your .safetensors extension model files in themodel/Stable-diffusion directory. Copy and paste them again from downloads directory, or download models again from https://civitai.com/ website.

Use it responsibly and always inform the image consumers that the image is generate using AI.

Hi 👋, I am Mahesh

I am a Machine Learning Engineer, you can connect with me on LinkedIn: https://www.linkedin.com/in/maheshrajput/

--

--