Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion acestep/pipeline_ace_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
5 changes: 4 additions & 1 deletion infer-api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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():
Expand Down