Featured image of post [Free & Super Easy] How to Generate AI Illustration Images with Stable Diffusion! Google Colab Step-by-Step Guide

[Free & Super Easy] How to Generate AI Illustration Images with Stable Diffusion! Google Colab Step-by-Step Guide

Why not create illustrations to your liking using the AI 'Stable Diffusion', which can generate high-quality images from text input? We provide an easy-to-understand explanation of the steps for anyone to easily start AI image generation using only Google Colab and a free account.

What is Stable Diffusion?

Stable diffusion is an AI developed by a research team at the University of Munich in Germany that generates images from inputted text information. By training on various images, it is possible to generate a wide variety of images, from photorealistic ones to illustrations.

This time, I will introduce how to generate illustration images using the pre-trained data of Stable diffusion.

What you need

  • Google Account

That’s all.

Generation steps

  1. Open https://colab.research.google.com
  2. Select File on the top left and choose New notebook
  3. Select Edit and choose Notebook settings
  4. Change the Hardware accelerator to GPU img_2.png
  5. Paste and execute the following code
1
!pip install diffusers==0.8.0 transformers
  1. Paste and execute the following code
1
from diffusers import StableDiffusionPipeline
  1. Paste and execute the following code
1
2
pipe = StableDiffusionPipeline.from_pretrained("gsdf/Counterfeit-V2.5")
pipe.to("cuda")
  1. Paste and execute the following code
1
2
3
4
5
prompt = "((masterpiece,best quality)),1girl, solo, animal ears, rabbit, barefoot, knees up, dress, sitting, rabbit ears, short sleeves, looking at viewer, grass, short hair, smile, white hair, puffy sleeves, outdoors, puffy short sleeves, bangs, on ground, full body, animal, white dress, sunlight, brown eyes, dappled sunlight, day, depth of field"
n_prompt = "EasyNegative, extra fingers,fewer fingers"

image = pipe(prompt, negative_prompt = n_prompt).images[0]
image

The Prompt used here is based on the Prompt at https://huggingface.co/gsdf/Counterfeit-V2.5.

Generation results (some)

img_1.png

img_3.png

img_4.png

References

comments powered by Disqus