Skip to content

Commit c956db4

Browse files
committed
Move ONNX model to GitHub Releases to eliminate Vercel bandwidth costs
The 93MB maia_rapid.onnx file was served from public/ causing ~$150/month in Vercel Fast Data Transfer charges. Move it to a GitHub Release asset (free, served with CORS headers) and remove from git tracking. - Update model URL to GitHub Releases download URL (with NEXT_PUBLIC_MAIA_MODEL_URL env var override) - Remove public/maia2/*.onnx from git via .gitignore To complete: create a GitHub Release tagged `models-v1` and upload maia_rapid.onnx as a release asset. https://claude.ai/code/session_01T73Yphu4y2U3c3ctCcHVPf
1 parent c2afeea commit c956db4

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ yarn-error.log*
3636

3737
# typescript
3838
*.tsbuildinfo
39+
40+
# ONNX model weights - hosted on GitHub Releases, not committed to the repo
41+
/public/maia2/*.onnx

public/maia2/maia_rapid.onnx

-88.9 MB
Binary file not shown.

src/contexts/MaiaEngineContext.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export const MaiaEngineContextProvider: React.FC<{ children: ReactNode }> = ({
3131

3232
const maia = useMemo(() => {
3333
const model = new Maia({
34-
model: '/maia2/maia_rapid.onnx',
34+
model:
35+
process.env.NEXT_PUBLIC_MAIA_MODEL_URL ??
36+
'https://github.com/CSSLab/maia-platform-frontend/releases/download/models-v1/maia_rapid.onnx',
3537
setStatus: setStatus,
3638
setProgress: setProgress,
3739
setError: setError,

0 commit comments

Comments
 (0)