Hand Tracking Node ππ ‘π £π
MediaPipe Hands Inside ComfyUI
- image
- debug_image
- hand_data
Every hand-mask, gesture-driven effect in this pack traces back to one node. Hand Tracking Node runs Google MediaPipe's hand landmarker on your video frames and hands you back two things: a debug image with the skeleton drawn on it, and a HAND_DATA structure with 21 landmarks per hand. It's marked experimental in the source, and it deserves the warning - but it's also the reason half the pack's demos exist.
The landmark output is the valuable part. Each detected hand comes back as a 21Γ3 array of normalized x, y, z coordinates (z is depth-ish, relative to the wrist), plus which hand it is - left or right - and a hands_present flag. That data feeds the pack's Hand Mask Node to build masks, or any of the position extractors if you want to turn "where is my fingertip" into a control value. The debug image is exactly what it sounds like: your frame with the 21-point skeleton and the hand connections drawn over it, useful for tuning and for monitoring whether detection is actually working.
Mechanically it's the legacy MediaPipe solutions API (mp.solutions.hands) - the one Google is slowly retiring in favor of the newer Tasks API, which is why the README flags the whole hand pipeline as awaiting migration. It re-initializes the detector whenever you change detection_confidence, tracking_confidence, max_num_hands, or static_image_mode, so you can tune it live without restarting. The hand-landmark model (~5 MB) downloads automatically on first use, no manual model hunting.
The inputs that matter
- detection_confidence / tracking_confidence - both default to 0.5. Lower them if hands keep getting missed; raise them if you're getting false positives on clutter.
- max_num_hands - 2 by default, up to 4. More hands costs more compute.
- static_image_mode - the important one. Off (default) means tracking mode: fast, reuses the previous detection, great for real-time video. Turn it on for single still images, where every frame must be treated as a fresh detection.
- draw_debug - whether to draw the skeleton on the debug image.
Outputs: debug_image (IMAGE) and hand_data (HAND_DATA).
Install & the realities
In ryanontheinside/ComfyUI_RealtimeNodes - ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RealtimeNodes
cd ComfyUI_RealtimeNodes
pip install -r requirements.txt
MediaPipe is a real dependency here, and the README is upfront that GPU support varies by platform - on Linux you may want Google's GPU setup instructions; CPU-only works but eats more of your frame budget. The first frame after install will stall while the model downloads, so don't panic if the stream hiccups once. Beyond that: hands get missed at extreme angles and in bad light, MediaPipe isn't magic - position your hand reasonably, and if detection is flaky, drop the confidence thresholds before blaming the node. It's experimental, it's a little rough, but it's the direct line between "your hand" and "a number in the graph," and nothing else in the pack does that job.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| detection_confidence | FLOAT | 0.500.1β1 | β |
| tracking_confidence | FLOAT | 0.500.1β1 | β |
| max_num_handsopt | INT | 21β4 | β |
| static_image_modeopt | BOOLEAN | false | β |
| draw_debugopt | BOOLEAN | false | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| debug_image | IMAGE | β |
| hand_data | HAND_DATA | β |