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

Changed rounding to 0 to avoid AssertionError on line 567 #28

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bark/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,8 @@ def generate_coarse(
and x_coarse_history.min() >= 0
and x_coarse_history.max() <= CODEBOOK_SIZE - 1
and (
round(x_coarse_history.shape[-1] / len(x_semantic_history), 1)
== round(semantic_to_coarse_ratio / N_COARSE_CODEBOOKS, 1)
round(x_coarse_history.shape[-1] / len(x_semantic_history), 0)
== round(semantic_to_coarse_ratio / N_COARSE_CODEBOOKS, 0)
)
)
x_coarse_history = _flatten_codebooks(x_coarse_history) + SEMANTIC_VOCAB_SIZE
Expand Down