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

Update overlap_add.py, auto casting device for window #675

Merged
merged 1 commit into from
Sep 3, 2023

Conversation

popcornell
Copy link
Collaborator

allows to use LambdaOverlapAdd also on GPU without calling before .to on the instantiated module.

allows to use LambdaOverlapAdd also on GPU without calling before .to on the instantiated module.
@@ -113,7 +113,7 @@ def ola_forward(self, x):
frame = _reorder_sources(frame, out[-1], n_src, self.window_size, self.hop_size)

if self.use_window:
frame = frame * self.window
frame = frame * self.window.to(frame)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I didn't know you could pass a tensor directly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah or call frame.device.
If you pass a tensor it also casts to the same type

@mpariente mpariente merged commit 68c2669 into master Sep 3, 2023
8 of 9 checks passed
@mpariente mpariente deleted the popcornell-patch-1 branch September 3, 2023 12:33
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