PixlStash Picture Likeness Gate
Keep only frames that match a reference set
- image
- pixlstash_set
- accepted
- rejected
- accepted_count
- rejected_count
- pixlstash_set
The Face Likeness Gate judges faces; this one judges whole pictures. PixlStash Picture Likeness Gate scores each frame of a generation batch against every member of a reference picture set, then splits the batch into accepted and rejected. It's for when "matches" means composition, subject, and look - not identity. Generate a batch, wire a Set Loader in as the bar to clear, route accepted to upscale/save and rejected to a reject-pile saver, and you never burn upscale compute on off-target frames.
How the combine modes change the verdict
The default combine is min, and it's worth internalizing because it's the most opinionated setting in the pack:
min- must match every member of the set. A[monkey, banana, bicycle]reference set keeps only frames that resemble all three. This is a strict AND.max- matches any one member. A generous OR.mean/harmonic_mean/geometric_mean- graded middle grounds.
So pick your reference set to encode the requirement, then pick the combine that says whether it's "all of these" or "any of these." threshold (default 0.25) is the cut. The node logs the score distribution (min/median/max) after each run - the tooltip's advice is sound: run once, read the scores, then set the threshold at the natural gap between your off-target and on-target frames instead of guessing.
How scoring works (and why it's side-effect free)
Each frame is sent as the query image to PixlStash's image-likeness search with the set as the corpus. The server computes the query's CLIP embedding synchronously in-request and ranks it against the set's members, whose embeddings already exist. So - unlike an import-then-score pipeline - nothing is uploaded to your vault, nothing is persisted, and you don't need write scope. A read-scope token is sufficient, there's no import step, and there's no "wait, are the embeddings ready?" polling. The trade-off is cost: one request per frame, and the reference set must be ≤ 500 members (the server's cap), enforced with a clear error if you exceed it.
Members without a computed embedding yet are skipped (and logged), and absent members score as 0.0 when combining - so a set PixlStash hasn't finished indexing will skew strict. If none of the set is indexed, the node errors rather than silently rejecting everything.
Inputs and outputs
Required: image, pixlstash_set (from a Set Loader), combine, threshold. No optional inputs.
Outputs: accepted / rejected (IMAGE), accepted_count / rejected_count (INT), and pixlstash_set pass-through - so the accepted branch can be saved straight back into the same set. Empty streams return an ExecutionBlocker, same as the face gate, so downstream previews don't crash on zero-length batches.
Install and gotchas
Pack install as usual - ComfyUI Manager → ComfyUI-PixlStash, or clone into custom_nodes, restart, set URL/token in Settings > PixlStash. Deps: requests + Pillow. Requires PixlStash v1.4 (development releases for now). Read-scope token is fine, but single-user ComfyUI is mandatory, like everything in this pack.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The batch of generations to judge. Each frame is scored individually and routed to either the accepted or the rejected output. | |
| pixlstash_set | PIXLSTASH_SET | Wire from a Set Loader. Every generation is scored against this set's pictures — the bar each frame has to clear to be accepted. | |
| combine | COMBO | min | How to combine a frame's per-reference scores. min: must match every picture in the set (a [monkey, banana, bicycle] set keeps only frames showing all three). max: match any one. mean / harmonic_mean / geometric_mean: balance between. |
| threshold | FLOAT | 0.250–1 | Minimum combined likeness score [0–1] a frame must reach to be accepted. Read the scores logged after a run (min / median / max) to set the cut between the off-target and on-target frames. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| accepted | IMAGE | — |
| rejected | IMAGE | — |
| accepted_count | INT | — |
| rejected_count | INT | — |
| pixlstash_set | PIXLSTASH_SET | — |