Nodes/ComfyUI-GiftHelperSuite/Gift Chroma Master · 边缘清理
ComfyUI Node

Gift Chroma Master · 边缘清理

Where your hairline survives the key

By lingziwyh·Created 5 months ago·Updated 12 days ago· 7
Gift Chroma Master · 边缘清理
  • keyer_state
  • effect_mask
  • cleaner_state
  • clean_matte
edge_radius3.0
strength0.72
alpha_contrast0.04
detail_recovery0.58
temporal_modefast
reduce_chatter0.35
motion_threshold0.080
scene_cut_threshold0.180

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 from GiftChromaMasterKeyer (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_mode gates it (fast on, off off). Turn off for 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 to GiftChromaMasterDespill or the diagnostics node.
  • clean_matte - the cleaned opacity mask, 1=foreground. Wire it into GiftChromaMasterPreview to 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.

CategoryGiftHelperSuite/Chroma

Inputs (10)

NameTypeDefaultDescription
keyer_stateGIFT_CHROMA_MASTER_STATE
edge_radiusFLOAT3.00–64
strengthFLOAT0.720–1
alpha_contrastFLOAT0.04-1–1
detail_recoveryFLOAT0.580–1
temporal_modeCOMBOfast2 options: off, fast
reduce_chatterFLOAT0.350–1
motion_thresholdFLOAT0.0800.001–1
scene_cut_thresholdFLOAT0.1800.001–1
effect_maskoptMASK

Outputs (2)

NameTypeDescription
cleaner_stateGIFT_CHROMA_MASTER_STATE传给 Gift Chroma Master Despill/诊断节点的清理状态。
clean_matteMASK1=前景的清理后不透明度遮罩。