FX Processors
StreamDiffusionTD v0.3.1 includes a built-in FX processor system that lets you apply effects at different stages of the diffusion pipeline. Two processors ship with the operator, and you can create your own by dropping Python files into a folder.
All FX parameters update live over OSC without restarting the stream.
How the Pipeline Works
FX processors hook into four stages of the generation pipeline:
[input image]
|
image_pre -- feedback_loop and feedback_grade run here
|
VAE encode
|
latent_pre (open for custom processors)
|
diffusion
|
latent_post (open for custom processors)
|
VAE decode
|
image_post (open for custom processors)
|
[output] Both built-in processors run at the image_pre stage, which means they modify the input image before it gets encoded into latent space by the VAE. Because they run before encoding, their effects compound through the feedback loop. The diffusion model reinterprets the adjusted image each frame, creating effects that accumulate and evolve over time.
The latent_pre, latent_post, and image_post stages are available for custom processors.
Built-in Processors
feedback_loop
Stage: image_pre
Blends the previous output frame back into the current input with optional zoom, pan, and rotation. This is the classic Deforum-style loopback effect. The diffusion model “chases” the transformed result each frame, creating cumulative motion like infinite zoom or continuous rotation.
| Parameter | Default | Range | What it does |
|---|---|---|---|
| feedback_strength | 0.8 | 0.0 - 1.0 | How much of the previous frame feeds back. 0 = no loop, 1 = pure feedback |
| zoom | 1.0 | 0.75 - 1.5 | Zoom applied each frame. Values above 1.0 zoom in. 1.01 is subtle, 1.05 is fast |
| pan_x | 0.0 | -0.15 - 0.15 | Horizontal pan (normalized to frame width) |
| pan_y | 0.0 | -0.15 - 0.15 | Vertical pan |
| rotation | 0.0 | -10.0 - 10.0 | Degrees of rotation per frame |
| border_mode | zeros | zeros / border / reflection | How edges fill when the image shifts. zeros = black, border = repeat edge, reflection = mirror |
Tips:
- Start with
feedback_strengtharound 0.5-0.7 and small transform values - Transforms accumulate every frame, so small values go a long way
- Pairs well with
feedback_gradefor geometry + color compounding together
feedback_grade
Stage: image_pre
Color grading that compounds through the feedback loop. Because this runs before VAE encoding (not after), adjustments accumulate each frame as the diffusion model reinterprets the shifting colors. This creates effects that aren’t possible with post-processing alone: slow hue cycling, progressive contrast pumping, saturation build-up, and temperature evolution.
Processing order: black_level, brightness, contrast, gamma, saturation, hue rotation, temperature, invert. All adjustments are scaled by the master strength parameter.
| Parameter | Default | Range | What it does |
|---|---|---|---|
| strength | 0.0 | 0.0 - 1.0 | Master strength. 0 = off, scales all other adjustments |
| brightness | 0.0 | -0.5 - 0.5 | Additive brightness. Small values accumulate fast through feedback |
| contrast | 1.0 | 0.5 - 2.0 | Contrast around midpoint. Above 1.0 compounds into dramatic light/dark separation |
| saturation | 1.0 | 0.0 - 2.0 | Saturation multiplier. Above 1.0 compounds into hypersaturation |
| gamma | 1.0 | 0.5 - 2.0 | Gamma curve. Below 1.0 = darker mids, above 1.0 = brighter mids |
| black_level | 0.0 | 0.0 - 0.3 | Lift shadows. Compounds: shadows get progressively crushed |
| hue_degrees | 0.0 | -30.0 - 30.0 | Hue rotation per frame in degrees. Creates slow color cycling through the loop |
| temperature | 0.0 | -1.0 - 1.0 | Color temperature shift. -1 = cool/blue, +1 = warm/orange |
| invert | 0.0 | 0.0 - 1.0 | Color inversion blend. Compounds into psychedelic color cycling |
Tips:
- Set
strengthfirst, then adjust individual parameters. At strength 0 everything is off - Because all adjustments compound, use subtle values. Brightness of 0.05 with feedback is already visible after a few frames
- Hue rotation is the standout feature here. A few degrees per frame creates smooth color cycling that the diffusion model reinterprets each pass
- Use brightness to compensate for the VAE’s gray floor tendency in long feedback loops
Using Both Processors Together
Enable both feedback_loop and feedback_grade for geometry + color compounding. The feedback loop handles zoom/pan/rotation while the grade shifts colors, and both effects accumulate through the feedback path each frame. This is the primary creative combo for Deforum-style generative loops.
Custom Processors
You can create your own FX processors by adding Python files to the custom_processors/ directory in your StreamDiffusion base folder. Processors are auto-discovered on stream start.
Basic structure
Create a subfolder in custom_processors/ with:
- A Python file containing your processor class
- A
processors.yamlmanifest mapping your class to a registry name
The processor class extends BasePreprocessor (or PipelineAwareProcessor if you need access to the pipeline state) and implements a __call__ method that receives and returns a tensor.
Custom processors can target any of the four stages (image_pre, latent_pre, latent_post, image_post). Parameters defined in your processor metadata are automatically generated as TouchDesigner parameters on the operator.
Claude skill
A Claude skill for creating custom FX processors ships with the operator and is placed in your base folder’s .claude/skills/ directory on first run. If you use Claude Code or similar tools, this skill guides you through the correct base class, metadata format, stage selection, and tensor range conventions.
Notes
- FX processors require the Local backend. They are not available on Daydream Cloud
- Processor code changes require a stream stop/start to pick up (no hot-reload yet)
- The
latent_pre,latent_post, andimage_poststages are available for custom processors but have no built-in processors yet