Remove and Combine Backgrounds with AI
TLDRThis tutorial demonstrates how to remove backgrounds using AI in two platforms, Automatic 1111 and Comfy. It covers installing the Stable Diffusion Web UI extension in Automatic 1111, using different background removal methods, and adjusting settings for optimal results. The video also highlights the power of Comfy for more advanced image processing, including rendering characters and backgrounds separately and combining them with various techniques to achieve a seamless integration.
Takeaways
- 😀 The video demonstrates how to remove backgrounds using AI in two different platforms: Automatic 1111 and Comfy.
- 🔍 In Automatic 1111, a specific extension called 'stable diffusion web UI RMG' is used for background removal.
- 🛠️ The extension in Automatic 1111 doesn't work directly in the text-to-image tab; images must be created first and then processed.
- 🎨 Multiple background removal methods are available, such as U-Net, P-UUNet, and HUNet, with the latter being useful for separating clothing items.
- 👗 For optimal results, avoid clothing that overlaps with the background to prevent incomplete clothing removal.
- 🔍 After generating the image, it's important to inspect the edges and small gaps to ensure the removal is satisfactory.
- 🔧 Adjustments can be made using 'alpha matting' to fine-tune the foreground and background thresholds for better results.
- 🌈 Using a gray studio background is recommended as it doesn't interfere with colors in the image and avoids color spill during background removal.
- 💻 Comfy is more powerful than Automatic 1111 and allows for more complex image processing and background combination.
- 🖼️ The video provides a workflow in Comfy that involves rendering the character separately from the background to prevent color spill.
- 🎨 Three different methods for background removal in Comfy are showcased, including creating a mask, direct background removal, and a simplified method using a composite note.
Q & A
What is the main topic of the video?
-The main topic of the video is demonstrating how to remove backgrounds from images using AI in two different platforms: Automatic 1111 and Comfy.
Who are the additional resources available for in the video?
-The additional resources and workflows are available for the Patreon supporters of the video creator.
What is the name of the extension used for background removal in Automatic 1111?
-The extension used for background removal in Automatic 1111 is called 'stable diffusion web UI RMG'.
How does the background removal process work in Automatic 1111?
-In Automatic 1111, you first create the image, then send it to 'extras', where you can select 'remove background' and generate the image with the background removed as a PNG file.
What are some of the methods for background removal mentioned in the video?
-Some of the methods mentioned for background removal include Uet U net, Uunet, and Human sack. Cloth sack is also mentioned, which separates different clothing items into different parts of the image.
Why is a gray studio background recommended for character images?
-A gray studio background is recommended because it doesn't interfere with the colors in the image and doesn't leave color impressions around the hair when the background is removed.
What is the benefit of using Comfy over Automatic 1111 for background removal?
-Comfy is more powerful than Automatic 1111 because it offers more choices and allows for better control over the background removal process, including the ability to adjust the foreground and background thresholds and erode size.
What are the limitations of the background removal method shown in the video?
-The method shown has limitations such as not changing the perspective of the room or the person, and not altering light colors on the person to match the background lighting.
How can the final image be improved in Comfy?
-The final image can be improved by combining the character and background images using various notes and adjusting the prompt to create a more cohesive result.
What does the video suggest for checking the quality of background removal?
-The video suggests checking the edges, small gaps, and areas like between the arms or hands and the background to ensure the removal has worked well.
What is the role of 'D noise' in the final rendering process?
-D noise is used in the final rendering process to slightly change the image and help it blend better with the background without the need for a strong noise level.
Outlines
🎨 Background Removal in AI Art Software
The script introduces a tutorial on how to remove backgrounds from images using the AI-powered software 'Automatic 1111' and 'Comfy'. It highlights the use of the 'Stable Diffusion Web UI' extension in 'Automatic 1111' for background removal, explaining the process of installing and applying the extension. The tutorial also covers the selection of different background removal methods such as 'U-Net', 'P-UUNet', and 'Human-Sack', with a focus on the importance of clothing not overlapping in the image for accurate results. It advises on checking the quality of the removal, adjusting alpha matting values for foreground and background thresholds, and using an 'erode size' setting to refine detail levels. The benefits of using a gray studio background to avoid color interference during background removal are also discussed. The tutorial then transitions to 'Comfy', where a more powerful workflow is introduced, starting with rendering a character against a gray background to prevent color spilling.
🖼️ Advanced Background Removal Techniques in Comfy
This paragraph delves into advanced background removal techniques available in 'Comfy', starting with the separation of character and background to avoid color spilling, which is crucial for combining clothing colors with any background colors. The script outlines three different methods for background removal: using a 'Layer Style' pack to create a mask, a 'Vas Not' pack for actual background removal resulting in a PNG with a removed background, and a 'Mixlab Pack' that simplifies the process by offering different methods without the need for settings adjustment. The paragraph also discusses the limitations of these methods, such as not changing the perspective or light colors on the person, and suggests further refinements like overlaying with an ambient light layer for more complex results. The tutorial concludes with a demonstration of combining images and rendering them with a 'D noise' level to blend the character with the background, resulting in a more cohesive final image.
Mindmap
Keywords
💡Background Removal
💡AI (Artificial Intelligence)
💡Automatic 1111
💡Extensions
💡Stable Diffusion Web UI RMG
💡Foreground and Background
💡PNG
💡Threshold
💡Erosion
💡Gray Studio Background
💡Comfy
💡Mask
Highlights
Introduction to powerful AI for background removal in Automatic 1111 and comfi.
Automatic 1111 extension called 'stable diffusion web UI RMG' for background removal.
Instructions on installing and applying the 'stable diffusion web UI RMG' extension.
Limitation of the extension that it doesn't work directly in the text to image tab.
Process of creating an image first and then removing the background using 'send to extras'.
Different methods of background removal such as U-Net, P-UUNet, Human-Sack, and Cloth-Sack.
Cloth-Sack method's ability to split different clothing items into separate parts.
Importance of avoiding overlays in clothing for accurate background removal.
How to generate an image with a removed background as a PNG download.
Checking the edges and small gaps for a good background removal result.
Adjusting alpha matting values for foreground and background threshold.
Using an erode size setting to adjust detail level in background removal.
Advantages of using a gray studio background for non-interference with colors.
Transition to using comfi for more powerful background removal and combination.
Workflow preparation in comfi with character rendering and background combination.
Explanation of rendering a character in a studio on a gray background for color separation.
Using different comfi packs for background removal: Layer Style, VAS Not, and Mixlab Pack.
Layer Style pack's method of creating a mask for background removal.
VAS Not pack's direct background removal method providing a PNG with no background.
Mixlab Pack's easy method of choosing between different background removal techniques.
Final step of combining images and rendering over them for a better blend.
Limitations of the method such as not changing perspective or light colors on the person.
Encouragement to explore more complex and refined results in comfi.