Gift Chroma Master · 边缘清理
Where your hairline survives the key
- keyer_state
- effect_mask
- cleaner_state
- clean_matte
Every chroma key has the same two wounds: the raw matte chews through fine detail, and on video the matte edge shimmers frame to frame. GiftChromaMasterCleaner is the expert-chain node that treats those two problems, and only those - it's stage two of the suite's three-stage chain (after the Keyer, before the Despill). If you've seen the flagship GiftChromaMaster's detail_recovery and reduce_chatter knobs, this is where those live in their full form.
It's a surgical node, not a magic one. The key insight from the code is that the cleaner only operates in the edge band - the pixels where the matte is between 0 and 1. Solid foreground and solid background are left alone, which is exactly what you want: edge work shouldn't cost you interior detail.
Inputs, the ones that do things
keyer_state- required, and the whole point of the expert chain. You can't use this node standalone; it needs the state object fromGiftChromaMasterKeyer(the sampled screen color and raw matte travel inside it).strength(default 0.72) - how aggressively the cleaner reshapes the edge band. This is the master intensity.detail_recovery(default 0.58) - how much hair/smoke/glass the cleaner tries to pull back from the edge. Crank it toward 0.9 when thin stuff is disappearing, back it off when the matte gets noisy.edge_radius(default 3) - the width of the edge band it works on. Wider = more haloing potential.alpha_contrast(default 0.04) - subtle matte contrast; negative softens, positive hardens.reduce_chatter(default 0.35) - the temporal stabilizer. This is the video-only anti-flicker: it damps frame-to-frame matte wobble.temporal_modegates it (faston,offoff). Turnofffor stills or you're just paying for smoothing that does nothing.
Two advanced inputs you can ignore until they bite: motion_threshold and scene_cut_threshold, which tell the temporal stabilizer when motion is real motion versus matte noise, and when a frame difference is a cut (so it doesn't smear the screen-color state across a scene change).
Outputs
cleaner_state- state forward toGiftChromaMasterDespillor the diagnostics node.clean_matte- the cleaned opacity mask, 1=foreground. Wire it intoGiftChromaMasterPreviewto actually see what you've saved.
The usual tuning path
Follow the README's ordering and don't start here. Fix the base matte first (screen_gain, clip_black), then come to this node only for the edge. The suite's own recipe for detail that's being eaten: clip_black 0.015–0.040, clip_rollback 0.35–0.65 (set upstream in the Keyer), then detail_recovery 0.70–0.90 here, with shrink_grow_px near 0. If the matte gets hairy instead, back off strength and detail_recovery together - they compound.
One honest warning: this node is not a rescuer of bad footage. It recovers edge detail that the keyer destroyed; it can't invent structure that was never captured, and it can't fix a green fringe (that's the Despill's job). If the clip is short enough that you could key it in an editor, you probably should - this chain earns its keep on batches of frames, where manual cleanup isn't an option.
Install as usual: ComfyUI Manager (search "ComfyUI-GiftHelperSuite") or clone https://github.com/lingziwyh/ComfyUI-GiftHelperSuite.git into custom_nodes, restart, no pip deps. For a finished result on a normal video, you still want the full chain - the flagship does all three stages in one go, and the README is explicit that the expert nodes are for short diagnostic batches.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| keyer_state | GIFT_CHROMA_MASTER_STATE | — | |
| edge_radius | FLOAT | 3.00–64 | — |
| strength | FLOAT | 0.720–1 | — |
| alpha_contrast | FLOAT | 0.04-1–1 | — |
| detail_recovery | FLOAT | 0.580–1 | — |
| temporal_mode | COMBO | fast | 2 options: off, fast |
| reduce_chatter | FLOAT | 0.350–1 | — |
| motion_threshold | FLOAT | 0.0800.001–1 | — |
| scene_cut_threshold | FLOAT | 0.1800.001–1 | — |
| effect_maskopt | MASK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| cleaner_state | GIFT_CHROMA_MASTER_STATE | 传给 Gift Chroma Master Despill/诊断节点的清理状态。 |
| clean_matte | MASK | 1=前景的清理后不透明度遮罩。 |