Extensions/comfyui-kepri-nodes-pack
ComfyUI Extension

comfyui-kepri-nodes-pack

A lightweight ComfyUI custom-node pack for the Kepri Background Removal V2 pipeline containing mask merge and image finalization nodes.

By wearekhepri·Created 3 months ago·Updated about a month ago· 1
wearekhepri/comfyui-kepri-nodes-pack
Nodes5
On cloudLocal install
CategoryKepri/Background
Stars1
Updatedabout a month ago
Readme

ComfyUI Kepri Nodes Pack

A collection of ComfyUI custom nodes developed by Kepri (an inventory and cross-listing app for fashion resellers).

We build these nodes for our own production backend pipelines (deployed on Modal / RunPod via FastAPI). They power our automated image processing, 3D asset generation, and inventory management workflows.

They are designed to be lightweight, zero-dependency (only torch), and suited for API-driven ComfyUI workflows where every parameter needs to be exposed and configurable programmatically.


Installation

cd ComfyUI/custom_nodes
git clone https://github.com/wearekhepri/comfyui-kepri.git

Restart ComfyUI and refresh your browser. The nodes will appear under the Kepri category in the Add Node menu.

Note: Zero extra dependencies required. The nodes use the torch version already shipped with your ComfyUI environment.


Included Nodes

| Node Name | Category | Description | Documentation | |---|---|---|---| | KepriMaskMerge | Segmentation | Merges multiple detection masks into a single unified mask. Solves the problem of multi-part objects (like shoes) being cropped incorrectly by downstream nodes. | Read Docs | | KepriImageFinalize | Image Processing | One-stop image finalisation. Resizes by longest edge, crops/pads to a specific aspect ratio, and composites the result onto transparent, solid color, or photo backgrounds. | Read Docs |

(We will continuously add more nodes here as we develop our internal 2D and 3D pipelines).


Example: Background Removal Pipeline

While these nodes are general-purpose, here is an example of how they fit into a production graph (our automated Background Removal and Product Centering pipeline):

LoadImage
    -> ResizeImagesByLongerEdge
        -> GroundingDetector (prompt = "shoe")
            -> masks [N, H, W]
                -> [KepriMaskMerge]
                    -> merged_mask [1, H, W]
                        -> GrowMask
                            -> MaskBoundingBox+
                                -> RMBG-2.0 (background removal)
                                    -> [KepriImageFinalize]
                                        -> image (final product photo)
                                        -> mask (alpha if transparent)
                                            -> SaveImage

License

MIT License.