Nodes/Dream Project Animation Nodes/πŸ“ˆ Triangle Event Curve
ComfyUI Node

πŸ“ˆ Triangle Event Curve

One sharp spike, exactly on cue

By alt-key-projectΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 114
πŸ“ˆ Triangle Event Curve
  • frame_counter
  • FLOAT
  • INT
β—„max_value1.00β–Ί
β—„min_value0.00β–Ί
β—„width_seconds1.00β–Ί
β—„center_seconds10.00β–Ί

If Smooth Event Curve is a bell, Triangle Event Curve [Dream] is a spike. It produces a single triangular pulse - straight line up, straight line back down - at one chosen moment, and sits at min_value the rest of the time. Where the smooth version rounds everything off, this one is deliberately sharp: a hard punch, a snappy camera kick, a crisp hit on a beat. It's the event curve you reach for when "soft and gentle" is the last thing you want.

It's part of Dream Project Animation Nodes, the pack built by the "Alt Key Project" music channel for Deforum-style animation in ComfyUI. The mechanism is exactly what it looks like in the source: you set center_seconds (when the peak lands) and width_seconds (the total width of the pulse). The triangle rises linearly from min_value at the leading edge to max_value at the center, then falls linearly back to min_value at the trailing edge. Outside that window it holds min_value. Every frame before the pulse, during it, and after it is a simple linear interpolation - no surprise easing, no undershoot, fully predictable.

The inputs that matter

  • frame_counter - required. Any Dream frame counter works (Frame Counter (Simple) is the easy one); time is read in seconds.
  • center_seconds - when the spike peaks. Default 10; move it to wherever the event lands in your clip.
  • width_seconds - how wide the triangle is, minimum 0.1. Narrow = a single-frame jab; wide = a slow ramp up and down.
  • min_value / max_value - the floor and the peak of the pulse.

Outputs are FLOAT and INT - same value, one rounded. FLOAT for continuous parameters like zoom or weight; INT for whole-number destinations.

Installing it

Install the pack through ComfyUI Manager - search "Dream Project Animation Nodes" - or clone it manually:

cd ComfyUI/custom_nodes
git clone https://github.com/alt-key-project/comfyui-dream-project.git
cd comfyui-dream-project
pip install -r requirements.txt

Restart ComfyUI. Dependencies are light; just be aware of the numpy<2.0 pin if pip starts rearranging your environment.

Common issues

The usual stumble is forgetting the frame_counter input - no Dream counter upstream, no output. ComfyUI's built-in primitives don't emit a FRAME_COUNTER, so pull one from the pack's own counter nodes. One thing to know about the pack overall: the README states it's no longer being updated (the author moved on to comfyui-dream-video-batches). For a twelve-line triangle pulse that's a non-issue - it runs on current ComfyUI as-is. Want the same single event but softened into a bell shape? That's Smooth Event Curve, one slot over in the menu.

Category✨ Dream/πŸŽ₯ animation/πŸ“ˆ curves

Inputs (5)

NameTypeDefaultDescription
frame_counterFRAME_COUNTERβ€”
max_valueFLOAT1.00β€”
min_valueFLOAT0.00β€”
width_secondsFLOAT1.00β€”
center_secondsFLOAT10.00β€”

Outputs (2)

NameTypeDescription
FLOATFLOATβ€”
INTINTβ€”