DragAnythingPipelineRun
DragAnything on a cached pipeline — stop reloading three models every run
- pipeline
- image
- mask_list
- image
DragAnythingRun is the friendly all-in-one node, but it has a flaw: it loads Stable Video Diffusion, the DragAnything ControlNet, and the DIFT feature extractor from disk every single run. When you're iterating on a trajectory or testing five masks, that's minutes of loading between every test. DragAnythingPipelineRun fixes exactly that - it takes a preloaded DragAnythingPipeline and runs the same generation against it.
If you're going to run this more than twice in a session, this is the node you want.
What it changes
It's the same generation code as DragAnythingRun - same mask handling, same trajectory parsing, same per-frame Gaussian heatmaps pushing the motion entity through the SVD UNet. The only difference is where the models come from. Instead of pointing at model folders itself, this node takes a pipeline object from the pack's DragAnythingLoader node.
That loader is the pack's DragAnythingLoader (same "DragAnything" category in the node menu). It loads the SVD base and the DragAnything ControlNet once, and hands you a DragAnythingPipeline you feed into this node's pipeline input. Load once, iterate freely. The sd_path / DIFT side still loads per run, since chilloutmix's features are computed from your first frame each time - but that's the cheap part compared to the video UNet.
The inputs that matter
The field list is DragAnythingRun's minus the two model paths, plus pipeline:
pipeline- theDragAnythingPipelinefromDragAnythingLoader. The only thing that connects here.image- first frame.mask_list- one mask per dragged entity, as an IMAGE batch.trajectory_list- JSON string:[[[x0,y0],[x1,y1],...], ...], one path per mask, at leastframe_numberpoints.frame_number(20),width/height(576×320, multiples of 64),num_inference_steps(25),motion_bucket_id(180),controlnet_cond_scale(1.0),decode_chunk_size(8) - all the same dials, same defaults as the all-in-one node.
Output is an IMAGE batch of frame_number frames → straight into VHS_VideoCombine for the actual video file.
Installing
Same pack, same requirements as the sibling nodes - Manager search "ComfyUI-DragAnything" or git clone https://github.com/chaojie/ComfyUI-DragAnything into custom_nodes/. The heavy part is models, downloaded into the pack's pretrained_models/ folder (the path is hardcoded, don't relocate them):
cd custom_nodes/ComfyUI-DragAnything/pretrained_models
git-lfs clone https://huggingface.co/windwhinny/chilloutmix.git
git-lfs clone https://huggingface.co/weijiawu/DragAnything
git-lfs clone https://huggingface.co/stabilityai/stable-video-diffusion-img2vid
Don't skip pip install -r requirements.txt - or at minimum pip install diffusers==0.19.3, because the pack pins that version and other custom nodes may have opinions about it.
Troubleshooting
- The
DragAnythingPipelineinput has no matching output - you need theDragAnythingLoadernode from this same pack wired in. There's no other source for that type. - "Missing Node Types" on load usually means the pack collided on its bundled
SaveText/LoadTextnodes (with ComfyUI-nodes-hnmr or similar) and failed to load. Resolve the conflict and fully restart ComfyUI. - The usual DragAnything rules still apply: width/height multiples of 64,
mask_listcount ≥ trajectory count, each trajectory ≥frame_number. - Watch for the
diffusers==0.19.3pin breaking other nodes after install - if the pack works but something else exploded, that's the first thing to suspect.
If you're only doing a single shot, DragAnythingRun is simpler. The moment you're tuning, the loader-plus-this-node pair pays for itself in reloads you never sit through.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | DragAnythingPipeline | — | |
| sd_path | COMBO | chilloutmix | 1 options: pretrained_models.txt |
| image | IMAGE | — | |
| width | INT | 576 | — |
| height | INT | 320 | — |
| frame_number | INT | 20 | — |
| mask_list | IMAGE | — | |
| trajectory_list | STRING | [[]] | — |
| num_inference_steps | INT | 25 | — |
| motion_bucket_id | INT | 180 | — |
| controlnet_cond_scale | FLOAT | 1.00 | — |
| decode_chunk_size | INT | 8 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |