CCIPSame
Same character or not? Let CCIPSame make the call for you
- image_a
- image_b
- model
- BOOLEAN
CCIPSame is the friendly face of this pack: instead of a raw similarity number you have to interpret, it hands you a BOOLEAN. Are these two images the same anime character? True or False. If you just want a verdict to branch on - keep this crop, drop that one, send this frame to the upscaler - this is the node you want.
It's the higher-level sibling of CCIPDifference. Where that node returns the distance and lets you judge, CCIPSame does the judging for you: it computes the CCIP difference between image_a and image_b, then checks whether it's below a threshold. Below → True (same character), above → False.
The threshold, and why the default is usually right
Two inputs control the decision: use_default_threshold (a boolean, defaulting to True) and threshold (a float, defaulting to 0.18). With the default on, the node reads the threshold straight out of your model folder's metrics.json - no slider guessing. The default pruned caformer-24 model's tuned threshold is about 0.178, which is exactly why 0.18 is the fallback value in the schema.
That's the nice part of how the loader works: each model folder bundles its own metrics.json, so the "right" threshold follows the model around automatically. Flip use_default_threshold off only when you want to override - say you're being stricter (lower threshold, fewer false "same" calls) or looser (higher, to catch same characters across very different art styles). Same character in a totally different outfit or a different artist's take can push the difference well above 0.18, so a miss isn't necessarily a broken model, it's a threshold tuned for typical character pairs.
The remaining input is size, default 384, matching how the models were trained. Leave it. Output is a single BOOLEAN.
Where it shines
The classic use is conditional pipelines. Wire the BOOLEAN into a switch or IF node and you get rules like: if this new generation is still the same character as my reference, keep it; if it drifted into a different person, regenerate. Or the dataset-building pattern people actually hit in the wild - sorting video crops by character so you only train a LoRA on frames of the one you want, and quietly drop everyone else. (That's exactly how the community is using CCIP outside ComfyUI: character crops get clustered and filtered before training.) CCIPSame is the single-pair version of that, no Python needed.
The usual suspects
Same pack-wide requirements: it needs a model from CCIPModelLoader, so your ComfyUI/models/ccip/ folder has to be populated or the graph errors out. onnxruntime must be installed from the pack's requirements. And please, crop your images to one character - CCIP was trained on single-character images and doesn't segment scenes for you. Feed it two clean crops and the boolean is trustworthy enough to gate a workflow; feed it two group shots and it's a coin flip.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image_a | IMAGE | — | |
| image_b | IMAGE | — | |
| model | CCIP_MODEL | — | |
| use_default_thresholdopt | BOOLEAN | true | — |
| thresholdopt | FLOAT | 0.18 | — |
| sizeopt | INT | 384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |