Extensions/Deforum Nodes
ComfyUI Extension

Deforum Nodes

Official Deforum animation pipeline tools that provide a unique way to create frame-by-frame generative motion art.

By XmYx·Created 3 years ago·Updated 8 days ago· 198
XmYx/deforum-comfy-nodes
Nodes69
On cloudLocal install
Categorydeforum/noise, AudioProcessing
Stars198
Updated8 days ago

Nodes (69)

(deforum) Add Custom Noise

Nineteen kinds of noise, one node, and when you'd ever want them

deforum/noise
(deforum) AmplitudeToAudio

Rebuild actual audio from a magnitude and phase pair

AudioProcessing
(deforum) Audio to Beat Amplitude

The quick-and-dirty beat detector that needs no parameters

deforum/audio
(deforum) Beat Detection v2

The librosa-powered upgrade when the simple detector wobbles

deforum/audio
(deforum) Convert Normalized Amplitude

The type adapter that lets 0–1 amplitude data talk to the rest of the pack

deforum/audio
(deforum) Add Noise

Add scheduled film-grain and anti-blur noise to every frame

deforum/noise
(deforum) Amplitude to Schedule

Amplitude curves become motion schedules

deforum/audio
(deforum) Amplitude to String

Turn an amplitude series into readable text so you can see what the music did

deforum/audio
(deforum) Logical AND

The two-boolean gate for chaining conditions in your animation

deforum/logic
(deforum) Animation Parameters

The node that decides what kind of animation you're making

deforum/parameters
(deforum) Append

Spray a suffix onto every prompt in your animation

deforum/prompt
(deforum) Apply Flow

Warp a frame along the motion of a real video

deforum/image
(deforum) Area Prompt

Render different prompts in different regions of the frame

deforum/prompt
(deforum) Audio Schedule Expression Templates

53 ready-made math expressions for your audio schedules, no trial-and-error

deforum/help
(deforum) Base Parameters

Canvas size, seeds, and the sampler

deforum/parameters
(deforum) Big Bone Reset Node

The reset switch that forces your animation back to frame zero

deforum/logic
(deforum) Cache Image

Stash a frame in the pack's cache so another part of the graph can grab it

deforum/cache
(deforum) Cache Latent

Keep a latent around for reuse without dragging wires across the graph

deforum/cache
(deforum) Cache String

Stash text across animation passes without a wire

deforum/cache
(deforum) Cadence Interpolation

How Deforum gets a buttery animation from a handful of renders

deforum/interpolation
(deforum) Cadence Parameters

Run diffusion less, interpolate the rest

deforum/parameters
(deforum) Color Match

Stop your animation from slowly shifting color as it drifts frame to frame

deforum/image
(deforum) ColorMatch Parameters

Pick your anchor and color space

deforum/parameters
(deforum) INT Comparator

Compare two integers and get a boolean your graph can act on

deforum/logic
(deforum) Blend Conditionings

Smoothly morph your prompt into the next one mid-animation

deforum/conditioning
(deforum) Apply ControlNet [safe]

The \"safe\" ControlNet apply that makes your animation stick together

deforum/controlnet
(deforum) Depth Parameters

Depth warping that moves your camera through the scene

deforum/parameters
(deforum) Diffusion Parameters

The schedule-driven sampler settings behind every frame

deforum/parameters
(deforum) FILM Interpolation

Turn 30 sparse frames into 120 smooth ones with Google's FILM

deforum/interpolation
(deforum) FLOAT Comparator

Compare two floats to drive the logic chain

deforum/logic
(deforum) Frame Data Extract

Peek inside the animation loop's frame data

deforum/parameters
(deforum) Frame Warp

The 3D camera move that makes Deforum feel like flight

deforum/image
(deforum) Load Cached Image

Pick a frame back out of the animation's memory

deforum/cache
(deforum) Load Cached Latent

How Deforum hands a latent to the next frame

deforum/cache
(deforum) Load Cached String

A numbered slot for text your loop needs later

deforum/cache
(deforum) Guide Image Schedule
deforum/image
(deforum) Schedule Value
deforum/parameters
(deforum) Hybrid Motion

Let a reference video steer your animation frame by frame

deforum/image
(deforum) Hybrid Parameters

The settings that fuse your video into the animation

deforum/parameters
(deforum) Hybrid Schedule

One number that controls how hard the video pushes

deforum/parameters
(deforum) Image Switcher

A boolean that picks between two images — and why that's useful

deforum/logic
(deforum) InpaintModelConditioning [safe]

The \"safe\" inpainting conditioning that keeps your animation on-model

deforum/conditioning
(deforum) Iterator Node

The stateful engine that drives every frame of a Deforum animation

deforum/logic
(deforum) KSampler

The KSampler that takes its orders from the Iterator

deforum/sampling
(deforum) Load Video

The front door to vid2vid — feed any clip into the loop

deforum/video
(deforum) Noise Parameters

The fiddly knobs that shape your animation's motion

deforum/parameters
(deforum) Logical NOT

The one-node inverter for conditional animations

deforum/logic
(deforum) Logical OR

Combine conditions so one true is enough

deforum/logic
(deforum) Prompt

The keyframe script that tells your story frame by frame

deforum/prompt
(deforum) Redirect Console

Stop reading logs in the terminal, watch them in the UI

deforum/utils
(deforum) Schedule Templates

73 pre-built expressions for people who don't do math

deforum/help
(deforum) Schedule Randomizer

Let the seed write your animation curves

deforum/utils
(deforum) Schedule Visualizer

See your animation curve before you render it

deforum/utils
(deforum) Seed Node

The most boring node in the pack, and why it exists

deforum/logic
(deforum) Set VAE Downscale Ratio

An experimental tuning knob for tiling workflows

deforum/_for_testing
(deforum) Shuffle Tokenizer

The weirdest way to remix a CLIP's vocabulary

deforum/conditioning
(deforum) Simple Interpolation

Smooth out your animation's jumps with optical flow

deforum/interpolation
(deforum) Integrated Pipeline

Deforum's Integrated Pipeline

deforum/sampling
(deforum) Translate Parameters

The camera rig of your animation, in schedule form

deforum/parameters
(deforum) Unformatted Prompt

Deforum's Unformatted Prompt Node

deforum/prompt
(deforum) VAEEncode [safe]

The Latent Passthrough That Keeps Cadence Workflows Alive

deforum/latent
(deforum) Save Video

The node that turns your frame stream into an actual video file

deforum/video
(deforum) Derive Amplitude

When Your Animation Needs the Attack, Not the Loudness

deforum/audio
(deforum) ExtractDominantNoteAmplitude

Drive Your Animation From the Melody, Not the Noise

deforum/audio
(deforum) Frequency Range Amplitude

Isolate the Kick Drum, Then Drive the Zoom From It

deforum/audio
(deforum) InverseFFTNode

The Other Half of the Spectrum Round Trip

signal_processing
(deforum) Amplitude Spectral Centoid

One Number That Tells You How 'Bright' the Track Is

deforum/audio
(deforum) Tempo Change Detection

Cut the Scene When the Track Slows Down

deforum/audio
(deforum) Amplitude Time Smoothing

Stop your audio-reactive animation from twitching like a strobe

deforum/audio
Readme

Deforum for ComfyUI

Deforum animation nodes for ComfyUI — 2D/3D camera motion, cadence, hybrid video, schedules and prompt interpolation, driven frame by frame from inside a normal ComfyUI graph.

Deforum on SDXL

Verified against ComfyUI 0.44.2 and deforum-studio 0.2.0.

Installation

ComfyUI Manager

Look for Deforum Nodes by XmYx. The Manager installs requirements.txt, which pulls in the deforum backend and everything else the nodes need.

Manual

cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes.git

Then install the dependencies into the same Python that runs ComfyUI:

python -m pip install -r ComfyUI/custom_nodes/deforum-comfy-nodes/requirements.txt

"The same Python" differs per install, and this is the single most common reason the nodes fail to load. Use the full path — then it does not matter which folder you run the command from:

| Install | Interpreter | | --- | --- | | ComfyUI Desktop | <install>\ComfyUI\.venv\Scripts\python.exe | | ComfyUI portable | <install>\python_embeded\python.exe | | Manual / venv | the python of the venv you launch ComfyUI with |

For example, on ComfyUI Desktop:

"D:\Comfy-Desktop\ComfyUI-Installs\Comfyui\ComfyUI\.venv\Scripts\python.exe" -m pip install -r "D:\Comfy-Desktop\ComfyUI-Installs\Comfyui\ComfyUI\custom_nodes\deforum-comfy-nodes\requirements.txt"

This step needs Git. requirements.txt pulls the deforum backend straight from GitHub (deforum @ git+https://...), and pip shells out to git to do it. Without Git installed and on PATH, pip fails. Either install Git for Windows, or install the backend from a zip instead, which needs no Git:

<python> -m pip install https://github.com/XmYx/deforum-studio/archive/refs/heads/main.zip

Do not run pip install deforum. An unrelated project of that name exists on PyPI; it installs cleanly and then fails at import. The backend this pack needs is deforum-studio.

The Save Video node also needs ffmpeg on PATH. Without it the frames render and the final .mp4 write fails.

Python 3.11 – 3.14 are supported. Nothing here pins or reinstalls torch, numpy or moviepy, so it will not disturb an existing CUDA, ROCm, DirectML or Apple Silicon install.

Example workflows

Load these from examples/ with Workflow → Open. Each one ships with a checkpoint name you will need to point at your own model.

| Workflow | Model | Notes | | --- | --- | --- | | deforum_base.json | SDXL | 3D camera move with depth warping. The best starting point. | | deforum_cadence.json | SDXL | Adds cadence frames between diffused frames for smoother motion. | | deforum_krea2_turbo.json | Krea-2 Turbo | 8-step turbo model, cfg 1. | | deforum_flux3_klein.json | FLUX.3 Image Klein (base) | 50 steps, cfg 4.0, euler / simple, with ModelSamplingFlux shift = ln(16). | | deforum_guided.json | SDXL | Scheduled guide images — pin an image to a keyframe and keep pulling towards it. | | deforum_integrated.json | SDXL | Whole animation inside one Deforum Single Sample node. |

Deforum on Krea-2 Turbo

Deforum on FLUX.3 Image Klein

Older workflows live in examples/legacy/; see the README there for what still works.

Running one

  1. Load the workflow and set Load Checkpoint (or the UNET/CLIP/VAE loaders) to a model you have.
  2. Queue the prompt. The first run renders frame 0.
  3. The Iterator node ships with enable_autoqueue on, so the run drives itself until it reaches max_frames. You can also queue manually, or use ComfyUI's own auto-queue.
  4. Save Video writes an .mp4 to your output folder once max_frames frames are cached.

To restart an animation from frame 0, tick reset_counter and reset_latent on the Iterator for one run, then untick them. Leaving them ticked pins the run to frame 0 forever.

Model support

The Iterator's latent_type defaults to auto. Wire your model into its model input and it reads the latent shape straight from ComfyUI, so new architectures work without waiting for this pack to be updated.

| Family | Latent | Works with auto | | --- | --- | --- | | SD 1.5 / SD 2.x / SDXL | 4 ch, /8 | yes | | SD 3 / SD 3.5 | 16 ch, /8 | yes | | FLUX.1 | 16 ch, /8 | yes | | FLUX.2 / FLUX.3 | 128 ch, /16 | yes | | Qwen-Image, Krea-2 | 16 ch, /8 | yes | | Stable Cascade | 16 ch, /42 | yes |

Leave model unconnected only if you want to pick the shape by hand from the dropdown.

Distilled models (Krea-2 Turbo, SDXL Turbo, FLUX schnell, the flux3-image-klein-* distilled checkpoints, …) want cfg_scale_schedule set to 0: (1) in Diffusion Parameters. At a higher cfg they burn out.

FLUX.3 Klein base is the opposite: flux3-image-klein-base-* is the CFG variant and wants real guidance. Follow Black Forest Labs' own settings — cfg_scale_schedule 0: (4.0), steps_schedule 0: (50), euler / simple, and a ModelSamplingFlux between the UNET and the samplers with both shifts set to ln(alpha) = ln(16) = 2.77259. deforum_flux3_klein.json is wired that way. Note that ComfyUI's own bundled FLUX.3 template uses cfg 1 for the base file; that is the distilled model's recipe and gives mush on the base weights.

Checkpoints without a text encoder. SD 3.5, FLUX and Qwen-Image are usually shipped as a bare diffusion model. Load Checkpoint then returns no CLIP and you get 'NoneType' object has no attribute 'tokenize'. Load the text encoders separately with CLIPLoader / DualCLIPLoader and feed that CLIP into Blend Conditionings, as deforum_flux3_klein.json does.

Guide images

Two different things, depending on what you want.

Seed the animation from an image. Encode it and feed the Iterator's init_latent input:

LoadImage ─► VAEEncode ─► (deforum) Iterator [init_latent]

That replaces the starting noise on frame 0 only. How closely frame 0 follows it is strength_schedule[0] in Diffusion Parameters.

Keep guiding later frames. Use Guide Image Schedule, between Frame Warp and the rest of the loop:

Frame Warp ─► Guide Image Schedule ─► Color Match ─► Add Noise ─► VAEEncode
                      ▲
   LoadImage ─► ImageBatch

It takes a batch of guide images and two schedules.

image_schedule picks which guide to use, by index into the batch. 0:(0), 60:(1) moves from the first guide to the second over 60 frames, and with crossfade_guides on, fractional values blend between neighbouring guides so the handover is smooth rather than a jump cut.

strength_schedule says how hard each frame is pulled towards it. 0 passes the frame through untouched, 1 replaces it outright.

Pulse it, don't hold it. This node sits inside the feedback loop, so a strength held across many frames compounds and the animation converges onto the guide — at a steady 0.12 the guide has effectively taken over within a dozen frames. What you usually want is a pulse at each keyframe, leaving the animation free in between:

0:(1.0), 2:(0.0), 58:(0.0), 60:(0.6), 62:(0.0)

That pins the first guide at frame 0, lets the animation run, then pulls hard towards the second guide at frame 60 and releases again. A sustained pull is still useful for locking composition, but keep it around 0.02–0.05.

How far the animation drifts back afterwards depends on strength_schedule in Diffusion Parameters — that is the denoise. At the low denoise deforum usually runs (0.2–0.5) the model has little room to redraw, so after a strong pulse the animation carries on from the guide rather than returning to what it was doing. That is what pinning a guide to a keyframe means; if you want the guide to read as a suggestion instead, use a smaller pulse or raise the denoise.

Guides are resized to the frame automatically, and an optional mask input restricts the guide to part of the frame. The node also outputs the resolved guide for the current frame, which is worth hanging a Preview on while you dial the schedules in.

deforum_guided.json is a working example; swap its two LoadImage nodes for your own images.

For conditioning-level guidance instead (ControlNet, IPAdapter), use Schedule Value: it reads any deforum schedule as a FLOAT for the current frame, so you can drive a ControlNet strength from the deforum timeline.

Schedules

Most parameter fields take a deforum schedule: frame: (expression), comma or newline separated, with t as the frame number.

0: (1.0), 30: (1.02), 60: (1.0)
0: (1.0025+0.002*sin(1.25*3.14*t/30))

Prompts are frame: text, one per line:

0: a lone astronaut walking across a vast red desert, cinematic
30: the desert dissolving into glowing crystal spires

Quotes around the prompt are optional and are stripped if present.

Prompt timing and blending

A prompt scheduled at frame N is rendered exactly as written from frame N. To crossfade into the next prompt, set prompt_blend_frames on the Iterator to the number of frames the fade should take; the fade ends on the next prompt's keyframe, so earlier prompts keep their timing. prompt_blend_curve picks linear or exponential. 0 frames means no blending at all.

Troubleshooting

IMPORT FAILED / nodes missing from the menu. The node pack now prints the missing module and the exact pip command for your interpreter. The usual cause is installing into a different Python than the one ComfyUI runs.

No module named 'deforum'.

python -m pip install git+https://github.com/XmYx/deforum-studio.git

No module named 'timm.layers'. timm is older than 1.0. Reinstall the requirements, or python -m pip install "timm>=1.0".

No module named 'moviepy.editor'. moviepy 2.x dropped that module. The video nodes handle both 1.x and 2.x now, so update this pack.

'NoneType' object is not subscriptable in KSampler. The deforum cache was empty. Branches that depend on a previous frame now stop quietly instead of crashing, so this should no longer reach you.

Frying / harsh edges after a few frames. Lower amount_schedule and noise_schedule, raise strength_schedule, and set color_coherence to LAB. Running a model below its native resolution (SDXL under 1024) does this too.

Colours drift over the clip. color_coherence on ColorMatch Parameters only does something if a Color Match node is actually in the graph, between Frame Warp and Add Noise. deforum_krea2_turbo.json and deforum_flux3_klein.json show the placement.

The animation never advances past frame 0. reset_counter / reset_latent are ticked on the Iterator. If you are using cadence, check that diffusion_cadence is smaller than max_frames — stepping by more than the whole animation resets the counter on every queue.

Python integer -1 out of bounds for uint64. A -1 in seed_schedule (deforum's "pick one for me") reached the noise generator. -1 is now resolved to a random seed whatever seed_behavior is set to, so update this pack.

Optional companion nodes

None of these are required, and this pack no longer installs anything on your behalf:

Contributing

  1. Fork the repository on GitHub.
  2. Create a branch for your change.
  3. Commit with clear messages.
  4. Open a pull request.

License

MIT. See LICENSE.

Community and support

Join Discord · deforum.art

Deforum Website Logo