🛏️ Bedroom Furniture Mask
Bedroom Furniture Mask is a color-key matcher, not an AI segmenter
- image
- MASK
Let's get the uncomfortable part out of the way: this node does not "segment any bedroom interior." No model runs, nothing is detected, nothing is inferred. What it does is scan an image for a handful of specific RGB colors and turn every matching pixel into one mask. It's a color-key filter wearing a segmentation costume.
That isn't automatically useless. It just means the image you feed it has to already be a segmentation map - specifically one painted with the ADE20K palette, the standard 150-class color coding used by OneFormer, SegFormer, Semantic-SAM and friends. Those nodes output images where every pixel is a flat color: beds are (204,5,255), chairs are (204,70,3), mirrors are (220,220,220), and so on. BedroomFurnitureMask takes that painted map and keeps only the pixels whose color matches a furniture class. It's the "keep just the furniture, drop the wall and floor" step.
How it works
The source is refreshingly small. The node holds a FURNITURE_ITEMS list of about twenty bedroom-y classes (bed, cabinet, chair, mirror, rug, lamp, pillow, curtain, table, ottoman, chest of drawers…), looks up each one's RGB code in a hardcoded COLOR_CODES table, and builds a per-pixel range around it:
lower = color - threshold
upper = color + threshold
mask = (pixels >= lower) & (pixels <= upper)
Every class match gets OR-ed into a single boolean tensor, returned as a float MASK. Pure torch, no models, no downloads, runs in milliseconds. The threshold parameter is the tolerance in RGB distance around each class color - default 10 absorbs JPEG and compression bleed around the flat palette colors.
The inputs and output that matter
image(IMAGE): the ADE20K-coded map, not your raw bedroom photo.threshold(INT, default 10, range 0–255): match tolerance. Keep it low (0–15) for clean palette input, nudge it up if your segmenter's output is lossy. Crank it too high and real-photo colors start landing inside a class's color band - instant false positives.
Output is a single MASK, which wires into anything that takes a mask: inpaint, IC-Light, a relight pass, or a composite. Note it's flagged as an output node, so ComfyUI treats it as a preview target, but the MASK is still connectable.
Installing it
ComfyUI Manager: search "Segment Any Bedroom Interior" (or just "Bedroom"). Otherwise:
cd ComfyUI/custom_nodes
git clone https://github.com/NguynHungNguyen/Segment-Bedroom-Interior
then restart ComfyUI. No model files, no checkpoints. The one real gotcha: requirements.txt lists numba, colour-science, rembg, pixeloe, and transparent-background - heavy stuff, and rembg/transparent-background drag in model downloads and onnxruntime. The node's actual code imports only torch. The README is a template (its clone command is literally your-repository-link), and the pyproject is a leftover from the author's "Lyra_room" project, so this list is baggage, not a need. If Manager stalls installing transparent-background, it's safe to let it finish or skip it - the node never touches it.
Where people get burned
Feeding it a real photo is the classic mistake: you get a nearly empty black mask, because bedroom photos aren't painted in palette colors. You need the segmenter in front of it first. And honestly - if you have a segmenter with an ADE20K output, you could usually filter the mask there and skip this node entirely. For grabbing the furniture region of a bedroom map it works fine; for anything else, a proper SAM or BiRefNet path (see the KB's background-removal essay) will serve you better. Treat this as a niche utility: it does exactly one small job, cheaply.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| threshold | INT | 100–255 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |