(content: bytes, output_path: str)
| 34 | |
| 35 | def save_result(content: bytes, output_path: str) -> Path: |
| 36 | output = Path(output_path) |
| 37 | output.parent.mkdir(parents=True, exist_ok=True) |
| 38 | output.write_bytes(content) |
| 39 | return output |
| 40 | |
| 41 | |
| 42 | def main() -> None: |
| 43 | parser = argparse.ArgumentParser(description="Call /v1/tasks/sync for T2I and save final image.") |