Skip to content

SOTA Open Source TTS

Fix original shape matching with crop (#673)

Yuchao Zhang911e037855c0
diff --git a/fish_speech/models/vqgan/modules/fsq.py b/fish_speech/models/vqgan/modules/fsq.py
index 7ea4853..954553b 100644
--- a/fish_speech/models/vqgan/modules/fsq.py
+++ b/fish_speech/models/vqgan/modules/fsq.py
@@ -99,7 +99,7 @@ class DownsampleFiniteScalarQuantize(nn.Module):
if diff > 0:
result.z = F.pad(result.z, (left, right))
elif diff < 0:
- result.z = result.z[..., left:-right]
+ result.z = result.z[..., -left:right]
return result