From 1f4e4afd2af1785f1019388571f68154be1c476a Mon Sep 17 00:00:00 2001 From: MSXYZ-GenAI Date: Sat, 18 Apr 2026 12:42:26 +0300 Subject: [PATCH] Temporal stability improvements + ghosting reduction --- VideoTAADLAA.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VideoTAADLAA.py b/VideoTAADLAA.py index 8fe0f59..d440f9e 100644 --- a/VideoTAADLAA.py +++ b/VideoTAADLAA.py @@ -66,10 +66,10 @@ class _TAAState: frame[:, 2:3] * 0.114 ) - # Highlight mask to prevent flickering in bright areas (Tuned: 0.75 threshold) + # Highlight mask to prevent flickering in bright areas highlight_mask = torch.sigmoid((luma - 0.75) * 15.0) - # 3x3 Neighborhood AABB Clipping (Negative pooling trick for max efficiency) + # 3x3 Neighborhood Clipping local_min = -F.max_pool2d(-frame, 3, 1, 1) local_max = F.max_pool2d(frame, 3, 1, 1) history_clamped = torch.minimum(torch.maximum(self.history, local_min), local_max)