Nodes/ComfyUI-TJ_NODE/LLM Content Quality Controller (TJ)
ComfyUI Node

LLM Content Quality Controller (TJ)

Let a local LLM pass or fail your output — with a human escape hatch

By designloves2·Created 4 months ago·Updated 3 days ago· 13
LLM Content Quality Controller (TJ)
  • image
  • audio
  • QC_Image
  • QC_audio
  • QC_result
get_name_1
get_name_2
get_name_3
auto_setfalse
review_modeReview
approve_oncefalse
pass_wordsOK, PASS, APPROVE, APPROVED
reject_wordsFAIL, REJECT, BAD
unclear_resultReject
seed1
seed_modefixed
prompt_in

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 the get_name_N wireless slots) - the review text.
  • review_mode - Pass (never block) vs Review (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.

Category ✨ TJ_Node/LLM

Inputs (14)

NameTypeDefaultDescription
get_name_1COMBO1 options: (none)
get_name_2COMBO1 options: (none)
get_name_3COMBO1 options: (none)
auto_setBOOLEANfalse
review_modeCOMBOReview2 options: Review, Pass
approve_onceBOOLEANfalse
pass_wordsSTRINGOK, PASS, APPROVE, APPROVED
reject_wordsSTRINGFAIL, REJECT, BAD
unclear_resultCOMBOReject2 options: Reject, Pass
seedINT10–4294967295
seed_modeCOMBOfixed4 options: fixed, increment, decrement, randomize
prompt_inoptSTRING
imageoptIMAGE
audioopt*

Outputs (3)

NameTypeDescription
QC_ImageIMAGE
QC_audio*
QC_result*