Home Artists Posts Import Register

Content

Alright, there are a good number of guides on how to start using AI exploring different tools, ways of prompting and models. Mine will be focused on:

  • SD (Stable Diffusion): A technique for smoothing and refining the output of generative models such as Generative Adversarial Networks (GANs) or Variational Autoencoders (VAEs).
  • Automatic1111 webui: A browser interface based on Gradio library for Stable Diffusion.
  • Downloading models/embeddings from secure places and getting them up and running.
  • Using textual inversion to get specific results.
  • Prompting tips.

This is the first part of a tutorial series that will help you out on creating oppais and... to be honest, any kind of image that you want.

Considerations

I'll be assuming a lot of stuff in these guides. You will need to learn to do several things on your own so that I am not forced to explain them. Otherwise, these guides will drag on into eternity.

I will not explain things like using a command terminal, running scripts, detailed installation of programs (except the webui) and so on.

Each of these things has detailed documentation that you can read to fully understand them.

Tools

Right now, will be handling the setup of a local environment in order to create images for free on your computer.

There are a few things that you'll need before actually getting your hands dirty:

- Git: https://git-scm.com/downloads A free and open source distributed version control system.

- Terminal: To run a few commands later on. Every OS includes a terminal.

- Python 3: https://www.python.org/downloads/ A programming language used by Automatic1111 web ui.

So, install them (by following their docs) and come back to this guide.

Downloading the SD base model

This is the first time you'll visit huggingface, a website where you can download a good amount of models to work with.

You can find the base SD 1.4 model over here:

https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/tree/main 

Go ahead and click the "sd-v1-4.cpkt" file:

You'll get into a new page where you can see a download button:

Click on it and wait for the download to finish.

Automatic1111

Automatic is a programmer and GitHub user, but more importantly, he is the creator of the stable-diffusion-webui. This is a browser user interface that will allow you to create images quite easily.

Whenever you read Automatic1111 or Automatic, we are referring to that guy.

To start using his project, open up a new terminal window and run the following script:

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

By doing that, you will clone all the source code from Automatic's repo to your computer.

Now, get into that folder named "stable-diffusion-webui" and paste the model you downloaded before inside models/Stable-diffusion and rename the file to be model.cpkt.

After that, start the webui by running the webui-user bat in on your terminal like this:

webui-user.bat

Wait for a while (the first time should take a few minutes in order to install everything, don't worry about it) until you read the following line:

Running on local URL: http://0.0.0.0:7860

That means that you can visit the following link on your browser: 

http://127.0.0.1:7860/ 

You should see the following screen:

Before you start working with the webui, take a look at the following content:

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Troubleshooting

PCs with low vram (4gb~) need a custom flag while running the webui-user.bat so... be careful.

Understanding the webui

You should see a few different tabs on the webui and the first one (where it actually starts) is the txt2img tab. This is where the magic happens.

There are two text fields over there:

Prompt: where you write the stuff you would like to have.

Negative prompt: where you write the stuff that you would like to avoid.

Go ahead a write something down like:

Woman in a medieval bedroom, smirk, blue eyes

and click that big ass Generate button.

You might get some ugly shit like me:

Don't worry about it, that's how it works.

Go ahead and play with it for a bit.

You can increase the batch size to get more images:

Or the width/height to get different resolutions:

Don't get crazy by generating gigantic images or too many at the same time... your PC will kill itself if you do so. We will be covering that kind of stuff on a later tutorial.

For the meantime... play around! Try different prompts and negative prompts too. Remember: every prompt should be separated by a comma.

Our next tutorial will cover just that: prompting 

That's just like a 20% of the job, but it's important to know what you should tell to SD in order to get what you want.

Comments

Charrise

Is there any way to download this using Mac?

oppaipriest

There is a discussion on the github repo about running the webui on MacOS. Couldn't tell you if this is 100% effective just cause I don't have a Mac to test it out. Go ahead and check it out: https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/5461