Nodes/Dream Project Animation Nodes/◐ Image Contrast Adjustment
ComfyUI Node

◐ Image Contrast Adjustment

Punch up (or flatten) any frame with one number β€” Image Contrast Adjustment

By alt-key-projectΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 114
◐ Image Contrast Adjustment
  • image
  • image
β—„factor1.00β–Ί

One float, one image out, zero mystery. Image Contrast Adjustment [Dream] is the simplest way to change a frame's contrast mid-workflow, and because it takes a factor input you can wire that number to a curve and animate the contrast frame by frame. In a Deforum-style render that's the difference between a static look and one that breathes.

This is one of the color nodes from the Dream Project Animation Nodes pack, a 2023-era suite built by qaozmojo (the "Alt Key Project" music channel) for frame-by-frame animation in ComfyUI. It's no longer actively maintained - the README points you to the author's newer pack, comfyui-dream-video-batches - but the utility nodes still do exactly what they say and have no heavy dependencies.

What it does

Under the hood it's a single Pillow call: ImageEnhance.Contrast(...).enhance(factor). A factor of 1.0 leaves the image untouched, anything above 1.0 pushes contrast up, and below 1.0 flattens it - 0.0 gives you a uniform gray. There's no minimum beyond 0 and no clamp on top, so you can push it hard if you want that crunchy look.

The factor input is a FLOAT, so the fun part is that you can drive it from a curve node - Sine Curve, CSV Curve, whatever you have handy - and your contrast now ebbs and flows with the animation instead of being glued to one setting.

The inputs that matter

  • image (IMAGE) - whatever frame you're processing.
  • factor (FLOAT) - 1.0 is neutral, above for punchier, below for flatter.

Output is a single image, so it drops into the same spot in the chain it came from.

When you'd actually use it

Two situations stand out. First, the pack's own prompt-morphing example uses brightness and contrast control as part of the visual pacing - fading a shot's punch in and out while the prompt drifts. Second, the classic frame-to-frame drift problem: long animations gradually get washed out or murky, and a touch of contrast correction on a reference pass fixes the feel without re-rendering.

Installing it

It ships inside the Dream Project Animation Nodes pack, so install the pack once and you get all the Dream nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/alt-key-project/comfyui-dream-project.git

Or use ComfyUI Manager and search "Dream Project Animation". Then restart ComfyUI. Dependencies are imageio, pilgram, scipy, torchvision, and evalidate - nothing model-sized, no downloads. One real gotcha: the pack pins numpy<2.0, which can collide with newer packs that assume NumPy 2. If you see a NumPy error after installing, that's the usual suspect.

You'll find it under the Dream β†’ image β†’ color menu. And if you want to also drop brightness, the sibling "Image Brightness Adjustment" node works identically and composes cleanly in series.

Category✨ Dream/πŸŒ„ image/🎨 color

Inputs (2)

NameTypeDefaultDescription
imageIMAGEβ€”
factorFLOAT1.00β€”

Outputs (1)

NameTypeDescription
imageIMAGEβ€”