28 lines
867 B
Python
28 lines
867 B
Python
"""Compare one direct-runner timing record to the fixed Comfy Sage3 baseline."""
|
|
|
|
import argparse
|
|
import json
|
|
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
CONTRACT = json.loads((ROOT / "benchmarks" / "ref2va-960x544-124f.json").read_text(encoding="utf-8"))
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("--result", required=True, type=Path)
|
|
args = parser.parse_args()
|
|
result = json.loads(args.result.read_text(encoding="utf-8"))
|
|
actual = float(result["wall_time_seconds"])
|
|
baseline = float(CONTRACT["reference_comfy_sage3_seconds"])
|
|
print(json.dumps({
|
|
"baseline_seconds": baseline,
|
|
"direct_runner_seconds": actual,
|
|
"delta_seconds": round(actual - baseline, 3),
|
|
"speedup": round(baseline / actual, 4),
|
|
}, indent=2))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|