RopeWrapper_DetectNode
Find the faces first — everything else depends on this pass
- models
- input_image
- humanCount
- DETECTRESULT
- foundFaces
Every RopeWrapper swap starts with this node, and the README says so bluntly: execute the FindFace section first. RopeWrapper_DetectNode runs RetinaFace over every frame of your video, then uses ArcFace embeddings to figure out which of those detections are the same person across frames. The output is the map the SwapNode lives on - it tells the swapper where each face is, in every frame, and which identity each one belongs to.
Detection is also the slow, fiddly part of the whole pipeline. It's the reason this pack ships a save/load pair: run this once, save the result, and stop paying for it.
The inputs
Only three, which is nice:
- models - the
ROPE_MODELoutput from LoadModels. Notably it does not need the vm, unlike the swap nodes. - SimilarityThreshold (default 70) - how strict the identity matching is, on a 0–100 scale. The node compares ArcFace embeddings using a cosine-distance-derived similarity score. Raise it and similar-looking faces get treated as different people; lower it and minor variations merge into one identity. This is the knob the README tells you to adjust to "differentiate between different identities."
- detection_threshold (default 0.5) - how confident the detector must be before a region counts as a face. Lower it to catch more faces (smaller ones, side angles, partial occlusion); raise it to cut false positives.
What comes out
Three outputs:
- DETECTRESULT - the goods: a per-frame list of detections, each tagged with the identity index it matched, plus the total face count. This wires into the SwapNode's
detectResultinput, and into SaveSwapInfo if you want to cache it. - humanCount (INT) - the number of unique identities found across the whole video. Wire it to a Display Int node to sanity-check that detection found who you expected.
- foundFaces (IMAGE) - one crop per unique identity, in discovery order. Preview this to confirm the detector caught the right people. The order matters: identity index 0, 1, 2… is exactly the numbering you use in the SwapNode's
source_target_matchingfield.
How the mechanism works
Frame by frame, the node detects up to 50 faces, computes an ArcFace embedding for each, and compares against a running list of identities it has built up. Match → the frame's detection is tagged with that identity's index. No match → a new identity is created. Since the identity list persists across the whole video, a face that shows up in frame 5 and again in frame 300 gets the same index - that persistence is what makes the swap stable over time.
The catch, and it's a real one: a new face that appears mid-video gets a new index, which shifts the meaning of every number after it in source_target_matching. And the node doesn't carry settings between runs - change any threshold and you re-run it, by design.
Install
Same as the whole pack - ComfyUI Manager → search "ComfyUI_RopeWrapper", or:
cd ComfyUI/custom_nodes
git clone https://github.com/fssorc/ComfyUI_RopeWrapper
Restart, install ComfyUI-VideoHelperSuite and ComfyUI-KJNodes, and make sure det_10g.onnx and w600k_r50.onnx are in the plugin's models/ folder before you queue. Detection runs on CUDA with CPU fallback, so on a GPU-less box this is the pass you'll feel.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| models | ROPE_MODEL | — | |
| input_image | IMAGE | — | |
| SimilarityThreshold | FLOAT | 700–100 | — |
| detection_threshold | FLOAT | 0.500–1 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| humanCount | INT | — |
| DETECTRESULT | DETECTRESULT | — |
| foundFaces | IMAGE | — |