Create KPS Image
Rendering keypoints into the control image InstantID needs
- kps_data
- control_image
A small, single-purpose node: feed it kps_data, get back an IMAGE. That's it. But it's the bridge between the abstract keypoint-manipulation side of this pack - KpsDraw, Kps3dFromImage, the randomizers, KpsRotate/KpsScale/KpsCrop - and the actual generation side, because ControlNetInstantIdApply and InstantIdAndControlnetApply want an image, not a data structure.
What it's actually rendering
InstantID's IdentityNet - the ControlNet-shaped part of the architecture - was trained to condition on an image showing five colored dots representing facial landmarks (eyes, nose, mouth corners), each in a specific color on a black background. kps_data is this pack's internal representation of where those five points sit; this node is the one that turns that abstract point set into the actual pixel image the ControlNet model expects to see. Before v0.1.1 of this pack, that rendering happened client-side in the browser when you drew KPS manually; it's since moved fully to the Python backend, which is a large part of why KpsMaker exists as its own standalone node now rather than being baked invisibly into the draw tool.
Why it's separate from the drawing/detection nodes
Because kps_data can come from several different places - hand-drawn (KpsDraw), extracted from a real photo in 3D (Kps3dFromImage), randomized, rotated, scaled, or cropped - and every one of those operations needs to work on the underlying point data, not pixels. Keeping the render step as its own node means you can chain any combination of KpsRotate → Kps2dRandomizer → KpsScaleBy and only pay the rendering cost once, at the very end, right before it goes into the ControlNet.
Install
Same pack-wide install: search comfyui-instantId-faceswap in ComfyUI Manager, or git clone https://github.com/nosiu/comfyui-instantId-faceswap into custom_nodes/ and pip install -r requirements.txt. This particular node has no model dependency of its own - it's pure Python rendering logic, no downloads required. It only becomes useful once something upstream is actually producing kps_data.
Common issues & troubleshooting
Nothing to connect it to, or empty output. This node can't invent keypoints - it needs a real kps_data input from somewhere. If you're not sure where to get one, KpsDraw is the manual entry point (click and drag five points yourself) and Kps3dFromImage is the automated one (extracts them from a photo via insightface).
The rendered image doesn't match what you expected from the drawing widget. If you were used to an older version of this pack where KPS drew directly onto a canvas in the browser, note that as of v0.1.1 the generation of the actual control image moved entirely to the backend - what you see while dragging points is a preview, and this node is what performs the real render used for generation. Old saved workflows from before that change may not carry over cleanly; the README calls this out explicitly as a breaking change.
Face geometry looks off in the final result. This node just renders whatever points it's given - if the keypoints themselves are misplaced (wrong angle, wrong scale relative to your pose image), fix that upstream with KpsRotate, KpsScale, or by re-drawing, rather than expecting this node to correct anything.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| kps_data | KPS_DATA | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| control_image | IMAGE | — |