LLM Content Quality Controller (TJ)
Let a local LLM pass or fail your output — with a human escape hatch
- image
- audio
- QC_Image
- QC_audio
- QC_result
LLM Content Quality Controller (TJ) is a gate node that reads a review verdict - the kind of OK/FAIL text a local LLM writes about your generated image - and decides whether the workflow continues. If the review passes, the image and audio flow through and the graph proceeds to save. If it fails, execution pauses and the node waits for a human to either approve it once or cancel. It's a quality-control checkpoint that automates the boring part (running the review) and keeps the accountable part (final say) with you.
How it works
The node pulls in three things, all optional and mostly wireless: prompt_in (the review text - or via get_name_1/get_name_2/get_name_3, three embedded wireless Get slots so the review can arrive without wires), image, and audio. The review text is judged by word matching: it contains any pass_words (default OK, PASS, APPROVE, APPROVED)? It passes. Any reject_words (default FAIL, REJECT, BAD)? It fails. unclear_result decides the tie-breaker - a review matching neither list defaults to Reject unless you switch it to Pass.
The gate logic: review_mode is the master. Pass mode never blocks - the workflow runs regardless, though QC_result still tells you the judged outcome. Review mode is where the gating lives: on a failed review it emits a waiting state to the UI and pauses on the execution thread until you hit Approve Once or cancel (the node watches its own status endpoint; cancel raises an interrupt). approve_once skips the wait on the next run, which is the "I've seen this, just let it through" escape hatch.
Outputs mirror the flow: QC_Image (the image, or a blocker that stops downstream nodes when rejected), QC_audio (same for audio), and QC_result (a string like Save/Preview - passed as ANY so downstream save/preview logic can branch on it). seed/seed_mode exist so repeatable workflows don't get nondeterministic gate behavior.
Inputs and outputs that matter
prompt_in(or theget_name_Nwireless slots) - the review text.review_mode-Pass(never block) vsReview(gate).pass_words/reject_words- the matching vocabulary.approve_once- approve the current run by hand.- Outputs:
QC_Image,QC_audio,QC_result.
Install
ComfyUI Manager → Install Custom Nodes → search TJ_NODE, or:
cd ComfyUI/custom_nodes
git clone https://github.com/designloves2/ComfyUI-TJ_NODE
Restart ComfyUI. The gate itself needs no model - the LLM that writes the review is upstream (TJ's own Image to Prompt with the "Content Quality Check" task is the natural pairing), and that's where the llama-cpp / GGUF setup cost lives. Category: ✨ TJ_Node/LLM.
The honest take
The word-matching judgment is blunt - it's a pattern match on the review text, not a second LLM weighing in - so it works best when you control the reviewer's prompt and can count on it saying "OK"/"FAIL" predictably. Where it shines is volume: in a Queue Loop, a stack of bad frames gets automatically rejected and the queue parks for you to eyeball, instead of saving garbage into a dataset. Where it bites: if your reviewer's phrasing drifts ("Looks fine but…" contains neither list, so it Rejects by default), you'll get false pauses. Add your reviewer's actual verdict words to pass_words and you'll stop fighting it.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| get_name_1 | COMBO | 1 options: (none) | |
| get_name_2 | COMBO | 1 options: (none) | |
| get_name_3 | COMBO | 1 options: (none) | |
| auto_set | BOOLEAN | false | — |
| review_mode | COMBO | Review | 2 options: Review, Pass |
| approve_once | BOOLEAN | false | — |
| pass_words | STRING | OK, PASS, APPROVE, APPROVED | — |
| reject_words | STRING | FAIL, REJECT, BAD | — |
| unclear_result | COMBO | Reject | 2 options: Reject, Pass |
| seed | INT | 10–4294967295 | — |
| seed_mode | COMBO | fixed | 4 options: fixed, increment, decrement, randomize |
| prompt_inopt | STRING | — | |
| imageopt | IMAGE | — | |
| audioopt | * | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| QC_Image | IMAGE | — |
| QC_audio | * | — |
| QC_result | * | — |