diff --git a/vibevoice/modular/modeling_vibevoice_streaming_inference.py b/vibevoice/modular/modeling_vibevoice_streaming_inference.py index 70a48958..79c662c5 100644 --- a/vibevoice/modular/modeling_vibevoice_streaming_inference.py +++ b/vibevoice/modular/modeling_vibevoice_streaming_inference.py @@ -890,7 +890,8 @@ def sample_speech_tokens(self, condition, neg_condition, cfg_scale=3.0): speech = torch.randn(condition.shape[0], self.config.acoustic_vae_dim).to(condition) for t in self.model.noise_scheduler.timesteps: half = speech[: len(speech) // 2] - combined = torch.cat([half, half], dim=0) + other_half = speech[len(speech) // 2:] + combined = torch.cat([half, other_half], dim=0) eps = self.model.prediction_head(combined, t.repeat(combined.shape[0]).to(combined), condition=condition) cond_eps, uncond_eps = torch.split(eps, len(eps) // 2, dim=0) half_eps = uncond_eps + cfg_scale * (cond_eps - uncond_eps)