Nodes/komojini-comfyui-nodes/DragNUWAImageCanvas
ComfyUI Node

DragNUWAImageCanvas

DragNUWAImageCanvas — draw drag trajectories on a still, then make it move

By komojini·Created 3 years ago·Updated 2 years ago· 77
DragNUWAImageCanvas
    • image
    • tracking_points
    image[IMAGE DATA]
    tracking_points

    DragNUWAImageCanvas is the pack's headliner: a canvas node where you load a still image, drag points around to define motion trajectories, and hand the result to a DragNUWA sampler to turn into video. It's the piece that makes "drag-to-generate" video work inside ComfyUI - you tell the model where things should move, rather than hoping a text prompt describes it.

    DragNUWA is Microsoft Research's trajectory-controlled video generation model (ProjectNUWA/DragNUWA), released in early 2024. The idea: instead of a prompt saying "the car drives left," you physically drag a handle on the car and the model honors that path. The community received the code drop warmly (the "DragNUWA code released!" thread on r/StableDiffusion), and this node is a ComfyUI-facing front-end for it. Important framing: this node does not generate anything on its own. It's the input surface. The actual video generation happens in the separate ComfyUI-DragNUWA pack by chaojie, which loads the DragNUWA weights.

    How it works. The node renders an interactive canvas in the ComfyUI graph - you paste or load an image, then place tracking points on it. On the Python side it takes the image as a base64 data string (the [IMAGE DATA] default is a placeholder), strips the data-URL prefix, decodes it to a PIL image, applies EXIF transposition and converts to a float tensor in ComfyUI's standard format. The tracking_points you drew come out as a STRING. Both outputs - image (IMAGE) and tracking_points (STRING) - are what the ComfyUI-DragNUWA nodes consume to drive generation.

    Inputs and outputs. image (STRING, the embedded canvas image data) and tracking_points (STRING, multiline). Outputs: image (IMAGE) and tracking_points (STRING). Simple on paper; the complexity lives in the canvas UI.

    What it actually takes to run. This is the pack's heaviest lift by far, and beginners bounce off it:

    • The chaojie/ComfyUI-DragNUWA custom node pack (the README links it directly).
    • The DragNUWA model weights, which are a real download - a video diffusion model, not a LoRA.
    • ComfyUI-DragNUWA's own dependencies (it historically wanted a matching environment).

    So the install story is two packs plus weights, not one pack. Plan for a chunky setup session.

    ComfyUI Manager → search "komojini-comfyui-nodes" → Install → restart
    

    then separately install ComfyUI-DragNUWA and its model files.

    Where people get burned. The canvas JS is from early 2024 - if the interactive canvas doesn't render on a current ComfyUI build, that's the era, and it's the #1 thing that breaks for people who install this cold. Also, DragNUWA is an academic-weights model: results are a demonstration of the technique more than a production video tool, and video generation at its native resolution is slow and VRAM-hungry. If your actual goal is "controllable video," today's maintained options (Wan, LTX, Hunyuan workflows with motion LoRAs) are far better documented. This node is for the specific case where you want DragNUWA's trajectory control and are willing to fight 2024-era tooling for it.

    Categorykomojini/image

    Inputs (2)

    NameTypeDefaultDescription
    imageSTRING[IMAGE DATA]
    tracking_pointsSTRING

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    tracking_pointsSTRING