Skip to content

Commit

Permalink
fix: import of weight_norm
Browse files Browse the repository at this point in the history
  • Loading branch information
syq163 committed Dec 11, 2023
1 parent 39f21ca commit 354af0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion models/hifigan/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import torch.nn.functional as F
import torch.nn as nn
from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d
from torch.nn.utils.parametrizations import weight_norm
try:
from torch.nn.utils.parametrizations import weight_norm
except:
from torch.nn.utils import weight_norm
from torch.nn.utils import remove_weight_norm, spectral_norm

LRELU_SLOPE = 0.1
Expand Down

0 comments on commit 354af0a

Please sign in to comment.