DragAnythingPipelineRunRandom
The fastest way to preview DragAnything — random motion on a cached pipeline
- pipeline
- image
- mask_list
- image
If you've looked at this pack's four run nodes and felt the overlap, you're not wrong. DragAnythingPipelineRunRandom is the most specialized of the set: it's the random-walk generator with the cached-pipeline pattern, both at once. No trajectory to draw, no models reloading between attempts. It exists for one job - fast, throwaway motion previews - and it's honestly the best node in the pack for that.
How it fits
The pack gives you two ways to feed a generator: let it load everything itself (the DragAnythingRun* nodes) or take a preloaded DragAnythingPipeline from DragAnythingLoader (the DragAnythingPipelineRun* nodes). And two ways to specify motion: hand it a trajectory_list, or let it random-walk from your mask's centroid. This node is the intersection: pipeline input + generated trajectory.
The mechanism is the same under the hood as every node here. Each mask's centroid becomes a starting point; every frame the point jitters by a random amount (move_speed, default 5 pixels) clamped away from the edges (move_border, default 20px). That path drives the per-frame Gaussian heatmaps and the DragAnything ControlNet on Stable Video Diffusion, guided by the DIFT identity embedding pulled from your first frame via the chilloutmix checkpoint. You just don't get to choose the path - each run is a fresh roll of the dice, which is precisely what you want when the goal is "does this mask pick up the subject, and does the motion read?"
The inputs that matter
pipeline- theDragAnythingPipelinefromDragAnythingLoader. Nothing else outputs this type.image,mask_list(one mask per entity),frame_number,width/height(multiples of 64),num_inference_steps,motion_bucket_id,controlnet_cond_scale,decode_chunk_size- the standard DragAnything dials, defaults included.move_speed(5) - max random step per frame per axis.move_border(20) - how close the wandering centroid is allowed to get to the image edges.
Output is an IMAGE batch of frame_number frames; feed it to VHS_VideoCombine for a viewable file.
Installing
Same pack, same story as its siblings. Manager search "ComfyUI-DragAnything" or clone into custom_nodes/, then:
pip install -r requirements.txt # or at minimum: pip install diffusers==0.19.3
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
Three repos, 10+ GB, hardcoded to that pretrained_models/ folder. Don't move them.
Troubleshooting
- The
pipelineinput won't connect - you need the pack'sDragAnythingLoadernode feeding it. There is no other source of aDragAnythingPipeline. - "Missing Node Types" → the pack's own
SaveText/LoadTextnodes are fighting another pack (ComfyUI-nodes-hnmr is the usual culprit); clear it and restart. - Motion flies off the subject → cut
move_speedto 2–3 and keepcontrolnet_cond_scaleat 1.0. - If other custom nodes break after this install, the
diffusers==0.19.3pin is why.
Once a random run shows a motion you like, you can't recreate it exactly - the path is random each time. The intended flow is: preview here, then switch to DragAnythingPipelineRun (or the all-in-one DragAnythingRun) and draw the real trajectory to match what worked.
Inputs (13)
| 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 | — | |
| num_inference_steps | INT | 25 | — |
| motion_bucket_id | INT | 180 | — |
| controlnet_cond_scale | FLOAT | 1.00 | — |
| decode_chunk_size | INT | 8 | — |
| move_speed | INT | 5 | — |
| move_border | INT | 20 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |