diff --git a/README.md b/README.md index 8269f2e..13432ff 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ better understanding of their performance and scalability. Running on an A100 80G SXM hosted at [fal.ai](https://fal.ai). -| | mean (s) | median (s) | min (s) | max (s) | -|------------------|----------|------------|---------|---------| -| Diffusers SD1.5 | 1.619s | 1.614s | 1.603s | 1.645s | -| Diffusers SDXL | 5.916s | 5.917s | 5.909s | 5.927s | +| | mean (s) | median (s) | min (s) | max (s) | speed (it/s) | +|------------------|----------|------------|---------|---------|--------------| +| Diffusers SD1.5 | 1.619s | 1.614s | 1.603s | 1.645s | 30.97 it/s | +| Diffusers SDXL | 5.916s | 5.917s | 5.909s | 5.927s | 8.45 it/s | Generation options: diff --git a/benchmarks/update_table.py b/benchmarks/update_table.py index 742a451..beb0de9 100644 --- a/benchmarks/update_table.py +++ b/benchmarks/update_table.py @@ -4,10 +4,15 @@ from pathlib import Path README_PATH = Path(__file__).parent.parent / "README.md" -TABLE_HEADER = "| | mean (s) | median (s) | min (s) | max (s) |\n" -TABLE_DIVIDER = "|------------------|----------|------------|---------|---------|\n" +TABLE_HEADER = ( + "| | mean (s) | median (s) | min (s) | max (s) | speed (it/s) |\n" +) +TABLE_DIVIDER = ( + "|------------------|----------|------------|---------|---------|--------------|\n" +) TABLE_ROW_FORMAT = ( - "| {name:16} | {mean:7.3f}s | {median:9.3f}s | {min:6.3f}s | {max:6.3f}s |\n" + "| {name:16} | {mean:7.3f}s | {median:9.3f}s " + "| {min:6.3f}s | {max:6.3f}s | {speed:7.2f} it/s |\n" ) START_MARKER = "\n" END_MARKER = "\n" @@ -26,6 +31,8 @@ def main(): lines = f.readlines() table_lines = [TABLE_HEADER, TABLE_DIVIDER] + + steps = results["parameters"]["steps"] for timing in results["timings"]: benchmark_name = timing["name"] benchmark_timings = timing["timings"] @@ -36,6 +43,7 @@ def main(): median=statistics.median(benchmark_timings), min=min(benchmark_timings), max=max(benchmark_timings), + speed=statistics.median(steps / timing for timing in benchmark_timings), ) )