From cbcb9c4e7fc2bf734395040f63a5573165bba11b Mon Sep 17 00:00:00 2001 From: MSXYZ-GenAI Date: Tue, 28 Apr 2026 09:53:14 +0300 Subject: [PATCH] Refactor highlight protection --- VideoTAADLAA.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/VideoTAADLAA.py b/VideoTAADLAA.py index cb24626..77c0eb9 100644 --- a/VideoTAADLAA.py +++ b/VideoTAADLAA.py @@ -396,9 +396,10 @@ class VideoTAADLAA: self.auto_static_motion_threshold = 0.015 self.auto_balanced_motion_threshold = 0.045 - self.luma_boost_base = 0.03 - self.saturation_boost_base = 0.06 + self.luma_boost_base = 0.03 + self.saturation_boost_base = 0.06 self.luma_highlight_protect = 0.6 + self.saturation_highlight_protect = 0.5 @classmethod def INPUT_TYPES(cls): @@ -841,7 +842,11 @@ class VideoTAADLAA: mean_rgb = dlaa_out.mean(dim=1, keepdim=True) - saturation_boost = self.saturation_boost_base * saturation_boost_mult * (1.0 - highlight_mask * 0.5) + saturation_boost = ( + self.saturation_boost_base * + saturation_boost_mult * + (1.0 - highlight_mask * self.saturation_highlight_protect) + ) dlaa_out = mean_rgb + (dlaa_out - mean_rgb) * (1.0 + saturation_boost) highlight_post_blend = self.highlight_post_blend * (