How to Use the a-person-mask-generator for Automatic1111 and ComfyUI

Jul 29, 2021 | Data Science

The a-person-mask-generator extension provides a seamless way to create masks for various aspects like Background, Hair, Body, Face, and Clothes using Automatic1111 and ComfyUI. It leverages the robust multi-class selfie segmentation model developed by Google, ensuring high accuracy and efficiency. In this guide, we will walk you through the installation process and demonstrate how you can use the extension effectively.

Updates

  • 2024-05-26 – Added facial landmark mask outputs for ComfyUI
  • 2024-05-25 – Fixed ComfyUI requirements and install
  • 2024-01-01 – Added ComfyUI support
  • 2023-11-16 – Initial release

Installation Instructions

For Automatic1111 Web UI

  1. Open the Extensions tab.
  2. Click on the Install from URL tab.
  3. Input https://github.com/djbielejeskia-person-mask-generator.git in the URL for the extensions git repository.
  4. Press the Install button.
  5. Wait for 5 seconds until you see the message indicating successful installation.
  6. Use the Installed tab to restart the UI.
  7. Check for updates in the Installed tab and apply them, then restart the UI.
  8. Finally, restart the A1111 web UI, which may also require restarting your terminal (a simple computer reboot works if you’re unsure).

For ComfyUI

  1. Open your CMD window and navigate to your ComfyUI folder, then enter the custom_nodes folder.
  2. Run the following command: git clone https://github.com/djbielejeskia-person-mask-generator
  3. Restart ComfyUI.

Using the a-person-mask-generator

Examples from Automatic1111

After installation, you can generate masks for different parts of an image:

  • Face: ![Face](readme01-face.png)
  • Face + Body: ![Face + Body](readme02-face+body.png)
  • Clothes + Hair: ![Clothes + Hair](readme03-clothes+hair.png)
  • Mask Settings: ![Mask Settings](readme04-mask-settings.png)

ComfyUI Examples

Here’s how to organize your workflow in ComfyUI:

For optimal results, use masks in the following order:

  1. Face
  2. Background
  3. Body + Clothes
  4. Hair

Workflow Example: Drag the embedded image into ComfyUI to use:

![Workflow](readmeComfyUI-workflow.png)

Facial Landmarks in ComfyUI

For advanced users, you can also work with facial landmarks in the following manner:

![Facial Landmarks](readmeComfyUI-Workflow-FaceLandmarks.png)

Troubleshooting

If you encounter issues during installation or functionality, try the following:

  • Ensure your internet connection is stable while installing the extension from URL.
  • Double-check the URL for accuracy when cloning the repository in ComfyUI.
  • If the extension is not appearing or working, restarting your computer can often resolve hidden issues with updates.
  • Make sure all dependencies for Automatic1111 and ComfyUI are correctly installed and updated.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox