Nodes/RyanOnTheInside/Brightness Feature βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Brightness Feature βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Turn a video's lighting into a signal you can drive other nodes with

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Brightness Feature βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • images
  • FEATURE
β—„extraction_methodβ–Ύβ–Ί
β—„frame_rate30.0β–Ί
β—„width512β–Ί
β—„height512β–Ί

This node reads the brightness of your video frame-by-frame and turns it into a FEATURE - the pack's term for a driveable numeric signal, the same mechanism the audio and depth extractors produce. It's one of the simplest of the "Sources" family, and a good one to reach for when you want a reactive effect but don't have (or don't want) audio or MIDI driving it - the footage itself becomes the control signal.

How it works

You pick an extraction_method, and per frame it computes that specific measure of the input images, sampled at frame_rate and internally worked at widthΓ—height. The author's own tooltip lays out the six choices clearly: mean_brightness is the overall brightness of the scene; brightness_variance is high-contrast detection (how much brightness varies within a frame); brightness_histogram is the distribution of brightness values; and dark_ratio/mid_ratio/bright_ratio each give you the percentage of the frame sitting in that brightness band. A flash-cut scene will spike brightness_variance; a mostly-silhouette shot will have a high dark_ratio.

The inputs and outputs that matter

  • images (IMAGE, required) - "Input images to analyze," per the tooltip.
  • extraction_method - the measure to compute: mean_brightness, brightness_variance, brightness_histogram, dark_ratio, mid_ratio, or bright_ratio.
  • frame_rate (default 30, range 1–120) - frame rate of the input video.
  • width / height (default 512, range 64–4096) - resolution the feature is computed at.

Output: a single FEATURE, the per-frame brightness curve, ready to plug into anything in the pack that accepts a FEATURE - an emitter modulator, a mask modifier, or EffectVisualizer if you just want to see the curve overlaid on your video first.

How to install it

Via ComfyUI Manager: search "RyanOnTheInside," install, restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside.git
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt

then restart ComfyUI. This node runs on the pack's opencv-python/scikit-image dependencies - no model weights to download.

Common issues & troubleshooting

The feature signal looks flat and boring. You probably picked mean_brightness on footage that doesn't change much scene-to-scene. Try brightness_variance if what you actually want is a signal that reacts to contrast/motion between light and dark, not just overall exposure.

Signal doesn't line up with what you see in the video. Check frame_rate matches your actual footage's frame rate - set it wrong and the extracted curve gets sampled out of step with the frames it's supposed to describe.

Unsure what a value like "0.6" on dark_ratio actually means. It's a fraction of the frame in the dark band, not an absolute brightness - before wiring it into an effect, drop the output into EffectVisualizer for a sanity check; it burns the raw feature value onto your frames as text so you can see the numbers next to the footage they came from.

CategoryRyanOnTheInside/FlexFeatures/Sources

Inputs (5)

NameTypeDefaultDescription
extraction_methodCOMBOChoose how to analyze brightness: - mean_brightness: Overall brightness of the scene - brightness_variance: How much brightness varies - high for high contrast scenes - brightness_histogram: Distribution of brightness values - dark_ratio: Percentage of dark areas in the scene - mid_ratio: Percentage of medium-bright areas - bright_ratio: Percentage of bright areas
frame_rateFLOAT30.01–120Frame rate of the video (1.0 to 120.0 fps)
widthINT51264–4096Width of the output feature (64 to 4096)
heightINT51264–4096Height of the output feature (64 to 4096)
imagesIMAGEInput images to analyze

Outputs (1)

NameTypeDescription
FEATUREFEATUREβ€”