Open-Source Frontier Voice AI
Python
fix: MockCacheLayer.get_mask_sizes must include query_length (#303)
Ran79e516a3e20b
diff --git a/vibevoice/modular/modeling_vibevoice_streaming_inference.py b/vibevoice/modular/modeling_vibevoice_streaming_inference.pyindex 251b927..70a4895 100644--- a/vibevoice/modular/modeling_vibevoice_streaming_inference.py+++ b/vibevoice/modular/modeling_vibevoice_streaming_inference.py@@ -49,8 +49,9 @@ class MockCacheLayer:def get_mask_sizes(self, cache_position):"""Return KV length and offset for mask creation."""- kv_length = self.key_cache.shape[2] if self.key_cache is not None else 0- return kv_length, 0+ seq_length = self.key_cache.shape[2] if self.key_cache is not None else 0+ query_length = cache_position.shape[0]+ return seq_length + query_length, 0def update(self, key_states, value_states, cache_kwargs=None):"""Update the cache with new key/value states."""