Nodes/MKRShift_Nodes/Video Gamma + Contrast
ComfyUI Node

Video Gamma + Contrast

Grade a whole clip — gamma, contrast, brightness, saturation — without a grading app

By criskb·Created 7 months ago·Updated 5 months ago· 0
Video Gamma + Contrast
  • video
  • video
  • output_path
  • summary
gamma1.00
contrast1.00
brightness0.00
saturation1.00
fallback_fps24.0
output_formatauto
filename_prefixMKR_video_grade
subfolder
overwritefalse
filename_label

MKRVideoGammaContrast is a four-control color grade for an entire clip: gamma, contrast, brightness, and saturation, applied to every frame and written back out as a new video. If your generated video is washed out, too dark, or too desaturated, this is the one-stop fix - no curves, no LUTs, no separate app. It's the video cousin of the deterministic pixel operations the post-processing world has always had, wrapped as a node.

Mechanically it's a per-frame numpy pass. Each frame is decoded to float, then: gamma applies a power curve (pixel^(1/gamma) - so gamma above 1 lifts shadows, below 1 crushes them), contrast pivots around 0.5 ((x - 0.5) * contrast + 0.5), saturation mixes toward a Rec.709 luma, and brightness is an additive offset. All defaults are neutral (1 / 1 / 0 / 1), so with nothing changed the clip passes through and re-encodes untouched. The whole thing is decode → grade → encode, which means it re-encodes every frame - predictable, but not instant on long clips.

The inputs that matter

  • gamma - 0.1–4.0, default 1.0. The workhorse. Values around 0.8–1.2 cover most "lift/crush" fixes.
  • contrast - 0.1–4.0, default 1.0.
  • brightness - −1 to 1, default 0. Additive; you'll usually want contrast + gamma adjustments to do the heavy lifting and keep this near 0.
  • saturation - 0–4.0, default 1.0. 0 is a full desat (or a head start on a look), 2 is punchy.
  • video, fallback_fps, output_format, filename_prefix, subfolder, overwrite - the standard pack inputs.

Outputs: video (MKR_VIDEO payload), output_path, and a summary echoing the four values you used plus any warnings.

Install

Part of MKRShift Nodes - install the pack, not the node:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

or ComfyUI Manager → search MKRShift_Nodes → restart. mp4/mov/webm output needs system ffmpeg on PATH (README is explicit about this); gif/webp work without it. No pip dependencies.

Where people get burned

The usual gotcha is scope: this is an 8-bit, re-encode-everything grade. It's perfect for previews and fast look decisions, but it's not where you do a final pass on a master that matters - a real grading suite keeps more headroom. Also remember brightness is additive, so cranking it doesn't clip gracefully; push contrast and gamma first. And the output is silent - frame-based processing, no audio carried through, so mux sound back if the clip had any.

CategoryMKRShift Nodes/Media/Video/FX

Inputs (11)

NameTypeDefaultDescription
video*
gammaFLOAT1.000.1–4
contrastFLOAT1.000.1–4
brightnessFLOAT0.00-1–1
saturationFLOAT1.000–4
fallback_fpsFLOAT24.01–240
output_formatCOMBOauto6 options: auto, gif, webp, mp4, mov, webm
filename_prefixSTRINGMKR_video_grade
subfolderSTRING
overwriteBOOLEANfalse
filename_labeloptSTRING

Outputs (3)

NameTypeDescription
videoMKR_VIDEO
output_pathSTRING
summarySTRING