Skip to content

Commit

Permalink
fix register_buffer in MimiEuclideanCodebook (#35759)
Browse files Browse the repository at this point in the history
Co-authored-by: eustlb <94853470+eustlb@users.noreply.github.com>
  • Loading branch information
anferico and eustlb authored Jan 20, 2025
1 parent abe57b6 commit 56afd2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/models/mimi/modeling_mimi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ def __init__(self, config: MimiConfig, epsilon: float = 1e-5):

self.codebook_size = config.codebook_size

self.register_buffer("initialized", torch.Tensor([True]))
self.register_buffer("initialized", torch.tensor([True], dtype=torch.float32))
self.register_buffer("cluster_usage", torch.ones(config.codebook_size))
self.register_buffer("embed_sum", embed)
self._embed = None
Expand Down

0 comments on commit 56afd2f

Please sign in to comment.