Negative Embeddings - ULTRA QUALITY Trick for A1111

Olivio Sarikas
14 Apr 202306:33

TLDRDiscover two techniques to enhance AI-rendered image quality: negative embeddings and upscaling. Negative embeddings involve training an embedding on undesired image features to improve results. Upscaling involves rendering a high-resolution image, using image-to-image upscaling, and applying photo editing techniques like unsharp mask to refine details. These methods significantly boost image clarity and texture, offering better visual outcomes.

Takeaways

  • 🎨 Negative embeddings can enhance AI renders by training an embedding on undesirable image features to avoid.
  • 📝 Use negative prompts with terms like 'bad artist' or 'bad hands' to improve specific aspects of the AI-generated images.
  • 🔍 Download and integrate negative embeddings into your AI tool's folder to apply them effectively.
  • 🖌️ Include the negative embedding names in the prompt, enclosed in pointy brackets without the .PT file extension.
  • 🔕 Assign a weight to each negative embedding to control its influence on the final image quality.
  • 📸 Render multiple versions of the same image with different negative embeddings to compare and select the best result.
  • 🔄 Upscaling images can further improve quality, especially when combined with negative embeddings.
  • 📱 Begin with a preferred resolution, double it, and use tools like DPM plus plus sde Keras for optimal results.
  • 🎭 Use photo editing software like Affinity Photo or Photoshop to sharpen and unsharpen the image to bring out initial textures.
  • 🛠️ Be cautious of over-sharpening, particularly around edges, and adjust the sharpening degree accordingly.
  • 🗑️ Remove any unwanted sharp edges by comparing the sharpened and original images and manually erasing the highlighted parts.

Q & A

  • What is the main topic of the video?

    -The main topic of the video is about improving the quality of AI renders using negative embeddings and upscaling techniques.

  • What are negative embeddings in the context of AI renders?

    -Negative embeddings are a technique where an embedding is trained on undesirable outcomes to guide the AI to avoid these in the final image, thereby improving the quality of the render.

  • How does one apply negative embeddings to their AI render process?

    -To apply negative embeddings, one identifies and downloads the specific embeddings they wish to use, then includes the names of these embeddings in their negative prompt, enclosed in pointy brackets and with a specified weight.

  • What is the purpose of using negative embeddings for the art style and hands in AI renders?

    -Using negative embeddings for art style and hands helps to address common issues in these areas, ensuring that the final render is free from such problems and looks more natural and realistic.

  • What is the second trick the video presents for enhancing image quality?

    -The second trick is an upscaling process that involves rendering an image at a higher resolution, using a specific set of parameters, and then sharpening the image in photo editing software to bring out more details and textures.

  • Why is it important to turn off face restore when applying the upscaling trick?

    -Face restore is turned off during upscaling because the face has already been optimized, and further restoration could blur the details. Keeping the face intact ensures that the sharpening process enhances the image without distorting the facial features.

  • What should one be cautious of when sharpening images?

    -One should be cautious of over-sharpening, especially along the edges, as it can create highlighted edges or halo effects. If such issues occur, one should adjust the sharpening settings or manually remove the problematic edges.

  • What file format is recommended for saving the sharpened image?

    -It is recommended to save the sharpened image in PNG format to avoid any loss of quality due to JPEG compression artifacts.

  • How can the viewer compare the effectiveness of the negative embeddings and upscaling techniques?

    -The viewer can compare the effectiveness by rendering the same image with and without the negative embeddings and upscaling techniques, observing the differences in detail, texture, and overall quality.

  • What is the main benefit of using these techniques in AI renders?

    -The main benefit is a significant improvement in the quality of the AI renders, with better details, textures, and a more realistic appearance, achieved by avoiding common issues and optimizing the image through upscaling and sharpening.

Outlines

00:00

🎨 Enhancing AI Renders with Negative Embeddings

This paragraph introduces viewers to the concept of negative embeddings for improving AI render quality. It explains that negative embeddings are trained on undesirable image features to guide the AI away from producing similar results. The technique can be applied to various aspects of the image, such as the art style and hand details. The speaker demonstrates how to use negative prompts, like 'bad minus artist' and 'minus anime,' by downloading relevant embeddings and incorporating them into the AI's negative prompt. The paragraph also showcases examples of how negative embeddings can significantly alter an image while enhancing its quality. The weight of each embedding is discussed, with 0.8 being a commonly effective value. The paragraph concludes by showing different AI render versions using negative embeddings, emphasizing the improvement in image quality.

05:01

🔍 Refining Image Quality through Upscaling and Sharpening

The second paragraph delves into the process of upscaling images to enhance their quality further. It begins by explaining the initial step of rendering an image and then doubling its resolution using the image-to-image upscaling method. The paragraph details the use of DPM plus plus and SDE Keras for rendering, with a denoise strength setting of 0.25 to allow for AI introduction of new details. After the first rendering, the image is copied and opened in photo editing software like Affinity Photo. A crucial step involves applying the unsharpen mask filter with one pixel and zero percent settings to sharpen the image and bring out its texture. The paragraph advises saving the sharpened image as a PNG to avoid JPEG artifacts. It then describes re-importing the sharpened image into the AI software, turning off face restore to maintain the optimized facial details, and keeping the same settings for another round of rendering. The benefits of this process are highlighted by a comparison between the original and the sharpened, upscaled image, showing clearer details in clothing and background foliage. The paragraph concludes with a caution against over-sharpening and a suggestion to use the eraser tool to remove any unwanted bright edges that may appear.

Mindmap

Keywords

💡Negative Embeddings

Negative embeddings are a technique used in AI image generation where an embedding model is trained on undesirable or incorrect visual elements to guide the AI to avoid these in the final output. In the context of the video, this method is employed to improve the quality of AI renders by specifying what the image should not look like, thus enhancing the results beyond the standard capabilities of the AI's prompts. For instance, the video mentions using 'bad minus artist' and 'bad hands' as negative embeddings to prevent common issues like incorrect artist styles or poorly rendered hands.

💡AI Renders

AI Renders refer to the process of generating images using artificial intelligence, particularly in the context of creating visual content such as digital art or photorealistic images. The video discusses techniques to enhance the quality of these AI-generated images, making them appear more realistic and accurate. AI renders are the central focus of the video, with the aim of improving their visual appeal and detail.

💡Prompt

In the context of AI image generation, a prompt is a set of instructions or text inputs that guide the AI in creating a specific image. It defines the desired characteristics, style, and elements that should be present in the final render. The video emphasizes the importance of refining prompts with negative embeddings and other techniques to achieve better image quality.

💡Upscaling

Upscaling refers to the process of increasing the resolution of an image, typically to enhance its detail and clarity. In the video, upscaling is used as a technique to improve the quality of AI renders, allowing for higher definition images that can better showcase the details introduced by the AI. The process involves doubling the resolution and using specific software settings to achieve a crisper, more detailed image.

💡Image to Image

Image to Image is a term used to describe a process where an AI model takes an input image and generates a new output image, often with altered characteristics or improved quality. In the video, this concept is applied to the upscaling process, where an initial AI render is used as the input to produce a higher resolution and more detailed image.

💡Denoising

Denoising is the process of reducing or removing noise from an image, which can include artifacts or distortions that detract from the image's clarity and detail. In the context of AI image generation, denoising helps to refine the output and produce a cleaner, more polished final render. The video discusses setting the denoise strength to allow for minor changes while maintaining image quality.

💡Photo Editing Software

Photo editing software are applications used to manipulate and enhance digital images. These tools provide a range of features such as filters, adjustments, and effects to improve the visual quality of images. In the video, photo editing software like Affinity Photo or Photoshop is used to sharpen and unsharpen the AI-generated images, bringing out more texture and detail.

💡Sharpening

Sharpening is a photo editing technique that enhances the contrast of edges within an image, making details appear more defined and clear. It is used to improve the visual quality of images by bringing out finer details and textures. In the context of the video, sharpening is applied to the AI-generated images after upscaling to counteract the blurring effect and to highlight the image's initial texture.

💡Oversharpening

Oversharpening occurs when an image is sharpened to such an extent that it introduces unwanted artifacts, such as bright edges or halos, which can detract from the image's overall quality. It is important to balance the sharpening process to avoid these negative effects. In the video, the creator cautions against oversharpening and provides a solution for correcting it.

💡Face Restore

Face Restore is a feature in some AI image generation software that attempts to improve the quality and clarity of facial features in an image. However, it can sometimes lead to an overly smooth or blurred appearance. In the video, the creator turns off face restore after upscaling and sharpening to maintain the enhanced details and textures introduced by these processes.

💡PNG

PNG, or Portable Network Graphics, is a widely used file format for digital images that supports lossless compression and transparency. It is recommended for saving sharpened images to avoid the introduction of artifacts or degradation of quality that can occur with other file formats like JPEG. In the video, the creator suggests saving the edited image as a PNG to preserve its quality.

Highlights

Negative embeddings can be used to improve AI renders by training an embedding on undesirable image features.

The negative prompt helps in refining the image beyond what can be achieved with the regular prompt alone.

Examples of negative embeddings include 'bad minus artist' and 'bad hands', which are trained on images you don't want your AI to generate.

To use negative embeddings, download them into your AI's embedding folder and reference them in your prompt with their name and minus the .PT extension.

The weight applied to the negative embeddings can influence the effectiveness of the results, with a common weight being 0.8.

Renderings with the same seed but different negative embeddings can significantly vary in quality and detail.

Upscaling is another trick to enhance image quality, which involves increasing the resolution and using specific rendering techniques.

Doubling the resolution of an image can be achieved by using the image to image upscaling feature.

Restoring faces can improve the quality of the AI render, but may also cause slight blurring.

After the initial rendering, use photo editing software like Affinity Photo or Photoshop to further refine the image quality.

Applying a sharpening filter with a setting of one pixel and zero percent can enhance the image's texture and clarity.

Saving the sharpened image as a PNG format prevents JPEG artifacts and maintains image quality.

When re-importing the sharpened image into the AI for further upscaling, turn off face restore to maintain the optimized facial features.

Comparing the original and sharpened upscaling shows an improvement in detail clarity, especially in textures and foliage.

Be cautious of over-sharpening, which can create highlighted edges that need to be manually edited out.

Adjusting the sharpening degree can prevent over-sharpening and maintain the image's natural details.

This method of combining negative embeddings and upscaling techniques provides a powerful tool for achieving ultra-high-quality AI renders.