Nodes/ComfyUI-RAFT/Load MotionBrush
ComfyUI Node

Load MotionBrush

Pick a saved motion off the shelf

By chaojie·Created 3 years ago·Updated 2 years ago· 28
Load MotionBrush
    • MotionBrush
    file_pathsmoke/smoke1/smoke1.npy

    The other half of the motion brush loop

    Save MotionBrush writes motion to disk; Load MotionBrush brings it back. That's the whole job, and it's a genuinely useful one, because it's what lets you decouple "capture motion" from "use motion." You can spend one afternoon grabbing a handful of nice motions from footage you like, and then spend the next three months animating with them without ever re-running the expensive optical-flow step.

    The author's framing is a motion library - the "Create your motion brush library and use it" workflow that introduced this pack in early 2024. This node is the shelf access.

    How it works

    It globs every .npy file under ComfyUI/output/motionbrush/ and shows them as a dropdown. Pick one, and it loads the float32 array and hands it out as a MotionBrush - a plain tensor of shape (frame_pairs, height, width, 2). There's no model involved, no GPU, no network. It's a numpy.load wrapped in a node, and it's effectively instant.

    The input and output

    • file_path - an enum of every brush found on disk, default smoke/smoke1/smoke1.npy. The paths are relative to the output/motionbrush/ root, matching what Save MotionBrush writes.
    • MotionBrush output - wire this into anything that eats a motion brush.

    Where it goes from here is the fun part. The whole reason the format exists is so the companion pack ComfyUI-DragNUWA can consume it: feed this into BrushMotion (optionally after CompositeMotionBrush merges it with another brush) to paint the motion onto your own image and animate it. Within this pack alone, you can also feed it straight back into Save MotionBrush to copy or reorganize a brush under a new name, or into VizMotionBrush for a quick look.

    Install

    Nothing special here - it's part of ComfyUI-RAFT, so the shared install applies: ComfyUI Manager → search ComfyUI-RAFT, or git clone https://github.com/chaojie/ComfyUI-RAFT into custom_nodes and restart. This particular node has no dependencies beyond numpy, which ComfyUI already has.

    One gotcha, and it bites

    The dropdown is populated when the node is created, not when you run the workflow. Save a new brush and it will not appear in an already-open Load MotionBrush node. The fix is annoyingly simple: refresh ComfyUI, or delete and re-add the node, and your brush shows up. People hit this, assume the save failed, and re-save with a new name - which is how you end up with smoke1_copy_copy. Don't be that person.

    CategoryRAFT

    Inputs (1)

    NameTypeDefaultDescription
    file_pathCOMBOsmoke/smoke1/smoke1.npy0 options:

    Outputs (1)

    NameTypeDescription
    MotionBrushMotionBrush