Skip to content

wip: sam-3 video#51

Merged
JoeGaffney merged 4 commits intomainfrom
2025-12-02
Dec 6, 2025
Merged

wip: sam-3 video#51
JoeGaffney merged 4 commits intomainfrom
2025-12-02

Conversation

@JoeGaffney
Copy link
Copy Markdown
Owner

@JoeGaffney JoeGaffney commented Dec 6, 2025

Results are not particularly great atm and are having to use a commit hash from transformers as things are quite active there with the 5.0 release. Going with the transformers implementation as support will be better longer term.

…there is better memory management. There is still some quality issues with the video implementation
Copilot AI review requested due to automatic review settings December 6, 2025 16:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates SAM-3 (Segment Anything Model 3) video segmentation capabilities into the codebase, enabling video-to-video segmentation with text prompts. The implementation uses a specific commit from the transformers library and adds both video and updated image processing capabilities for SAM-3.

  • Added SAM-3 video segmentation model with text-prompt-based object tracking
  • Updated SAM-3 image segmentation to use the transformers library implementation
  • Modified dependencies to use a specific transformers commit for SAM-3 compatibility

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
workers/videos/tasks.py Registers the new sam-3 task for video processing with GPU queue
workers/videos/schemas.py Adds sam-3 model definition with video-to-video mode support
workers/videos/local/sam_3.py New implementation for SAM-3 video segmentation using transformers library
workers/tests/videos/local/test_sam_3_video.py Adds test cases for SAM-3 video segmentation functionality
workers/tests/videos/helpers.py Registers SAM-3 in test routing and adds segmentation helper functions
workers/images/local/sam_3.py Migrates SAM-3 image processing to transformers library implementation
workers/tests/images/local/test_sam_3.py Updates test prompt format to use comma-separated values
workers/requirements.txt Pins transformers to specific commit and adds kernels dependency
clients/openapi.json Updates API schema to include sam-3 in video models list
clients/nuke/gizmos/dd_video.gizmo Adds sam-3 to the video model dropdown in Nuke integration
api/videos/schemas.py Adds sam-3 model definition to API schemas

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JoeGaffney JoeGaffney changed the title 2025 12 02 wip: sam-3 video Dec 6, 2025
@JoeGaffney JoeGaffney merged commit 559def8 into main Dec 6, 2025
1 check passed
@JoeGaffney JoeGaffney deleted the 2025-12-02 branch December 11, 2025 17: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