Skip to content

fix: cross-platform setup and missing dependencies#53

Open
Sdamirsa wants to merge 2 commits intoBIT-DataLab:mainfrom
Sdamirsa:main
Open

fix: cross-platform setup and missing dependencies#53
Sdamirsa wants to merge 2 commits intoBIT-DataLab:mainfrom
Sdamirsa:main

Conversation

@Sdamirsa
Copy link
Copy Markdown

Issues found during setup on Windows (RTX 3080 Ti, CUDA 12.8, Python 3.12):

  • setup_sam3.sh fails on Windows/WSL/macOS — hardcodes pip, no path conversion, no cross-platform support
  • einops imported by SAM3 at runtime but missing from requirements.txt
  • pycocotools imported unconditionally via SAM3 training code but only listed in optional extras
  • python-multipart required by FastAPI /convert endpoint but missing from requirements.txt
  • triton imported at module level in edt.py but is Linux-only — crashes on Windows/macOS
  • addmm_act in perflib/fused.py casts all tensors to BFloat16 (H100 optimization) — causes dtype mismatch RuntimeError on consumer GPUs (RTX 3080, 3090, 4090, etc.)
  • Shell scripts get CRLF line endings on Windows checkout, breaking bash execution

Changes:

  • Rewrite setup_sam3.sh for cross-platform support with pip/uv auto-detection, WSL path conversion, triton patching, and a verification step
  • Install SAM3 with [dev,notebooks] extras to include missing transitive deps
  • Add python-multipart, modelscope, einops to requirements.txt
  • Patch addmm_act BFloat16 cast to use standard float32 ops for consumer GPU compatibility
  • Add .gitattributes rule *.sh text eol=lf

Tested: CLI and server both working end-to-end. No pipeline logic changed.

Sdamirsa and others added 2 commits April 14, 2026 12:20
- Rewrite setup_sam3.sh for Windows (Git Bash, WSL), macOS, and Linux
  with automatic pip/uv detection, path conversion, and error messages
- Install SAM3 with [dev,notebooks] extras to include einops, pycocotools
  and other transitive deps missing from SAM3 core requirements
- Patch triton import (Linux-only) to be conditional so SAM3 loads on
  all platforms
- Add verification step at end of setup script (green/red status)
- Patch SAM3 fused BFloat16 MLP kernel (addmm_act) that causes dtype
  mismatch on consumer GPUs (RTX 3080/4090 etc.)
- Add python-multipart, modelscope, einops to requirements.txt
- Add .gitattributes rule to keep .sh files with LF line endings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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