PixlStash Face Likeness Gate
The node that kills bad character renders before you upscale them
- image
- pixlstash_character
- accepted
- rejected
- accepted_count
- rejected_count
- pixlstash_character
Here's the workflow pattern that makes people fall for this pack: generate a big batch with a character LoRA, then PixlStash Face Likeness Gate looks at every face and splits the batch into accepted and rejected by how closely each one matches your character's reference. Accepted goes to upscale and save. Rejected goes to a "scrapheap" preview or nowhere at all. You stop wasting GPU hours polishing off-model renders, and the reference character is passed through so the good frames get saved tagged back to the same character without re-wiring. Character consistency is the community's most-cited unsolved problem - this node doesn't solve generation, it solves curation, which is the honest half that's actually achievable.
How it works
The likeness scoring is server-side and stateless. The node uploads your frames in batches of 16 as high-quality JPEGs to a single endpoint PixlStash added in v1.6.0 (score_character_likeness). The server detects faces in memory on its GPU, embeds each one, and scores it against the character's reference faces - returning one score per frame. Nothing is imported, tagged, or persisted in the vault, so it's fast and there's nothing to clean up. A read-scope token is enough - no write access needed.
The inputs that matter:
image- your batch of generations.pixlstash_character- from a Character Loader. This is who "looks like" is measured against.threshold(default 0.7) - minimum score [0–1] to be accepted. A frame with no detectable face is always rejected - that's the safe default, but it means a stylized render where the detector can't find a face gets binned, so don't set threshold so high you lose everything.combine(defaultmean) - how a frame's scores across the character's multiple reference faces merge:mean,max(best single reference wins),min(must match every reference), or the means.
Outputs: accepted / rejected (IMAGE), accepted_count / rejected_count (INT), and pixlstash_character pass-through.
The ExecutionBlocker trick
If every frame is rejected, the accepted output is an empty batch - and ComfyUI's built-in Preview/Save nodes crash on zero-length batches. The gate handles this by returning an ExecutionBlocker for the empty stream, which silently skips the downstream branch while the count outputs still carry real numbers. That's why you can safely wire rejected into a preview without babysitting it.
Install and gotchas
Pack install as usual - ComfyUI Manager → ComfyUI-PixlStash, or clone into custom_nodes, restart, set URL/token in Settings > PixlStash. Only requests + Pillow as deps.
Three requirements to respect. First, PixlStash v1.6.0+ - older servers 404 the endpoint, and the node says so explicitly. Second, a running face-extraction worker on the server. Third, the character must actually have reference faces assigned - the gate checks up front and fails fast with "no reference faces" instead of silently scoring everything to zero. And like every node here: single-user ComfyUI only.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Batch of generated images to filter. Each frame is scored individually against the reference character. | |
| pixlstash_character | PIXLSTASH_CHARACTER | Wire from a Character Loader. Each input frame is scored by face similarity to this character. | |
| threshold | FLOAT | 0.700–1 | Minimum face-likeness score [0-1] a frame must reach to be accepted. A frame with no detectable face is always rejected. |
| combineopt | COMBO | mean | How to combine a frame's similarity across the character's reference faces. mean: average; max: best matching reference; min: must match every reference; harmonic_mean / geometric_mean: balance between extremes. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| accepted | IMAGE | — |
| rejected | IMAGE | — |
| accepted_count | INT | — |
| rejected_count | INT | — |
| pixlstash_character | PIXLSTASH_CHARACTER | — |