Nodes/ComfyUI-RAFT/VizMotionBrush
ComfyUI Node

VizMotionBrush

See what a saved brush actually does before you paint with it

By chaojie·Created 3 years ago·Updated 2 years ago· 28
VizMotionBrush
  • motion_brush
  • IMAGE

The eyeball node

A saved motion brush is just a .npy of numbers. It could be a graceful camera drift or complete junk and you'd never know from looking at the file. VizMotionBrush is how you find out: it renders a motion brush as a sequence of color-coded images you can actually look at, with one frame per flow field.

That's its entire reason to exist, and it's worth it. The whole ComfyUI-RAFT workflow is "capture motion once, spend it many times," and this is the audit step in the middle. Before you feed a brush to the companion DragNUWA pack's BrushMotion node and spend minutes of SVD inference animating with it, spend the two seconds it takes to check the motion actually does what you think. A brush that captured the wrong thing will waste far more of your time than this node saves.

How it works

It takes a MotionBrush, permutes it back from height-width-2 to channel order, and runs each flow field through the same color-warp visualization the pack uses everywhere: hue encodes direction, brightness encodes speed. Out comes a standard IMAGE tensor you can send to PreviewImage. No model, no GPU, no RAFT - it's pure numpy and CPU work, so it's effectively instant even on a big brush.

The input and output

  • motion_brush - the only input. Hand it the output of Load MotionBrush (auditing a saved brush) or RAFT Run's OPTICAL_FLOW-side data via a converter if you're checking flow before you even save it.
  • IMAGE - one color-mapped frame per flow field. A 14-frame clip yields 13 frames here, since flow is computed between consecutive pairs.

A handy detail: the visualization you get is the same one RAFT Run produces on its IMAGE output - but from the saved brush, which means you can audit motion you captured weeks ago without re-running the model. That's the whole point of the library workflow.

Install

It ships in ComfyUI-RAFT, so the shared install applies: ComfyUI Manager → search ComfyUI-RAFT, or git clone https://github.com/chaojie/ComfyUI-RAFT into custom_nodes, then restart. This node is the lightest one in the pack - it only needs numpy.

If you're using it to check a brush you just saved, remember the Load MotionBrush dropdown refreshes when that node is (re)created, not automatically. And don't expect it to do more than show you the flow - if you're looking for a numerical readout or a motion histogram, this isn't the node; it's a picture, and that's enough.

CategoryRAFT

Inputs (1)

NameTypeDefaultDescription
motion_brushMotionBrush

Outputs (1)

NameTypeDescription
IMAGEIMAGE