From 7b7e16fa98c2a05d7187326925021902f13b7497 Mon Sep 17 00:00:00 2001 From: ExponentialML <59846140+ExponentialML@users.noreply.github.com> Date: Fri, 8 Mar 2024 12:57:08 -0800 Subject: [PATCH] Limit the value of attention strengths --- modules/modelscope_modules.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/modelscope_modules.py b/modules/modelscope_modules.py index 3e99394..0ad4593 100644 --- a/modules/modelscope_modules.py +++ b/modules/modelscope_modules.py @@ -66,7 +66,7 @@ class TemporalConvBlock_v2(nn.Module): x = self.conv4(x) if use_attn_strength(self.temporal_conv_strength): - x = identity + self.temporal_conv_strength * x + x = identity + (self.temporal_conv_strength * 0.1) * x else: x = identity + x return x @@ -351,7 +351,7 @@ class TemporalTransformer(nn.Module): # nn.Module -> SpatialTransformer x = rearrange(x, 'b c f h w -> (b f) c h w') if use_attn_strength(self.temporal_attn_strength): - x = self.temporal_attn_strength * x + x_in + x = (self.temporal_conv_strength * 0.1) * x + x_in else: x = x + x_in - return x \ No newline at end of file + return x