Fix init_weights in dac_utils.py for weight_norm Conv1d layers
Follow-up to #10. The audio VAE has a second, structurally identical \init_weights\ in \FL2VA/audio_vae/dac_utils.py\ (and its duplicate under \Ref2VA/\) that is applied to every conv in BigVGAN via \self.convs1.apply(init_weights)\ / \self.convs2.apply(...)\ / \self.conv_post.apply(...)\. BigVGAN wraps every \Conv1d\ in \ orch.nn.utils.parametrizations.weight_norm\, so under that API \m.weight\ is recomputed on access from \m.weight_g\ and \m.weight_v\ and the previous \m.weight.data.normal_(...)\ was a silent no-op for the stored parameters. Branch on the parametrized attributes and init the underlying \weight_v\ / \weight_g\ directly, matching the legacy \ orch.nn.utils.weight_norm\ behaviour this file historically targeted. Inference is unchanged (checkpoint weights are loaded via \load_state_dict\); the fix only matters when constructing the model from scratch, where the old code left BigVGAN's conv stacks at their default initialization. The \dac_utils.py\ source is duplicated verbatim across \FL2VA/\ and \Ref2VA/\, so the same change is applied to both copies.
K
Karan Dhaodiyal committed
c22aafa3073efdc4ad94f8ec82889b9e736331c0
Parent: b7227fa