- 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
74 lines
1.9 KiB
Python
74 lines
1.9 KiB
Python
# -*- mode: python ; coding: utf-8 -*-
|
|
"""PyInstaller spec for the Moxie bench sidecar.
|
|
|
|
Build (on the target machine, inside the repo root):
|
|
|
|
pip install -r bench/requirements.txt pyinstaller
|
|
cd frontend && bun install && bun run build:bench:release && cd ..
|
|
pyinstaller bench/moxie_bench.spec
|
|
|
|
Output: dist/moxie-bench/ (onedir - ships moxie-bench(.exe) plus _internal/)
|
|
|
|
Tauri 2 sidecar wiring (see bench/tauri/README.md):
|
|
- copy dist/moxie-bench/ next to your Tauri binary as `moxie-bench/`
|
|
- point externalBin / or spawn `moxie-bench/moxie-bench --port <free-port>`
|
|
- poll http://127.0.0.1:<port>/api/health until {"ok": true}
|
|
"""
|
|
import os
|
|
from pathlib import Path
|
|
|
|
repo_root = Path(SPECPATH).resolve().parent # bench/ -> repo root
|
|
|
|
hiddenimports = [
|
|
"uvicorn.logging",
|
|
"uvicorn.loops",
|
|
"uvicorn.loops.auto",
|
|
"uvicorn.protocols",
|
|
"uvicorn.protocols.http",
|
|
"uvicorn.protocols.http.auto",
|
|
"uvicorn.protocols.websockets",
|
|
"uvicorn.protocols.websockets.auto",
|
|
"uvicorn.lifespan",
|
|
"uvicorn.lifespan.on",
|
|
"anyio._backends._asyncio",
|
|
]
|
|
|
|
a = Analysis(
|
|
["bench/run.py"],
|
|
pathex=[str(repo_root / "bench")],
|
|
binaries=[],
|
|
datas=[
|
|
# the prebuilt bench UI + base workflow travel with the binary
|
|
(str(repo_root / "bench" / "ui-dist"), "bench/ui-dist"),
|
|
(str(repo_root / "bench" / "base_workflow.json"), "bench"),
|
|
],
|
|
hiddenimports=hiddenimports,
|
|
hookspath=[],
|
|
hooksconfig={},
|
|
runtime_hooks=[],
|
|
excludes=["torch", "comfy", "comfy_execution", "folder_paths"],
|
|
noarchive=False,
|
|
)
|
|
pyz = PYZ(a.pure)
|
|
|
|
exe = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
[],
|
|
exclude_binaries=True,
|
|
name="moxie-bench",
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
upx=False,
|
|
console=True, # sidecar logs are useful; Tauri can hide the window
|
|
)
|
|
coll = COLLECT(
|
|
exe,
|
|
a.binaries,
|
|
a.datas,
|
|
strip=False,
|
|
upx=False,
|
|
name="moxie-bench",
|
|
)
|