Skip to content

Commit 33d385c

Browse files
author
ambsd
committed
fix: Handle None lyrics in pipeline input
heartlib's preprocess() expects lyrics to be a string, not None. Pass empty string when lyrics is not provided.
1 parent 96580e8 commit 33d385c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/app/services/music_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,7 @@ def _run_pipeline():
15291529

15301530
with torch.no_grad():
15311531
pipeline_inputs = {
1532-
"lyrics": request.lyrics,
1532+
"lyrics": request.lyrics or "", # heartlib expects string, not None
15331533
"tags": sound_tags,
15341534
}
15351535
if ref_audio_path:

0 commit comments

Comments
 (0)