We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a80cb17 + c187b41 commit dbb643aCopy full SHA for dbb643a
backend/app/services/music_service.py
@@ -844,8 +844,9 @@ def _pad_audio_token(token):
844
else:
845
raise RuntimeError("Cannot load HeartCodec: codec_path not available")
846
847
- # Convert frames to codec device and dtype (important for MPS float16)
848
- frames_for_codec = frames.to(device=pipeline.codec_device, dtype=codec_dtype)
+ # Move frames to codec device (keep dtype as long for indexing)
+ # frames contains token IDs (integers) used as indices, so dtype must remain long
849
+ frames_for_codec = frames.to(device=pipeline.codec_device)
850
wav = pipeline.codec.detokenize(frames_for_codec)
851
852
# Cleanup codec if using lazy loading (free VRAM for next generation)
0 commit comments