
Stable Diffusion lets you create practically any image based on text. For instance, your project may require you to improve an AI face, but you’re having trouble enhancing the original. If so, you could use some of our tips on improving your Stable Diffusion face creation process. Read on to learn more.
How Do You Create Better Faces With Stable Diffusion?
To create better faces with Stable Diffusion, you need to set up a Google Colab called Deforum Stable Diffusion v0.5. Here’s how you can do that:
- Open your browser and go to this website.
- Press the “Connect” button and click “NVIDIA GPU.” Since this is the Google server GPU, no worries — you don’t need an NVIDIA graphics card.
- Grant system permissions for the website to use your computer.
- Press on the section below the GPU card (“Model and Output Paths”).
- Connect your Google Colab with your Google Drive and wait for the checkmark to appear next to “Model and Output Paths.”
- Select “Setup Environment” and let the system connect your account. Do the same for “Python Definitions.”
- Go to the “Select and Load Model.” This section requires you to have the model you want to upload on your Google Drive. To do so, download the .ckpt file from this website by pressing “sd-v1.4.ckpt” in the “Download the Weights” section. Upload this file to your Google Drive AI folder containing the models you want to improve.
- Hit the “Play” button next to the “Select and Load Model” section. Wait for the green check mark, and your Google Colab will be up and running.
Now that your Google Colab is set up, you can improve your AI faces with Stable Diffusion. This process is also known as improving old renders and comes down to changing the resolution of your images:
- Cut out the face you wish to improve and save it as a separate image.
- Upload the face by dragging it to your Google Colab temporary drive (the left-hand panel).
- Right-click the image and click on the “Copy Path” button.
- Paste the image into the “init_image” field in the right-hand menu.
- Navigate to the “Prompts” window and enter the prompts you want for your face. Make sure to type
in the prompts inside the quotation marks to get the best results. - Head to the “Run” section and find the “Image Settings” menu.
- Change the pixel resolution to enhance the clarity of the face. For instance, 800×800 works well in most cases.
- Press the red “Play” button under the “Run” window to render the image.
- Your image will now be rendered with a different resolution. Play around with the procedure until you get the desired effect.
- Download the image from your drive and overlay it over the original.
How Do You Use Variations With Stable Diffusion to Create Better Faces?
Besides improving faces directly by changing the resolution, you can also introduce variations to produce sharper images. The first step is to set your “Animation” preferences to “none.” Here’s what you need to do:
- Connect your Google Drive to the Google Deforum Stable Diffusion 0.5 Colab with the steps above.
- Upload the image of the face to the left-hand panel of the Colab.
- Go to the “Animation” menu and change the “animation_mode” setting to “none.”
- Click the “Play” button next to the “Animation” section to save your changes.
Once you’ve changed your “Animation” settings, you can ignore most of the other settings since you don’t want to create an animation. However, you’ll need to make some tweaks to the “Prompts” section. Follow these steps:
- Use the original prompt as the starting point.
- Make the necessary variations by changing the line, depending on whether you want to add or remove the features from your AI face. Work in the “Prompts” section rather than the “Animation Prompts” window.
- Place quotation marks at the beginning and end of your prompts.
- Put a comma at the end of the prompt (after the quotation marks).
- Click the “Play” button in the upper-left corner of the “Prompts” window to render your image and save your progress.
The next menu you want to tweak is the “Run” menu. More specifically, you need to go to the “Image Settings” window and make the following changes:
- Navigate to “Sampling Settings” and set the “Seed” setting to “-1.”
- Play around with the “Sampler” setting until you get the desired effect.
- Set as many “Steps” as you want. The “Scale” value is also up to you.
- If you used the “ddim” render in the “Sampler” window, set the “ddim_eta” to “1.”
- Scroll down until you find “Batch Settings” and head to the “n_batch” line. Type in the number of variations you want to have into the textbox.
- Go to the “Init Settings” and press the box next to the “use_init” option. There should now be a checkmark next to the setting.
- Type in “0.5” in the “strength” field if you want to reuse 50% of the original image. You can enter higher or lower values, depending on how much you want to reuse the source material.
- Click the “File” icon in the left-hand panel. Go to the folder that contains the image of the face you wish to optimize and drag it to the left-hand section. Wait for the system to load your picture, right-click it, and press the “copy path button.”
- Paste the path into the “init_image” field and click the red “Play” button in the top-left corner of the “Image Settings” menu.
- Let the program render your image and add variations. You should now see the new face in the lower part of the screen with your variations.
How to Improve Image Generation With Stable Diffusion
When improving faces with Stable Diffusion, the bulk of the work comes down to writing appropriate prompts. The system relies on this feature to generate an image using the “txt2img” technology. It uses the text prompt and other parameters to produce a picture based on your input.
As previously discussed, you need to enter the “seed” value at one point to create the desired outcomes. You can also change the number of “steps” when incorporating variations.
However, these features may not do much in terms of improving your resulting faces. Instead, you’ll need to step up your “prompts” game to ensure high-quality image generation. Here are a few tips that will help you do so.
- Be specific – Your text prompts must be very detailed, especially the beginning, since the start of your phrase has more bearing than the end. If you leave out key information, you may not get the desired look.
- Stick to English – The developers of Stable Diffusion used more than two billion English text-image pairs. The other 100+ languages accounted for fewer pairs, meaning the share of individual languages is much smaller than that of English. As a result, writing prompts in non-English may not give you the right outcome.
- Include the art genre and type – Stable Diffusion can generate all sorts of images, including acrylic and oil paintings, fashion photos, cartoons, and prints. Therefore, specifying the form of imagery you want makes the algorithm more accurate.
- Be trendy – If you’re looking for artistic images, you can add “trending on ArtStation” or other names to help Stable Diffusion be as close to the desired picture as possible.
- Play with different words – When writing your prompts, you can never overdo your descriptions. Hence, play with different technical properties, like “sharp focus” and “dramatic lighting” or adjectives, such as “awesome,” “gorgeous,” and “stunning.”
- Add an artist’s name – Stable Diffusion lets you produce images in the style of famous artists. To achieve this effect, add the name of your artists to your prompt, such as Andry Warhol, Caspar David Friedrich, or Auguste Renoir.
- Use negatives – Some versions of your interface react to negative prompts. These enable you to indicate what your system should avoid when producing images.
Let Your Imagination and Creativity Run Wild in Stable Diffusion
Mastering Stable Diffusion can take a while, especially when you want to enhance your AI faces and other images. A wrong line or two can easily degrade your project, so you need to be super careful when writing your prompts and entering generation parameters. With a few tweaks, you should be able to beautify faces and any other parts of your pictures with ease.
How often do you use Stable Diffusion? Have you ever added variations in your images? If so, what effects did they produce? Share your experiences in the comments section below.