Negative Embeddings - ULTRA QUALITY Trick for A1111

Olivio Sarikas
14 Apr 202306:33

TLDRThe video script introduces two techniques to enhance AI-generated images: negative embeddings and upscaling. Negative embeddings involve using an embedding trained on undesired image features to refine the AI prompt, improving the final render. Upscaling is achieved by doubling the image resolution and using a specific rendering process, followed by sharpening in photo editing software to enhance details and textures. The video demonstrates how these methods can significantly improve image quality, offering a clear before-and-after comparison.

Takeaways

  • 🎨 Use negative embeddings to improve AI renders by training the embedding on undesirable image features.
  • 📝 Add negative prompts to your AI rendering process, such as 'bad artist' or 'bad hands', to refine the output.
  • 🔄 Download and integrate negative embeddings into your AI rendering software's embedding folder for direct use.
  • 🖌️ Utilize specific embedding names in the negative prompt, excluding the '.PT' file extension.
  • 🔢 Apply a weight (e.g., 0.8) to the negative embeddings to control their influence on the AI rendering results.
  • 📸 Experiment with different negative embeddings to see which ones yield the best improvements in image quality.
  • 🔎 Double the resolution of your initial image for upscaling to enhance the final quality.
  • 🖥️ Use image-to-image upscaling with tools like DPM++ SDE Keras and adjust settings for optimal results.
  • 🌟 Sharpen the upscaled image using photo editing software like Affinity Photo or Photoshop to bring out more details.
  • 🛠️ Be cautious of over-sharpening, especially around edges, and adjust the sharpening settings or manually correct any issues.
  • 🎞️ Compare the original and sharpened images to appreciate the enhanced details and texture achieved through the sharpening process.

Q & A

  • What is the purpose of using negative embeddings in AI image generation?

    -Negative embeddings are used to improve the quality of AI-generated images by training on undesirable attributes or qualities and then including these in the negative prompt. This helps in avoiding certain styles, errors, or unwanted features in the generated images, leading to better results.

  • How are negative embeddings implemented in the prompt for image generation?

    -Negative embeddings are included in the prompt by using the name of the embedding, excluding the '.pt' extension, and enclosing it in pointy brackets. These are specified in the negative prompt section, along with a weight (e.g., :0.8) that determines the influence of the negative embedding on the image generation.

  • What kind of adjustments can be controlled by negative embeddings in AI renders?

    -Negative embeddings can control various aspects such as the art style, the quality of specific elements like hands, and general prompt-related improvements. They help in fixing issues beyond what can be achieved through prompt adjustments alone.

  • What is the significance of the weight applied to negative embeddings in the prompt?

    -The weight (e.g., :0.8) applied to negative embeddings in the prompt determines the degree of influence these embeddings have on the generated image. Adjusting this weight allows for fine-tuning the impact of the negative attributes to achieve the desired quality in the final image.

  • How does upscaling improve the quality of AI-generated images?

    -Upscaling improves the quality of AI-generated images by increasing their resolution, which makes the images appear clearer and more detailed. This process involves rendering the image at a higher resolution and applying techniques to enhance its clarity and detail.

  • What is the role of image-to-image upscaling in enhancing AI renders?

    -Image-to-image upscaling plays a crucial role in enhancing AI renders by allowing for the introduction of new details and improvements in image quality through increased resolution and subsequent refinement steps such as denoising and applying specific rendering techniques.

  • How can sharpening filters contribute to the final quality of upscaled images?

    -Sharpening filters contribute to the final quality of upscaled images by enhancing their clarity and bringing out more texture. By applying a sharpening filter, such as the unsharp mask with specific settings, the images gain improved sharpness and detail, particularly noticeable in textures and edges.

  • What is the recommended file format for saving the sharpened and upscaled images, and why?

    -The recommended file format for saving the sharpened and upscaled images is PNG. This format is preferred because it avoids the introduction of JPEG artifacts, ensuring the image retains its quality and clarity throughout the editing and saving process.

  • Why is it important to turn off face restore during the final rendering of the sharpened and upscaled image?

    -Turning off face restore during the final rendering of the sharpened and upscaled image is important because face restore can blur the face, reducing the detail and clarity achieved through sharpening and upscaling. By omitting face restore, the facial details are preserved, maintaining the improved quality.

  • How should over-sharpening be addressed in the final stages of image editing?

    -Over-sharpening should be addressed by carefully adjusting the sharpening settings to avoid excessive edge enhancement and by using eraser tools to remove unwanted sharp edges manually. If over-sharpened edges are visible, layering the original image and selectively erasing the over-sharpened areas can restore balance without compromising overall sharpness.

Outlines

00:00

🎨 Enhancing AI Renders with Negative Embeddings

This paragraph introduces the technique of using negative embeddings to improve the quality of AI-generated images. It explains that negative embeddings are trained on undesirable image features to guide the AI to avoid these aspects, thereby enhancing the final render. The method can be applied to various aspects of the image, such as the art style and the depiction of hands. The speaker demonstrates how to incorporate these embeddings into the AI's negative prompt by downloading them and using their names in the prompt. The weight applied to the negative embeddings is also discussed, with a recommendation to use a value of 0.8 for optimal results. The paragraph concludes by showing examples of how negative embeddings can significantly alter an image while maintaining or improving its quality.

05:01

🔍 Upscaling Images for Enhanced Quality

The second paragraph focuses on the process of upscaling images to achieve higher quality outputs. It begins by explaining the initial step of rendering an image at a lower resolution and then doubling it using the image-to-image upscaling feature. The paragraph details the use of DPM plus plus and SDE Keras for rendering, along with a recommended denoise strength setting of 0.25 to allow for AI introduction of new details. After the first rendering, the image is edited in photo editing software to sharpen it and bring out more texture, using a specific setting of one pixel and zero percent for the unsharp mask filter. The paragraph emphasizes the importance of saving the sharpened image as a PNG to avoid JPEG artifacts. It concludes with a discussion on the potential issue of over-sharpening and how to correct it, as well as a comparison between the original and sharpened images to demonstrate the effectiveness of the technique.

Mindmap

Keywords

💡Negative Embeddings

Negative embeddings refer to a machine learning technique where an embedding model is trained on undesirable data or 'bad things' to avoid certain outcomes in the final result. In the context of the video, this technique is used to improve AI renders by incorporating these embeddings into the negative prompt, which helps guide the AI to produce better images by avoiding common pitfalls. For instance, the speaker mentions using 'bad minus artist' and 'bad hands' to correct issues with the art style and anatomy in AI-generated images.

💡AI Renders

AI renders are the output images generated by artificial intelligence algorithms, often used in the context of creating art or visual content. These renders are the primary focus of the video, where the speaker aims to enhance their quality using various techniques. The term is closely related to the process of training AI models to produce images that meet certain aesthetic or stylistic criteria.

💡Prompt

In the context of AI-generated images, a prompt is a set of instructions or text inputs that guide the AI in creating a specific output. The prompt is crucial in determining the style, content, and quality of the AI render. The video discusses using negative prompts to exclude undesired features and improve the final image.

💡Upscaling

Upscaling refers to the process of increasing the resolution of an image, typically to enhance its quality and detail. In the video, upscaling is used as a technique to improve the quality of AI renders by doubling the image's resolution and then applying additional processing to refine the details.

💡DPM Plus Plus

DPM Plus Plus is a deep learning model used for upscaling images, particularly in the context of AI-generated content. It is mentioned as the tool the speaker uses to upscale the resolution of the AI renders, which helps in restoring facial details and improving overall image quality.

💡Sharpening

Sharpening is a post-processing technique used to enhance the contrast along the edges within an image, making it appear more defined and detailed. In the video, the speaker uses sharpening on the upscaled images to bring out more of the initial texture and improve the visual quality.

💡Denoise Strength

Denoise strength is a parameter used in image rendering processes to control the level of noise reduction applied to the image. A lower denoise strength allows for more detail and variation in the final render, while a higher value would result in a smoother image with less detail. In the context of the video, the speaker sets the denoise strength to 0.25 to achieve a balance between similarity to the original and the introduction of new details.

💡Face Restore

Face restore is a feature in image editing software that attempts to improve or clarify facial features in an image. In the video, the speaker initially uses this feature during upscaling but later turns it off for the sharpened image to prevent blurring and over-optimization of the facial details.

💡Affinity Photo

Affinity Photo is a professional photo editing software used for various image manipulation tasks, including sharpening and upscaling. In the video, the speaker uses Affinity Photo to sharpen the upscaled AI renders and improve their texture and detail.

💡PNG

PNG, or Portable Network Graphics, is a widely used file format for images that supports lossless compression and transparency. In the video, the speaker recommends saving the sharpened image as a PNG file to prevent any loss of quality due to JPEG compression artifacts.

💡Oversharpening

Oversharpening is the result of applying too much sharpening to an image, which can lead to unnaturally high contrast along edges and other unwanted visual artifacts. The video warns against this effect and provides tips on how to correct it by reducing the sharpening degree or removing the highlighted edges.

Highlights

Introduction to enhancing AI image renders with two tricks.

Explanation of negative embeddings for improving image quality.

Utilizing negative prompts to correct art style, hands, and prompt quality.

Examples of negative prompts including 'bad artist' and 'bad hands'.

How to download and use negative embeddings in AI renders.

Incorporating embeddings into the prompt with specific notation.

Adjusting the weight of negative embeddings for optimal results.

Introduction to the upscaling trick for improved image quality.

Using image-to-image upscaling to double the resolution of renders.

Technique for introducing new details with adjusted denoise strength.

Sharpening upscaled images for enhanced texture and detail.

Comparison of original and sharpened upscaled images to showcase improvements.

Advice on avoiding over-sharpening and how to correct it.

Conclusion and invitation for feedback.

End screen promotion for further engagement.