Skip to content

Add: fal.ai SAM 3 assisted labeling provider - #2826

Draft
iunir wants to merge 1 commit into
iunir-assisted-labeling-fal-storagefrom
iunir-assisted-labeling-fal-sam3
Draft

iunir wants to merge 1 commit into
iunir-assisted-labeling-fal-storagefrom
iunir-assisted-labeling-fal-sam3

Conversation

@iunir

@iunir iunir commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What has changed and why?

Part 5 of 20. This stack replaces the assisted labeling prototype (PR 2752) with small PRs. Each PR adds one part.

  • Adds the fal.ai SAM 3 provider. It is available only when FAL_KEY is set. It sends images to fal.ai.
  • The image is uploaded on the first segment call only. Nothing is sent when a tool opens.
  • Uploads use a lock per image, so one image is uploaded only once. The lock is always released, also when the upload fails.
  • Please check: the start offset of the fal.ai RLE (0- or 1-based) is not verified against a live response. A TODO and a golden test for the documented format are in the code. A wrong offset moves masks by one pixel.
  • Known limits: one HTTP session is shared by the worker threads. Cached image URLs do not expire.

How has it been tested?

  • Unit tests with a fake HTTP session: request body, response parsing, RLE decoding (golden test), one upload per image, lock release after a failure, availability with and without FAL_KEY.
  • Not tested against the live fal.ai API (no key in the test setup).

Did you update CHANGELOG.md?

  • Yes
  • Not needed (internal change)

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: lightly-ai/lightly-studio/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 29a0dde2-3299-4d93-be26-79804f1398f1
📥 Commits

Reviewing files that changed from the base of the PR and between 9a6e384 and a1cb826.

📒 Files selected for processing: 6
  • lightly_studio/src/lightly_studio/assisted_labeling/fal_sam3_provider.py
  • lightly_studio/src/lightly_studio/assisted_labeling/registry.py
  • lightly_studio/tests/api/routes/api/test_annotate.py
  • lightly_studio/tests/assisted_labeling/test_fal_sam3_provider.py
  • lightly_studio/tests/assisted_labeling/test_registry.py
  • lightly_studio/tests/services/assisted_labeling_service/test_get_provider_views.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@iunir
iunir added this pull request to stack #2842 October 16, 2026 17:03

This branch has not been deployed

No deployments
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.

1 participant