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

Why is MBD not allowed for stereo? #9

Open
ajayarora1235 opened this issue Jan 10, 2024 · 0 comments
Open

Why is MBD not allowed for stereo? #9

ajayarora1235 opened this issue Jan 10, 2024 · 0 comments

Comments

@ajayarora1235
Copy link

ajayarora1235 commented Jan 10, 2024

They specify how to do MBD for stereo in the docs, here's how I've implemented it. Happy to make a PR for this as well.

output_2 = model_2.generate(
    descriptions=[
        description
    ],
    progress=True, return_tokens=True
)

tokens = output_2[1]
left, right = model_2.compression_model.get_left_right_codes(tokens)
tokens = torch.cat([left, right])
outputs_diffusion_2 = mbd.tokens_to_wav(tokens)
assert outputs_diffusion_2.shape[1] == 1  # output is mono
outputs_diffusion_2 = rearrange(outputs_diffusion_2, '(s b) c t -> b (s c) t', s=2)
``` /
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

No branches or pull requests

1 participant