Skip to content

Commit 07210a0

Browse files
committed
Fix infer-api.py not setting the format parameter
1 parent d612523 commit 07210a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

infer-api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
from acestep.pipeline_ace_step import ACEStepPipeline
66
from acestep.data_sampler import DataSampler
77
import uuid
8+
import traceback
89

910
app = FastAPI(title="ACEStep Pipeline API")
1011

1112
class ACEStepInput(BaseModel):
13+
format: str
1214
checkpoint_path: str
1315
bf16: bool = True
1416
torch_compile: bool = False
@@ -59,6 +61,7 @@ async def generate_audio(input_data: ACEStepInput):
5961

6062
# Prepare parameters
6163
params = (
64+
input_data.format,
6265
input_data.audio_duration,
6366
input_data.prompt,
6467
input_data.lyrics,
@@ -95,7 +98,7 @@ async def generate_audio(input_data: ACEStepInput):
9598
)
9699

97100
except Exception as e:
98-
raise HTTPException(status_code=500, detail=f"Error generating audio: {str(e)}")
101+
raise HTTPException(status_code=500, detail=f"Error generating audio: {str(e)}\n{traceback.format_exc()}")
99102

100103
@app.get("/health")
101104
async def health_check():

0 commit comments

Comments
 (0)