LightGlue Loader
Where LightGlue's models come from (the loader fetches them for you)
- extractor
- matcher
This is the boring node in the pack, and you can't do anything without it. LightGlue Loader is the "load the models" half of chaojie/ComfyUI-LightGlue: it builds the two models every other node in the pack eats, and it does the one thing beginners dread most - hunting down weight files - so you never have to.
The pack exists to generate MotionBrush control for DragNUWA, ByteDance's early-2024 drag-to-animate video generator. LightGlue (from ETH Zurich's CVG group, same people behind SuperGlue) is a local feature matcher: it finds "interesting" points in one image and figures out where those same points went in another. That's the entire trick - track points between frames and you've got motion. This loader builds the two pieces of that pipeline:
- extractor - a SuperPoint network, a classic CNN keypoint detector from 2018-era CV research that finds stable corners and textures worth tracking.
- matcher - the LightGlue network that pairs keypoints between two images and scores how confident it is about each pair.
Both come pre-vendored inside the pack, and here's the nice part: the weights are auto-downloaded on first run via torch.hub from the official cvg/LightGlue GitHub releases. No manual model step, no "download this .pth and drop it in models/". You wire up the node, run it once, and wait for the download.
The inputs that matter (there are only three):
device-cudaby default. Setcpuif you're running without a GPU; LightGlue is small and runs fine on CPU for a couple of images.max_num_keypoints(default 2048) - cap on how many keypoints SuperPoint keeps per image. Higher = denser, more detailed brush, slower and more VRAM. Drop it if you're matching big video frames.filter_threshold(default 0.1) - minimum confidence for a match to count, 0 to 1. 0.1 is the LightGlue default and is usually right. If you're getting garbage matches, nudge it to 0.2–0.3.
Outputs: extractor (SuperPoint) and matcher (LightGlue). Those two purple-ish wires go into LightGlue Simple (two images) or LightGlue Simple Multi (a batch of frames). Alone, this node does nothing - it's pure setup, the same way a checkpoint loader alone doesn't make an image.
Install
The README's official path is manual, and it's short:
cd ComfyUI/custom_nodes
git clone https://github.com/chaojie/ComfyUI-LightGlue
cd ComfyUI-LightGlue
pip install -r requirements.txt
Then restart ComfyUI. You can also try ComfyUI Manager's "Install Custom Nodes" search for "LightGlue", but this one's small enough that the clone is the documented route. The requirements.txt pulls numpy, opencv-python, matplotlib, and kornia>=0.6.11 - kornia is the real dependency (SuperPoint uses it to convert to grayscale), the rest is mostly for the visualizer.
Where people get burned
The most common failure here isn't an error at all - it's the first-run hang. The node needs internet to fetch those weights, and torch.hub downloads from GitHub releases can crawl or stall. If the Loader sits there on first run, check your network, don't kill ComfyUI and conclude it's broken.
The second gotcha is expectations. This whole pack is a niche from January 2024 - a toy for one specific video pipeline that the community largely moved past. If you stumbled here expecting a general-purpose tracking tool for modern video workflows, this isn't it. But if you're building a DragNUWA setup, the Loader is the easy part. The models download themselves; the hard part is everything downstream.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| device | COMBO | cuda | 2 options: cuda, cpu |
| max_num_keypoints | INT | 2048 | — |
| filter_threshold | FLOAT | 0.100–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| extractor | SuperPoint | — |
| matcher | LightGlue | — |