DIGIT Drift Gate (Paths)
The same drift QC gate, but pointed straight at files on disk
- passed
- confidence
- drift_report
- qc_json
- qc_filepath
- gated_image
- qc_sheet
- diff_heatmap
- edge_diff
- reference_aligned
- generated_aligned
DIGIT Drift Gate (Paths) is the file-based twin of the Drift Gate node. Where the original takes reference and generated as IMAGE tensors from your graph, this one takes two absolute file paths - reference_path and generated_path - and loads the images itself. Same comparison math, same outputs, zero tensor plumbing.
Why does that variant exist? Because in a production pipeline the reference plates live on disk, not in a graph. Think render farms, automated review loops, or a script that drops a fresh render into a folder and expects the gate to judge it against a locked plate. If your workflow is already file-based - render lands in shots/dev_0010/, reference sits next to it - this node skips the "load it, wire it, convert it" dance entirely.
How it works
Under the hood it's the exact same engine as the tensor version: resize-align, pixel SSIM + edge SSIM scoring with detail_weight, grid-based hotspot detection, and a pass/fail decision against confidence_threshold. All the same tuning knobs are here - resize_mode, fit_method, compare_width/compare_height, grid_size, diff_threshold, reject_mode, and the save_qc/qc_output_dir/qc_filename trio for writing the burn-in QC sheet and JSON sidecar.
The one difference in setup: the two paths are required inputs, and qc_filename (when you save QC) auto-derives a base name from generated_path if you leave it empty - output is always <name>_qc.png/.json. That's a nice touch for keeping QC artifacts tied to the file they judged.
Outputs are identical to the tensor gate: passed, confidence, drift_report, qc_json, qc_filepath, gated_image, qc_sheet, diff_heatmap, edge_diff, reference_aligned, and generated_aligned. So you can build the same rejection logic and the same interactive review (wired into DIGIT Drift QC Preview) whether the image arrived as a tensor or a path.
Installing it
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/thedepartmentofexternalservices/comfyui-digit.git
cd comfyui-digit
pip install -r requirements.txt
Or ComfyUI Manager → search comfyui-digit → install → restart. Local-only, no API keys.
Which version to pick
Honestly, it comes down to where your images are. If they're already outputs in a ComfyUI graph (a freshly generated render right off a node), use the tensor gate. If they're files - a reference plate on disk, or renders being dropped into a watch folder - the paths version removes a whole step. The path-based gate is also the one you'd script against: you can drive it purely by changing which files it points at, no graph rewiring. And because it produces the same QC artifacts, your downstream record-keeping doesn't care which one produced them.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| resize_mode | COMBO | fit_reference | 4 options: fit_reference, fit_generated, fit_largest, custom |
| fit_method | COMBO | stretch | 3 options: stretch, letterbox, crop_center |
| compare_width | INT | 00–16384 | Used when resize_mode is custom. 0 = ignored. |
| compare_height | INT | 00–16384 | Used when resize_mode is custom. 0 = ignored. |
| grid_size | INT | 62–24 | Grid resolution for hotspot drift report. |
| detail_weight | FLOAT | 0.650–1 | How much edge/detail SSIM affects confidence (badge/logo sensitivity). |
| confidence_threshold | FLOAT | 75.00–100 | Pass when confidence >= threshold. |
| diff_threshold | INT | 301–255 | Pixel delta treated as visible drift. |
| reject_mode | COMBO | passthrough | blackout = gated_image goes black on reject. passthrough = gated_image always forwards generated. Use the passed output for branching. |
| save_qc | BOOLEAN | false | Write burn-in QC PNG + JSON sidecar to qc_output_dir. |
| qc_output_dir | STRING | Folder for QC artifacts. Example: .../shots/dev_0010/qc | |
| qc_filename | STRING | Optional base name (no extension, no _qc). Auto-derived from generated_path. Output is always <name>_qc.png/.json. | |
| show_qc_preview | BOOLEAN | true | Show the burn-in QC sheet in ComfyUI's preview panel after run. |
| reference_path | STRING | Absolute path to reference / plate image. | |
| generated_path | STRING | Absolute path to generated image. |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| passed | BOOLEAN | — |
| confidence | FLOAT | — |
| drift_report | STRING | — |
| qc_json | STRING | — |
| qc_filepath | STRING | — |
| gated_image | IMAGE | — |
| qc_sheet | IMAGE | — |
| diff_heatmap | IMAGE | — |
| edge_diff | IMAGE | — |
| reference_aligned | IMAGE | — |
| generated_aligned | IMAGE | — |