Nodes/ComfyUI-LightGlue/LightGlue Simple Multi
ComfyUI Node

LightGlue Simple Multi

The node that turns a video into a DragNUWA motion brush

By chaojie·Created 3 years ago·Updated 3 years ago· 50
LightGlue Simple Multi
  • extractor
  • matcher
  • images
  • motionbrush
devicecuda
scale4

This is the node you actually reach for in this pack. Feed LightGlue Simple Multi a batch of frames and it returns a motion brush: the trajectory control signal that makes DragNUWA animate a video. It's the difference between "here's how two images match" and "here's the motion across a whole clip."

The mechanism is the same feature-matching trick as its little brother, extended across time. A SuperPoint extractor finds keypoints in every frame; a LightGlue matcher then compares frame 0 against every later frame (feats0 vs feats[i]). The clever part is what happens next: a keypoint only counts as a track if it survives in every comparison. Points that appear in frame 0→1 but vanish by frame 0→5 get discarded. What's left are the persistent tracks - things that genuinely moved across the whole clip - and those get stacked into per-track trajectories and serialized to JSON.

That filtering is what makes the brush usable instead of a swarm of noise, and it's also the catch: if nothing in your video has sustained motion, you get an empty brush. A locked-off static shot will happily match the same points over and over - and then discard them, because a still point isn't a track. This is where people get burned. You need real motion in the source: a camera pan, an object sliding, a person moving.

Inputs:

  • extractor and matcher - from the LightGlue Loader.
  • images - an IMAGE batch. Load one with VHS_LoadVideo (or anything that outputs a frame batch), then typically resize before this node.
  • device - cuda by default.
  • scale (default 4) - this one confuses people, so: every matched keypoint coordinate gets divided by scale before being written into the brush. DragNUWA's working canvas is smaller than your full-res frames, so dividing by 4 lands the brush coordinates on the canvas the model actually expects. Leave it at 4 unless you know your input resolution maps to a different multiple.

Output: a single motionbrush (STRING) - the JSON list of persistent trajectories. That string feeds DragNUWA Run, or lands in a ShowText node so you can stare at the numbers and wonder if you got it right.

The full workflow

The repo ships workflow_lightgluemotionbrush.json, which is the whole story in one graph: VHS_LoadVideoImageResize+ → LightGlue Simple Multi → DragNUWA Run, with the Loader feeding the models and Load CheckPoint DragNUWA supplying the checkpoint. You don't need to invent any of this - load that file and it's wired for you.

Install

Same path as everything else in the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/chaojie/ComfyUI-LightGlue
cd ComfyUI-LightGlue
pip install -r requirements.txt

Restart ComfyUI, then run the Loader once so its weights download from GitHub (that's the only network dependency). Note what this pack does not include: DragNUWA itself - the checkpoint and the DragNUWA Run node come from a separate ComfyUI implementation. This repo only makes the brush.

The honest take

DragNUWA was the flavor of January 2024: drag a scene, watch a model respect the trajectories, get briefly impressed. Community interest cratered within months, and by 2026 it's a historical curiosity more than a working pipeline. If you're here to resurrect that specific experiment, LightGlue Simple Multi is the right tool and the workflows are right there in the repo. If you want trajectory control in a modern video model, you're better served by current drag/keyframe tooling - but for this one specific, lovingly retro job, nothing does it more directly.

CategoryLightGlue

Inputs (5)

NameTypeDefaultDescription
extractorSuperPoint
matcherLightGlue
imagesIMAGE
deviceCOMBOcuda2 options: cuda, cpu
scaleINT4

Outputs (1)

NameTypeDescription
motionbrushSTRING