Skip to content

Prepare FocalNet for a public repository - #6

Merged
TorstenDittmann merged 3 commits into
mainfrom
torsten/public-go-live-a239
Sep 14, 2026
Merged

TorstenDittmann merged 3 commits into
mainfrom
torsten/public-go-live-a239

Conversation

@TorstenDittmann

@TorstenDittmann TorstenDittmann commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

The crop lab’s default yeet.page URL would have published the derived ONNX the moment this repository went public. That URL was only a demo host. This change makes the public story match the README: source is MIT, checkpoints stay local.

What changed

  • bun run fetch-model no longer has a baked-in download URL. It copies FOCALNET_ONNX, optionally fetches FOCALNET_ONNX_URL, and can still write a dummy graph for UI layout.
  • The lab footer and README no longer mention yeet.page.
  • CI runs bun test and bun run build next to the Python job.

Local verification

  • bun test: 20 passed
  • bun run fetch-model with no env: exits 1 (No local checkpoint)
  • FOCALNET_ALLOW_DUMMY=1 bun run fetch-model: writes an 18 KB placeholder
  • bun run build succeeds with and without an ONNX file
  • No remaining yeet / yeet.page URLs in the tree
  • pytest -q: 53 passed
  • Ruff check and format: passed

Go-live after merge (GitHub listing; this PR cannot set it):

gh repo edit appwrite/focalnet \
  --description "Content-aware image cropping with a compact ONNX importance map and human ranking head" \
  --add-topic onnx --add-topic computer-vision --add-topic image-cropping --add-topic appwrite
gh repo edit appwrite/focalnet --visibility public

No homepage: the yeet demo is not the public surface. Leave .cursor/environment.json as the Cloud Agent bootstrap.

Open in Web Open in Cursor 

Drop the yeet.page checkpoint URL so a public clone cannot fetch the
derived ONNX. The browser demo now expects a locally exported model, and
CI runs the Bun unit tests and bundle.

Co-authored-by: Torsten Dittmann <TorstenDittmann@users.noreply.github.com>
@TorstenDittmann
TorstenDittmann marked this pull request as ready for review September 14, 2026 22:22
@greptile-apps

greptile-apps Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no outstanding correctness, security, or repository-rule violations remain.

Summary

This PR prepares FocalNet for public release without publishing its model checkpoint.

  • Removes the baked-in checkpoint host and requires an explicit local path or URL.
  • Preserves opt-in dummy-model generation for UI development.
  • Updates public documentation and lab messaging to clarify that weights are not distributed.
  • Adds Bun tests and the web build to CI while pinning GitHub Actions to immutable commits.
  • Corrects the URL installation flow so cleanup failure cannot trigger dummy replacement of a valid model.

Reviews (3) · Last reviewed commit: "Keep a fetched checkpoint if temp cleanu..."

Comment thread web/scripts/fetch-model.ts Outdated
Comment thread .github/workflows/test.yml Outdated
Restore placeholder generation if FOCALNET_ONNX_URL is set with
FOCALNET_ALLOW_DUMMY=1 and the download fails. Pin GitHub Actions in CI
to immutable commit SHAs.

Co-authored-by: Torsten Dittmann <TorstenDittmann@users.noreply.github.com>
Comment thread web/scripts/fetch-model.ts Outdated
Dummy fallback now covers download and install errors only. After a
successful URL install, temp-file unlink is best-effort so a cleanup
failure cannot overwrite the real ONNX.

Co-authored-by: Torsten Dittmann <TorstenDittmann@users.noreply.github.com>
@TorstenDittmann
TorstenDittmann merged commit 6719a70 into main Sep 14, 2026
5 checks passed
@TorstenDittmann
TorstenDittmann deleted the torsten/public-go-live-a239 branch September 14, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants