- bench/ FastAPI server: fixed 9-stage pipeline parsed from the base workflow, serial render jobs, WS progress mirroring ComfyUI's push events, /api/view + ComfyUI-compatible /view, /upload/image, /easy-media/* aliases for the ported editor - dual backend: self-contained mock renderer (numpy+ffmpeg, deterministic per prompt/seed, native + RTX-upscaled mp4 branches) and a ComfyUI bridge (substitutes the plan into base_workflow.json, converts to the /prompt API format, polls history, downloads outputs) - timeline port: frontend/src/bench mounts the unmodified MultiTrack editor against a comfyAPI shim (fetchApi/toast/dialog/custom events); build.bench.ts emits bench/ui-dist served by the server - packaging: PyInstaller onedir spec + Tauri2 sidecar docs - tests: bench/tests contract suite + scripts/test_bench_pipeline.py e2e (API+WS+render); prebuilt bench UI committed
34 lines
921 B
Python
34 lines
921 B
Python
#!/usr/bin/env python3
|
|
"""Moxie bench entry point.
|
|
|
|
python bench/run.py --port 8787 # auto backend (mock here)
|
|
python bench/run.py --backend comfy --comfyui-url http://127.0.0.1:8188
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
|
|
from app.config import BenchConfig # noqa: E402
|
|
|
|
|
|
def main() -> None:
|
|
import uvicorn
|
|
|
|
from app.server import create_app
|
|
|
|
cfg = BenchConfig.from_args()
|
|
backend = cfg.resolve_backend()
|
|
print(f"[moxie-bench] backend={backend} http://{cfg.host}:{cfg.port}")
|
|
if backend == "comfy":
|
|
print(f"[moxie-bench] driving ComfyUI at {cfg.comfyui_url}")
|
|
else:
|
|
print("[moxie-bench] self-contained mock renderer (ffmpeg + numpy)")
|
|
uvicorn.run(create_app(cfg), host=cfg.host, port=cfg.port, log_level="info")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|