From 07210a00759c07a88d9765ca06d540a1476eb2af Mon Sep 17 00:00:00 2001 From: Alexander Schier Date: Mon, 23 Jun 2025 23:10:18 +0200 Subject: [PATCH 1/2] Fix infer-api.py not setting the format parameter --- infer-api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infer-api.py b/infer-api.py index 591fb3eb..4e403dd2 100644 --- a/infer-api.py +++ b/infer-api.py @@ -5,10 +5,12 @@ from acestep.pipeline_ace_step import ACEStepPipeline from acestep.data_sampler import DataSampler import uuid +import traceback app = FastAPI(title="ACEStep Pipeline API") class ACEStepInput(BaseModel): + format: str checkpoint_path: str bf16: bool = True torch_compile: bool = False @@ -59,6 +61,7 @@ async def generate_audio(input_data: ACEStepInput): # Prepare parameters params = ( + input_data.format, input_data.audio_duration, input_data.prompt, input_data.lyrics, @@ -95,7 +98,7 @@ async def generate_audio(input_data: ACEStepInput): ) except Exception as e: - raise HTTPException(status_code=500, detail=f"Error generating audio: {str(e)}") + raise HTTPException(status_code=500, detail=f"Error generating audio: {str(e)}\n{traceback.format_exc()}") @app.get("/health") async def health_check(): From a9f300ab708864547d3e055fb6765fadabacb320 Mon Sep 17 00:00:00 2001 From: Alexander Schier Date: Mon, 23 Jun 2025 23:16:17 +0200 Subject: [PATCH 2/2] Fix ensure_directory to handle empty strings When save_path is a filename without directory, os.dirname(save_path) is an empty string and ensure_directory fails. This adds a check if the directory variable contains an empty string before running os.makedirs. --- acestep/pipeline_ace_step.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acestep/pipeline_ace_step.py b/acestep/pipeline_ace_step.py index 01207779..dc9ac3a0 100644 --- a/acestep/pipeline_ace_step.py +++ b/acestep/pipeline_ace_step.py @@ -82,7 +82,7 @@ def ensure_directory_exists(directory): directory = str(directory) - if not os.path.exists(directory): + if directory and not os.path.exists(directory): os.makedirs(directory)