Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid repeated upsampling of spectrogram #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xcmyz
Copy link

@xcmyz xcmyz commented Sep 16, 2022

No description provided.

@@ -142,16 +142,17 @@ def __init__(self, params):
self.output_projection = Conv1d(params.residual_channels, 1, 1)
nn.init.zeros_(self.output_projection.weight)

def forward(self, audio, diffusion_step, spectrogram=None):
def forward(self, audio, diffusion_step, spectrogram=None, infer=False):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent change - thanks for sending a PR.

Instead of adding a boolean flag, can we have both the training and inference code run the upsampler before passing it in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants