Home

Awesome

Custom Nodes for ComfyUI: CLIPSeg and CombineSegMasks

This repository contains two custom nodes for ComfyUI that utilize the CLIPSeg model to generate masks for image inpainting tasks based on text prompts.

1. CLIPSeg

The CLIPSeg node generates a binary mask for a given input image and text prompt.

Inputs:

Outputs:

2. CombineSegMasks

The CombineSegMasks node combines two or optionally three masks into a single mask to improve masking of different areas.

Inputs:

Outputs:

Installation

To use these custom nodes in your ComfyUI project, follow these steps:

  1. Clone this repository or download the source code.
  2. Put the clipseg.py file into your custom_nodes directory
  3. ???
  4. Profit

Usage

Below is an example for the intended workflow. The json file for the example can be found inside the 'workflow' directory

Requirements

Make sure that you have the required libraries installed to the venv of ComfyUI.