Here’s where you can learn the basics of Stable Diffusion.
Stable Diffusion is an advanced image generation model utilizing deep learning to create high-quality visuals from text prompts. It employs diffusion models to transform random noise into coherent images through iterative refinement. Its capability to generate diverse styles and subjects finds applications in areas ranging from art creation to design prototyping.
How to install Stable Diffusion
1. Download Git and Python
Before installing Stable Diffusion, we need to download and install two software.
Git Download link – https://git-scm.com/download/win
Python Download link – https://www.python.org/downloads/release/python-3106/
2. Install Stable Diffusion Webui
First, open File Explorer and select the path where you want to save Stable Diffusion (here I choose the desktop as an example), then add a folder called “stable-diffusion-webui”, and double-click to enter this folder after completion. Next, enter “cmd” in the path field, and the command line prompt will open.
Enter “git clone” in the command line prompt and paste the following URL (see below), then click Enter. After running, go back to the stable-diffusion folder we just added and you will find an additional folder called stable diffusion webui.
git clone URL – https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
3. Download Stable Diffusion model (model)
Next we need to download the Stable Diffusion model (model). Different models are good at generating images of different styles. This tutorial uses the basic model as a demonstration.
First, go to this website to download the model, select the first option under “Original GitHub Repository”, and click to start downloading.
4. Download Stable Diffusion model (model)
After the download is complete, go to the downloaded folder on your computer, rename the file as “model”, and then right-click to cut the file. Then go back to the previous “stable-diffusion-webui” folder, find the “models” folder and paste the file.
Model download link – https://huggingface.co/runwayml/stable-diffusion-v1-5
5. Set up Stable Diffusion
Then in the “stable diffusion-webui” folder, find the “webui-user.bat” file and right-click it, then click Edit. This will open notepad, enter “git pull” at the top of notepad (this step ensures we have the latest stable diffusion version), and then save the file.
After all these steps, you can finally start running Stable Diffusion. Double-click the “webui-user.bat” file to run Stable Diffusion.
After running, Stable diffusion will automatically start a new web page. If you don’t see it, you can copy the URL at the bottom of the command line prompt window, then paste it in the browser URL bar, and then press Enter to start using it.
How to Use Stable Diffusion
1 – Postive Prompts decides what elements you want to include in the result.
2 – Negative Prompts decides what elements that you DON’T want to include in the result.
3 – Sampling Steps determines the output quality of image, the higher the better.
4 – Sampling Method determines the details of the output image.
5 – Width and Height of the output image generated in the process.
6 – The number of images generated in the process.
7 – CFG Scale determines the significance of Prompts on the result; the higher the more significance.
8 – Seed is the random value of the generated image. Using the same seed and settings to generate image can generate the same result on the same PC.
Basic Prompts Writing
Techniques in prompt writing
1. Using commas to separate prefixes, the order will affect the weight of the video generation. The weight is higher before the comma, and lower after the comma.
- Example: girl, beautiful (the importance of “girl” will be higher than “beautiful”)
2. Better Prompts can be written in the following way: Prefix (image quality/style/lens effect/lighting effect) + Subject (characters & objects/poses/outfits/props) + Scene (environment/details)
- Example: dark theme, closeup face focus, ultra realistic, futuristic cyberpunk muscular male white hair sitting, cyberpunk face (cyber eyes), cool cybernetic punk jacket red neon eyes, mechanical intricate mask, natural lighting, bokeh, 8k, best quality, futuristic cityscape background
3. You can use different brackets () {} [] to increase/decrease the weight of a word, the more brackets the greater the impact. Basic examples are listed below:
- (Purple Hair) – Increase weight to 1.1
- ((Purple Hair)) – Increase weight to 1.1*1.1=1.21
- {Purple Hair} – Increase weight to 1.05
- [Purple Hair] – Decrease weight to 0.952
4. If you want to use the lora model, you can input <lora:filename:multiplier>
- Example: <lora:tossummeV2.3:1.5>
5. AI will execute the task according to the sequence of prompt word input and the assigned brackets.
6. AI will randomly select which prompt word to execute based on the weight ratio.
7. The words in front have greater weight; for example, if the word “scenery” is placed in front, the character will become smaller, otherwise the character will become larger or half-length.
8. The size of the generated image will affect the effect of the prompt. The larger the image, the more prompts are needed.
Popular Negative Prompts for copy & paste
ugly, tiling, disfigured, deformem, low quality, pixelated, blurry, grains, grainy, old, text, watermark, signature, out of frame, disproportioned, bad proportions, gross proportions, bad anatomy, body out of frame, duplicate, cropped, cut off, draft,extra hands, extra fingers, extra arms, extra legs, extra limbs, long neck, mutation, mutilated, poorly drawn face, poorly drawn hands, poorly drawn body, missing hands, missing arms, missing leg, missing fingers, fused fingers unnatural fingers, unnatural pose, low resolution