CD · Quality Gate
A yes/no gate so bad takes never reach the export
- passed
- gate_json
- failed_metrics
If you've ever shipped a video where one shot was clearly worse than the rest, you know the real problem wasn't the model - it was that nothing checked. CDQualityGate is the node that turns "is this take good enough?" from a feeling into a hard boolean you can gate your workflow on. You feed it metrics, you set thresholds, and it answers yes or no before a take is ever allowed into the export package.
It's from Continuity Director, a 20-node pack for repeatable AI video production, and it's one of three "quality" nodes - the others rank takes and diff two JSON states. This one is the binary gate.
What you feed it
- metrics_json - a JSON object of scores. The default shows the shape:
{"identity":0.9,"continuity":0.82,"technical":0.88}. These can come from whatever quality tool you run - a face-similarity node, a technical scorer, your own LLM judge. The node doesn't care where the numbers come from. - thresholds_json - the pass bars, e.g.
{"identity":0.78,"continuity":0.72,"technical":0.70}. Any metric not in your thresholds gets a sensible default (0.78 identity, 0.72 continuity, 0.70 technical). - mode -
all(every metric must clear its bar) orany(one passing metric is enough).allis the strict default for a reason;anyis for when you're triaging.
The mechanism worth knowing
Scores are clamped to 0..1, and a metric that's missing from the metrics object scores 0.0 - so if your scorer stops reporting identity, the gate fails rather than silently passing on a threshold it never saw. That's the behavior you want from a gate: it fails safe. Internally it compares every threshold, marks missing metrics, and only then decides. Outputs are passed (boolean), gate_json (the full report - every metric, its score, its bar, and whether it cleared), and failed_metrics (a comma-separated string of exactly what failed, which is the perfect thing to feed a retry or a human).
Installing it
Same easy story as the entire pack: no models, no keys, and no Python dependencies - requirements.txt is a comment saying so. The whole thing is standard library, so there's nothing to conflict with your environment. Search "Continuity Director" in ComfyUI Manager and restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/xinjian0101/continuity-director.git ComfyUI-ContinuityDirector
Restart ComfyUI - nodes show up as CD · ..., with a Continuity Director sidebar that can scaffold the whole production chain ("Add starter chain"). Update with git pull.
Where people get burned
The trap is treating thresholds as permanent. They're not - they encode a specific quality bar for a specific project, and the defaults are reasonable starting points, not gospel. Set them too high and you'll reject every take; too low and the gate becomes theater. And remember the gate only knows what you tell it: if your metrics_json is {}, every metric is missing, scores 0.0, and the gate fails everything. That's correct behavior, but it's a classic "why does nothing pass" moment for first-time users. Feed it real scores from a real scorer and this node quietly becomes the difference between a reliable production and a dice roll.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| metrics_json | STRING | {"identity":0.9,"continuity":0.82,"technical":0.88} | — |
| thresholds_json | STRING | {"identity":0.78,"continuity":0.72,"technical":0.70} | — |
| mode | COMBO | 2 options: all, any |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| passed | BOOLEAN | — |
| gate_json | STRING | — |
| failed_metrics | STRING | — |