Video Degradation (TrentNodes)
Make clean renders look like real footage, on purpose
- images
- degraded_images
- degradation_map
There are two reasons to degrade a clean video, and they're both real: making synthetic training pairs for restoration models, and making an AI render look like it actually came off a 2005 camcorder. Video Degradation does both, with temporally coherent degradation - meaning the artifacts persist across frames the way real ones do, instead of flickering in and out frame by frame.
That temporal coherence is the whole ballgame for training pairs. A per-frame random degradation produces noise the model learns to amplify; a coherent degradation produces the kind of consistent corruption a real video has, which is what actually teaches a restoration network to clean things up. The node is explicitly built for generating synthetic training pairs, with 15 presets that fake plausible real-world sources.
How it works
Feed it images (float32 frames in [0,1]) and a seed for reproducibility, and pick from 15 degradation_preset options: custom plus mild/moderate/severe, phone_indoor, social_media_reupload, zoom_call, dashcam, night_handheld, old_youtube, old_vhs, shaky_handheld, security_cam, livestream, old_film, underwater. Each preset sets a bundle of degradation parameters; custom lets you set them yourself.
The custom knobs are extensive and each has a temporal behavior:
- Motion blur -
motion_blur_intensity(maps to kernel size 3-45) andmotion_blur_angle_mode(random_consistent,random_per_frame,horizontal,vertical,diagonal) - Defocus -
defocus_intensitywithdefocus_mode(uniform,breathing,rack_focus,edge_softness) - Noise -
noise_intensityandnoise_type(gaussian,poisson,film_grain,sensor,mixed) - Compression artifacts -
compression_qualityandcompression_mode(jpeg,h264_sim,blockiness) - Chromatic aberration, temporal flicker, resolution degradation, color degradation, interlacing, rolling shutter, vignette, lens distortion - each a 0-1 intensity
Everything is GPU-accelerated, and outputs are degraded_images plus a degradation_map - a JSON string describing exactly what was applied. That map is genuinely useful for training: your label doesn't have to be guessed, because the node tells you the recipe.
The two honest uses
Training pairs: render clean frames, run this node, and you've got (degraded, map) pairs without filming or scraping anything. This is the "synthetic training data" play, and it's why the temporal controls exist - random_consistent motion blur and breathing defocus behave like real optics.
Aesthetic degradation: VHS, dashcam, old-film looks for a stylized render. The presets make this a one-click thing. It's the same node, and honestly the aesthetic use is where most people start.
Gotchas
- The presets override your custom settings - pick
customif you want to dial individual parameters, or a preset if you want a known look. Don't set both and wonder which won. interlacingneeds 2+ frames (it interlaces between frame pairs), so a single-frame test won't show it.- A
seedof 0 is the default; if you want varied degradation across runs, randomize it - but for training pairs, fixing the seed is how you get reproducible examples.
Install
Part of TrentNodes (TrentHunter82/TrentNodes):
# ComfyUI Manager: search "Trent Nodes"
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes && pip install -r requirements.txt
No model downloads - all degradation is procedural on the pack's core opencv/numpy/torch stack. If you've been hand-rolling "add noise, add blur" with a pile of image-ops nodes, this is the version that keeps it coherent across frames, which is the part the manual approach always gets wrong.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Batch of video frames (B, H, W, C) float32 in [0, 1] | |
| seed | INT | 00–4294967295 | Random seed for reproducible degradation |
| degradation_preset | COMBO | custom | Quick presets that override individual parameters. 'custom' uses your settings. |
| motion_blur_enabledopt | BOOLEAN | false | Toggle motion blur |
| motion_blur_intensityopt | FLOAT | 0.000–1 | Motion blur strength (maps to kernel size 3-45) |
| motion_blur_angle_modeopt | COMBO | random_consistent | How blur direction is determined across frames |
| defocus_enabledopt | BOOLEAN | false | Toggle defocus/out-of-focus blur |
| defocus_intensityopt | FLOAT | 0.000–1 | Defocus strength (maps to sigma 0.5-15.0) |
| defocus_modeopt | COMBO | uniform | Temporal behavior of defocus blur across frames |
| noise_enabledopt | BOOLEAN | false | Toggle noise injection |
| noise_intensityopt | FLOAT | 0.000–1 | Noise strength |
| noise_typeopt | COMBO | gaussian | Type of noise to add |
| compression_enabledopt | BOOLEAN | false | Toggle compression artifacts |
| compression_qualityopt | INT | 1001–100 | Quality level (lower = more artifacts) |
| compression_modeopt | COMBO | jpeg | Type of compression artifact to simulate |
| chromatic_aberrationopt | FLOAT | 0.000–1 | Color fringing at edges, especially toward borders |
| temporal_flickeropt | FLOAT | 0.000–1 | Per-frame brightness/contrast variation |
| resolution_degradationopt | FLOAT | 0.000–1 | Detail loss via downscale+upscale (0=none, 1=4x downscale) |
| color_degradationopt | FLOAT | 0.000–1 | Desaturation, color shift, and banding |
| interlacingopt | FLOAT | 0.000–1 | Interlacing/combing artifacts (needs 2+ frames) |
| rolling_shutteropt | FLOAT | 0.000–1 | Rolling shutter skew simulation |
| vignetteopt | FLOAT | 0.000–1 | Dark corner vignetting |
| lens_distortionopt | FLOAT | 0.000–1 | Barrel/pincushion lens distortion |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| degraded_images | IMAGE | Degraded video frames |
| degradation_map | STRING | JSON describing all applied degradations |