MCPcopy Create free account
hub / github.com/ace-step/ACE-Step / initialize_pipeline

Function initialize_pipeline

infer-api.py:41–47  ·  view source on GitHub ↗
(checkpoint_path: str, bf16: bool, torch_compile: bool, device_id: int)

Source from the content-addressed store, hash-verified

39 message: str
40
41def initialize_pipeline(checkpoint_path: str, bf16: bool, torch_compile: bool, device_id: int) -> ACEStepPipeline:
42 os.environ["CUDA_VISIBLE_DEVICES"] = str(device_id)
43 return ACEStepPipeline(
44 checkpoint_dir=checkpoint_path,
45 dtype="bfloat16" if bf16 else "float32",
46 torch_compile=torch_compile,
47 )
48
49@app.post("/generate", response_model=ACEStepOutput)
50async def generate_audio(input_data: ACEStepInput):

Callers 1

generate_audioFunction · 0.85

Calls 1

ACEStepPipelineClass · 0.90

Tested by

no test coverage detected