From 85eb7265dbe5e79bf27d31ca6dfea828b6812039 Mon Sep 17 00:00:00 2001 From: Zhaobin Chu Date: Sat, 6 Sep 2025 13:56:52 +0800 Subject: [PATCH] fix: lora_B init zeros (#781) Co-authored-by: zbchu2 Co-authored-by: Wenxuan Tan --- fastvideo/layers/lora/linear.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastvideo/layers/lora/linear.py b/fastvideo/layers/lora/linear.py index cb1fc9927..78ab036c2 100644 --- a/fastvideo/layers/lora/linear.py +++ b/fastvideo/layers/lora/linear.py @@ -63,7 +63,7 @@ class BaseLayerWithLoRA(nn.Module): device=self.base_layer.weight.device, dtype=self.base_layer.weight.dtype)) torch.nn.init.kaiming_uniform_(self.lora_A, a=math.sqrt(5)) - torch.nn.init.kaiming_uniform_(self.lora_B, a=math.sqrt(5)) + torch.nn.init.zeros_(self.lora_B) else: self.lora_A = None self.lora_B = None