(checkpoint_path: str, bf16: bool, torch_compile: bool, device_id: int)
| 39 | message: str |
| 40 | |
| 41 | def 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) |
| 50 | async def generate_audio(input_data: ACEStepInput): |
no test coverage detected