Choreographing Diffusion Animations with Deforum
Learning objectives
- learner can write keyframe schedules and mode-scoped motion parameters that accumulate coherently per frame
- learner can control 3D FOV/translation, strength and CFG schedules, and inject Perlin noise
- learner can counteract progressive blur over a long animation with an unsharp-mask anti-blur pass
Capstone — one whole task that evidences the objectives
Choreograph a 30-second Deforum animation timed to a track: write keyframe schedules for prompts, 3D FOV/translation_z, strength and CFG, tune per-frame motion accumulation, add Perlin-noise variation, and apply anti-blur unsharp masking so the sequence stays sharp over its full length.
Prerequisite modules
This module is about treating a diffusion animation like a musical score. In an AV livecoding or VJ practice, Deforum is how you pre-render a visual pass that breathes with a track: camera pushes on the drop, prompt morphs across a phrase, texture shimmering in the quiet bars. The whole task is choreography — a 30-second sequence where every parameter change lands on a musical moment, not a slideshow of pretty frames.
The scaffolding arc starts with the grammar. First drill the keyframe schedule syntax (frame:value pairs with linear interpolation) until writing 0:(1.0), 120:(0.6) is reflexive, and internalize that motion operators apply per frame and accumulate — a 1.02 zoom is a rocket over 100 frames. Then run a supported exercise: a short 3D-mode clip where you feel how mode-scoped parameters silently ignore anything outside the active mode, and how FOV rescales the punch of translation_z. Next layer in the identity controls — strength as frame-to-frame memory, CFG as prompt grip — keyframing both to relax through transitions and tighten on stable sections, and add Perlin noise for organic, spatially coherent variation instead of uniform grain. Finally, the failure mode every long render hits: progressive blur. The unsharp-mask anti-blur pass is the how-to pointer you reach for just in time, tuning amount and threshold so edges stay crisp without blemishing smooth areas.
Every required atom gates the capstone directly — you cannot schedule, move, stabilize, texture, or sharpen the sequence without them. The supporting atoms (Stable Diffusion as a three-network pipeline, text2img versus img2img) enrich your mental model of what Deforum is driving underneath, which helps debugging but is not needed to ship the animation.
Runnable examples
Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.
noise-field
noise(4, 0.1).out()
hydra-0002 · CC0-1.0
float h21(vec2 p){return fract(sin(dot(p,vec2(12.9898,78.233)))*43758.5453);}
glsl-0013 · public-domain
Atoms in this module
Required — these gate the capstone
Supporting — enrichment, not gating
Part of curricula
- Generative & AI AV Artist — real-time machine-driven performance — Engineer steerable real-time diffusion visuals optional