Geeky RemB v4.0 - Ultimate AI Background Removal & Video Layering
One node that cuts out your subject, drops it on a new background, and animates it — for better or worse
- foreground
- background
- composite_result
- foreground_mask
- foreground_removed_bg
If your only goal is to cut a person out of a photo, you don't need this node - ComfyUI ships BiRefNet natively these days, and a native Image Remove Background plus a composite node does the same job with fewer surprises. What GeekyRemB is actually for is the all-in-one move: feed it a foreground and a background, and it cuts the subject out, scales, rotates, repositions and blends it onto the new scene, even animates it across a frame sequence, all in a single pass. That's a workflow that normally takes four or five nodes. It's a kitchen sink, and like most kitchen sinks it does the core job well and lets the accessories get ahead of the marketing.
The honest read first
The README is a masterpiece of overstatement. "Multimodal processing", "physics-aware generation", "self-optimizing workflows" - none of that is in the shipped code. What's actually there is one node (GeekyRemB, ~950 lines) that wraps real models: BiRefNet for cutting, rembg's RMBG-1.4 as an alternative, and an OpenCV chroma keyer. Same story with the 15+ blend modes: in the source, only multiply, screen and overlay do their own math; the rest fall through to a plain alpha blend. Call it a comfortable wrapper, not a revolution, and you'll set your expectations right. The node itself is MIT, and the models underneath (BiRefNet, RMBG, rembg) are all open with no commercial gotchas.
How it works
Pick removal_method. The default rmbg_v2_birefnet (and birefnet_zhengpeng7) loads BiRefNet through HuggingFace transformers from the cocktailpeanut/rm repo, resizes your image to 1024 square internally, and upscales the mask back - which means the model caps how fine those hair edges can get no matter what processing_resolution you set. rmbg_v1_4_briaai uses rembg's ONNX session. chroma_key_advanced is pure HSV keying with spill suppression, and hybrid_ai_chroma blends a BiRefNet mask 70/30 with a chroma mask.
Then the compositor takes over: 12 position_mode choices, scale_x/scale_y, rotation, flips, opacity, and the animation_type/easing_function pair for motion over a frame batch. "Video" here means it loops over the batch dimension of your IMAGE tensor - pipe in frames from VHS Load Video and you get a batch of composited frames back. It's frame-consistent, not fancy.
The inputs that actually matter
foregroundandbackground- both required IMAGE inputs. Nothing happens without both.removal_method- the quality switch. BiRefNet for hard edges, RMBG-1.4 when you want speed, chroma key when you shot on a green screen.skip_background_removal- set this when your foreground already has an alpha channel (e.g. from LayerDiffusion) and you only want compositing.mask_blur/edge_feathering- your edge-quality levers; feather 2–5 for hair, leave the rest alone.blend_mode/opacity- for compositing into the scene rather than just pasting.
Outputs are composite_result (the merged image), foreground_mask, and foreground_removed_bg (the cutout with alpha) - wire composite_result to Save Image and you're done.
Installing it
ComfyUI Manager, search "GeekyRemB", install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/GeekyGhost/ComfyUI-GeekyRemB.git
cd ComfyUI-GeekyRemB
pip install -r requirements.txt
Two install gotchas. First, the requirements file has onnxruntime-gpu>=1.16.0 listed with a comment saying "uncomment if using GPU" - but it's not commented, so a CPU-only machine will try to install the CUDA build and can fail at import. Swap it for plain onnxruntime if you have no GPU. Second, the first run downloads models: BiRefNet into your HuggingFace cache and the RMBG-1.4 ONNX into ~/.u2net. Give it a minute and let it finish - don't cancel.
Where people get burned
The big one is silent failure. If anything inside throws - model download fails, CUDA issue, weird input - the node catches it and returns your unprocessed background as the composite, so you get a result that looks fine and is completely wrong. Keep the ComfyUI console open on first run; the errors land there. Also note that because the mask output is built as an RGB image tensor, treating foreground_mask as a true single-channel MASK can misbehave downstream - prefer the foreground_removed_bg RGBA output for further compositing. And remember: 1024 is the BiRefNet ceiling here, so for 4K source you're still getting 1024-model edges. For a genuinely overengineered single node, it works surprisingly well for the cut-and-place workflow - just don't buy the "ultimate" part.
Inputs (41)
| Name | Type | Default | Description |
|---|---|---|---|
| foreground | IMAGE | — | |
| background | IMAGE | — | |
| skip_background_removal | BOOLEAN | false | — |
| removal_method | COMBO | rmbg_v2_birefnet | 5 options: rmbg_v2_birefnet, rmbg_v1_4_briaai, birefnet_zhengpeng7, chroma_key_advanced, hybrid_ai_chroma |
| chroma_color | COMBO | green | 3 options: green, blue, red |
| chroma_tolerance | FLOAT | 0.150–1 | — |
| chroma_softness | FLOAT | 0.80–2 | — |
| spill_suppression | FLOAT | 0.90–1 | — |
| position_mode | COMBO | center | 12 options: absolute_pixels, relative_percent, center, top_left, top_center, top_right, +6 |
| x_position | FLOAT | 0-4000–4000 | — |
| y_position | FLOAT | 0-4000–4000 | — |
| scale_x | FLOAT | 1.000.1–5 | — |
| scale_y | FLOAT | 1.000.1–5 | — |
| rotation | FLOAT | 0-360–360 | — |
| blend_mode | COMBO | normal | 14 options: normal, multiply, screen, overlay, soft_light, hard_light, +8 |
| opacity | FLOAT | 1.000–1 | — |
| animation_type | COMBO | none | 22 options: none, slide_left, slide_right, slide_up, slide_down, slide_diagonal, +16 |
| animation_duration | FLOAT | 2.00.1–10 | — |
| animation_amplitude | FLOAT | 1000–1000 | — |
| easing_function | COMBO | ease_in_out_quad | 8 options: linear, ease_in_quad, ease_out_quad, ease_in_out_quad, elastic_out, bounce_out, +2 |
| anchor_xopt | FLOAT | 0.500–1 | — |
| anchor_yopt | FLOAT | 0.500–1 | — |
| flip_horizontalopt | BOOLEAN | false | — |
| flip_verticalopt | BOOLEAN | false | — |
| mask_bluropt | FLOAT | 1.50–10 | — |
| edge_featheringopt | FLOAT | 3.00–20 | — |
| remove_small_objectsopt | BOOLEAN | true | — |
| drop_shadowopt | BOOLEAN | false | — |
| shadow_offset_xopt | FLOAT | 5-50–50 | — |
| shadow_offset_yopt | FLOAT | 5-50–50 | — |
| shadow_bluropt | FLOAT | 100–50 | — |
| shadow_opacityopt | FLOAT | 0.500–1 | — |
| animation_frequencyopt | FLOAT | 1.00.1–5 | — |
| animation_loopsopt | INT | 1-1–20 | — |
| ping_pongopt | BOOLEAN | false | — |
| start_delayopt | FLOAT | 0.00–5 | — |
| video_fpsopt | FLOAT | 241–60 | — |
| total_framesopt | INT | 00–2000 | — |
| processing_resolutionopt | INT | 1024256–2048 | — |
| use_gpu_accelerationopt | BOOLEAN | true | — |
| batch_processingopt | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| composite_result | IMAGE | — |
| foreground_mask | MASK | — |
| foreground_removed_bg | IMAGE | — |