๐ฉโโข Green Screen to Transparency
Chroma-key a green background out to alpha
- image
- IMAGE
This node does old-school chroma keying: it takes an image with a green background and replaces the green with transparency, giving you a cutout with an alpha channel. In the pack's menu it's "Green Screen to Transparency."
Why would you generate on a green screen in the first place? Because it's a cheap, reliable way to get a clean subject you can composite onto anything. Prompt your subject "on a green screen background," run it through this node, and you've got a transparent cutout ready to drop onto a new scene - no AI background-removal model required. It pairs naturally with the pack's "Stack two images (Background + Overlay)" node for the compositing step.
How it works
It's a straightforward color key, not a smart segmentation model. It looks at each pixel, and pixels close enough to green get turned transparent. How close counts as "green" is controlled by the threshold. The author is upfront that this is a very basic node - it keys on color, full stop. It has no edge feathering, no spill suppression, none of the finesse a real compositing tool brings.
The inputs and outputs that matter
image- the green-screen image to key.threshold- how aggressively green gets removed (0 to 1, default 0.1). Too low and green fringing survives around the edges; too high and it starts eating green-ish parts of your actual subject. Nudge it until the background is gone but the subject is intact.
Output is a single IMAGE with an alpha channel. This is an output node, so it caps a branch - but you can also feed the result into a compositing node.
How to install it
ComfyUI Manager: search Bjornulf_custom_nodes, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/justUmen/Bjornulf_custom_nodes
Restart ComfyUI. Pure image op, no heavy dependencies needed.
Common issues
The result is only as good as the green screen. The author says it plainly: you need a clean green background. If your generated green screen is uneven, has shadows, or the subject wears anything green, this node will struggle - it can't tell a green shirt from a green wall. Expect green fringing on hair and soft edges, because there's no spill suppression here.
For a forgiving subject on a solid, even green field, it works fine and it's fast. For anything harder - fine hair, semi-transparent edges, messy backgrounds - you'll get cleaner cutouts from an actual background-removal model like rembg or BiRefNet. Think of this as the quick-and-dirty option, not the precision tool. Also remember ComfyUI's default Load Image node drops alpha, so if you save and reload the cutout, use a transparency-aware loader to keep the transparency.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | โ | |
| threshold | FLOAT | 0.100โ1 | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | โ |