Skip to content

Code-first video & image, rendered natively on WebGPU.

chore(vision-sam): license the package under Apache-2.0

okanasl9dc6bfa59ec5
diff --git a/.changeset/sam-license-scope.md b/.changeset/sam-license-scope.md
index 3bf6f8c3..285a1c26 100644
--- a/.changeset/sam-license-scope.md
+++ b/.changeset/sam-license-scope.md
@@ -3,4 +3,4 @@
"framefields": patch
---
-SAM 2.1 (Apache-2.0 weights) no longer asks for Meta's SAM License; only SAM 3 does (`acceptSamLicense` / `sam3.acceptLicense` / `FRAMEFIELDS_ACCEPT_SAM_LICENSE=1`). `sam2.acceptLicense` and `Sam2Tracker`'s `acceptLicense` are removed. The package's sources no longer carry a Meta copyright header, and the model is named SAM 3 throughout.
+SAM 2.1 (Apache-2.0 weights) no longer asks for Meta's SAM License; only SAM 3 does (`acceptSamLicense` / `sam3.acceptLicense` / `FRAMEFIELDS_ACCEPT_SAM_LICENSE=1`). `sam2.acceptLicense` and `Sam2Tracker`'s `acceptLicense` are removed. `@framefields/vision-sam` is Apache-2.0 like every framefields package (SAM 3's weights stay under Meta's SAM License, accepted at runtime); its sources no longer carry a Meta copyright header, and the model is named SAM 3 throughout.
diff --git a/AGENTS.md b/AGENTS.md
index d007ec36..49f75ea9 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -18,7 +18,7 @@ Code-first video engine on native WebGPU (Dawn) in Node, no browser. pnpm + turb
- `packages/compositions`: Yoga layout (`utils/layout/resolve-layout.ts`), program schema (`program/schema.ts`), lint (`program/lint.ts`), animation/evaluator.
- `packages/webgpu-renderers`: WGSL shaders, 2D/3D pipelines, Slug text (`src/slug/`), audio DSP.
- `packages/renderer`: headless Node renderer (Dawn, WebCodecs/mediabunny).
-- `packages/vision-sam`: SAM 2.1 Tiny / SAM 3 trackers under Meta's SAM License, an optional peer of `framefields`. `clip-vision.ts` imports it only for `comp.vision(..., { sam2 | sam3 })`; keep runtime imports of it out of `framefields` (types only). Pins in `src/models/registry.ts`.
+- `packages/vision-sam`: SAM 2.1 Tiny/Small and SAM 3 trackers (Apache-2.0 code; SAM 3 weights need runtime SAM License acceptance), an optional peer of `framefields`. `clip-vision.ts` imports it only for `comp.vision(..., { sam2 | sam3 })`; keep runtime imports of it out of `framefields` (types only). Pins in `src/models/registry.ts`.
- `packages/core`: shared types, `Effect` base, signals, `emojiPresentation` (the one UTS #51 rule used by layout, preload and lint).
- Others: `renderers`, `media`, `node-sdk`, `server-utils`, `client-utils`, `tensor-webgpu`, `vision`, `tsconfig`.
- `nodes/node-*`: one VFX/audio/layout node each (`src/shared/`, `src/renderers/`, `src/index.ts`). Only `node-compositor` has a `SKILL.md`; update it when Compositor behavior changes (guarded by `skillmd-check.test.ts`).
diff --git a/CLAUDE.md b/CLAUDE.md
index 1a8a8ef8..aa83e95a 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -18,7 +18,7 @@ Code-first video engine on native WebGPU (Dawn) in Node, no browser. pnpm + turb
- `packages/compositions`: Yoga layout (`utils/layout/resolve-layout.ts`), program schema (`program/schema.ts`), lint (`program/lint.ts`), animation/evaluator.
- `packages/webgpu-renderers`: WGSL shaders, 2D/3D pipelines, Slug text (`src/slug/`), audio DSP.
- `packages/renderer`: headless Node renderer (Dawn, WebCodecs/mediabunny).
-- `packages/vision-sam`: SAM 2.1 Tiny / SAM 3 trackers under Meta's SAM License, an optional peer of `framefields`. `clip-vision.ts` imports it only for `comp.vision(..., { sam2 | sam3 })`; keep runtime imports of it out of `framefields` (types only). Pins in `src/models/registry.ts`.
+- `packages/vision-sam`: SAM 2.1 Tiny/Small and SAM 3 trackers (Apache-2.0 code; SAM 3 weights need runtime SAM License acceptance), an optional peer of `framefields`. `clip-vision.ts` imports it only for `comp.vision(..., { sam2 | sam3 })`; keep runtime imports of it out of `framefields` (types only). Pins in `src/models/registry.ts`.
- `packages/core`: shared types, `Effect` base, signals, `emojiPresentation` (the one UTS #51 rule used by layout, preload and lint).
- Others: `renderers`, `media`, `node-sdk`, `server-utils`, `client-utils`, `tensor-webgpu`, `vision`, `tsconfig`.
- `nodes/node-*`: one VFX/audio/layout node each (`src/shared/`, `src/renderers/`, `src/index.ts`). Only `node-compositor` has a `SKILL.md`; update it when Compositor behavior changes (guarded by `skillmd-check.test.ts`).
diff --git a/packages/framefields/src/clip-vision.ts b/packages/framefields/src/clip-vision.ts
index 78304c24..80ffc0f9 100644
--- a/packages/framefields/src/clip-vision.ts
+++ b/packages/framefields/src/clip-vision.ts
@@ -121,14 +121,14 @@ let visionSam: Promise<VisionSam> | undefined;
let clipVisionIds = 0;
/**
- * SAM lives in `@framefields/vision-sam`, an optional peer under Meta's SAM License, so it
+ * SAM lives in `@framefields/vision-sam`, an optional peer (SAM 3's weights are under Meta's SAM License), so it
* is imported only when a clip asks for `sam2` or `sam3`.
*/
function loadVisionSam(): Promise<VisionSam> {
visionSam ??= import("@framefields/vision-sam").catch((cause: unknown) => {
visionSam = undefined;
throw new Error(
- "Prompted sam2/sam3 tracking needs the optional @framefields/vision-sam package (Meta SAM License). Install it next to framefields.",
+ "Prompted sam2/sam3 tracking needs the optional @framefields/vision-sam package. Install it next to framefields.",
{ cause },
);
});
diff --git a/packages/framefields/src/index.ts b/packages/framefields/src/index.ts
index d0224bee..cccb7a7b 100644
--- a/packages/framefields/src/index.ts
+++ b/packages/framefields/src/index.ts
@@ -136,7 +136,7 @@ export {
type VisionVariant,
} from "@framefields/vision";
-// Types only: the trackers ship in the optional @framefields/vision-sam peer (Meta SAM License).
+// Types only: the trackers ship in the optional @framefields/vision-sam peer.
export type {
Sam2FrameResult,
Sam2Model,
diff --git a/packages/vision-sam/LICENSE b/packages/vision-sam/LICENSE
deleted file mode 100644
index c3ff372e..00000000
--- a/packages/vision-sam/LICENSE
+++ /dev/null
@@ -1,43 +0,0 @@
-SAM License
-Last Updated: November 19, 2025
-
-"Agreement" means the terms and conditions for use, reproduction, distribution and modification of the SAM Materials set forth herein.
-
-"SAM Materials" means, collectively, Documentation and the models, software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code, and other elements of the foregoing distributed by Meta and made available under this Agreement.
-
-"Documentation" means the specifications, manuals and documentation accompanying SAM Materials distributed by Meta.
-
-"Licensee" or "you" means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entity's behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf.
-
-"Meta" or "we" means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) or Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland).
-
-"Sanctions" means any economic or trade sanctions or restrictions administered or enforced by the United States (including the Office of Foreign Assets Control of the U.S. Department of the Treasury ("OFAC"), the U.S. Department of State and the U.S. Department of Commerce), the United Nations, the European Union, or the United Kingdom.
-
-"Trade Controls" means any of the following: Sanctions and applicable export and import controls.
-
-By using or distributing any portion or element of the SAM Materials, you agree to be bound by this Agreement.
-
-1. License Rights and Redistribution
-
-a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Meta's intellectual property or other rights owned by Meta embodied in the SAM Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the SAM Materials.
-
-b. Redistribution and Conditions.
-i. If you distribute or make available the SAM Materials (or any portion thereof, or any derivative works thereof), or a product or service that uses any of them, you shall provide a copy of this Agreement with such distribution.
-ii. You must not use the name of Meta or any of its affiliates, trademarks, or logos to endorse or promote any products or services derived from the SAM Materials without prior written permission.
-iii. You must retain all copyright, patent, trademark, and attribution notices from the SAM Materials.
-
-2. Prohibited Uses
-
-You will not use the SAM Materials or any derivative works:
-a. In any manner that violates any applicable law, rule, or regulation, including Trade Controls and Sanctions;
-b. For military, warfare, espionage, or illegal weapons development or distribution;
-c. To generate or disseminate sexually explicit content, harassment, hate speech, or defamatory content.
-
-3. Termination
-
-This Agreement and the rights granted hereunder will terminate immediately upon any breach by you of the terms of this Agreement. In addition, if you initiate or participate in patent infringement litigation against Meta or its affiliates alleging that SAM Materials infringe any patent rights, your license under this Agreement shall terminate immediately.
-
-4. Disclaimer of Warranties and Limitation of Liability
-
-THE SAM MATERIALS ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED. META EXPRESSLY DISCLAIMS ALL WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. IN NO EVENT SHALL META BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE SAM MATERIALS.
-
diff --git a/packages/vision-sam/NOTICE.md b/packages/vision-sam/NOTICE.md
index f2a761f5..7d83d900 100644
--- a/packages/vision-sam/NOTICE.md
+++ b/packages/vision-sam/NOTICE.md
@@ -1,6 +1,6 @@
# Notice: @framefields/vision-sam
-This package provides prompted video tracking for framefields with Meta's Segment Anything models: SAM 2.1 (Tiny and Small) and SAM 3. Its source code is written for framefields; it contains no code or weights distributed by Meta.
+This package provides prompted video tracking for framefields with Meta's Segment Anything models: SAM 2.1 (Tiny and Small) and SAM 3. Its source code is written for framefields and, like the rest of framefields, licensed under Apache-2.0; it contains no code or weights distributed by Meta. The licenses below apply to the model weights it downloads.
## Model weights
diff --git a/packages/vision-sam/package.json b/packages/vision-sam/package.json
index 44f51cc9..6a16d12f 100644
--- a/packages/vision-sam/package.json
+++ b/packages/vision-sam/package.json
@@ -1,6 +1,6 @@
{
"name": "@framefields/vision-sam",
- "description": "Prompted video tracking for framefields: SAM 2.1 Tiny / Small and SAM 3 (text selection, several objects). SAM 3 weights are under Meta's SAM License.",
+ "description": "Prompted video tracking for framefields: SAM 2.1 Tiny / Small and SAM 3 (text selection, several objects). SAM 3's model weights, downloaded at runtime, are under Meta's SAM License.",
"version": "2.8.1",
"private": false,
"publishConfig": {
@@ -8,7 +8,7 @@
},
"type": "module",
"sideEffects": false,
- "license": "SEE LICENSE IN LICENSE",
+ "license": "Apache-2.0",
"module": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
@@ -21,7 +21,6 @@
},
"files": [
"dist/**",
- "LICENSE",
"NOTICE.md"
],
"scripts": {
diff --git a/packages/vision-sam/src/sam3/tracker.ts b/packages/vision-sam/src/sam3/tracker.ts
index 3572dbf0..1c610669 100644
--- a/packages/vision-sam/src/sam3/tracker.ts
+++ b/packages/vision-sam/src/sam3/tracker.ts
@@ -53,7 +53,7 @@ export interface Sam3TrackerOptions extends VisionModelStoreOptions {
readonly merge?: boolean;
/** Image-encoder weights; defaults to the fastest for the provider's backend (`SAM3_ENCODER`). */
readonly precision?: Sam3Precision;
- /** Explicitly agree to Meta's SAM License terms to download or run SAM models. */
+ /** Explicitly agree to Meta's SAM License terms to download or run SAM 3's weights. */
readonly acceptLicense?: boolean;
}
diff --git a/plugins/framefields/skills/framefields-vision/SKILL.md b/plugins/framefields/skills/framefields-vision/SKILL.md
index 6d884576..d3947c01 100644
--- a/plugins/framefields/skills/framefields-vision/SKILL.md
+++ b/plugins/framefields/skills/framefields-vision/SKILL.md
@@ -40,7 +40,7 @@ Meta SAM 2.1 Hiera checkpoints in Diffusion Studio's fp16 video exports, with th
| `"tiny"` (default) | 512² (32×32 features) | 58 MB | 13 MB | ~83 MB | ~0.27 s |
| `"small"` | 1024², SAM 2's native size (64×64) | 84 MB | 16 MB | ~112 MB | ~1.1 s |
-### SAM 3 (`sam3`, Meta SAM License)
+### SAM 3 (`sam3`, weights under Meta's SAM License)
Video tracking at 1008², plus text ("concept") selection. Only the image encoder the backend runs fastest is downloaded:
| Graph | Size | Source |
@@ -157,7 +157,7 @@ Detection picks "the largest person". Use SAM when the subject is **a specific**
pnpm add @framefields/vision-sam
```
-`@framefields/vision-sam` is an optional peer of `framefields`. It is loaded only when a clip uses `sam2` or `sam3`; without it, those clips fail with an install message. SAM 2.1's weights are Apache-2.0 and need no acceptance. SAM 3's weights are under Meta's SAM License, so `sam3` needs explicit acceptance before anything downloads: `acceptSamLicense: true` on the clip (or `acceptLicense: true` inside `sam3`), or `FRAMEFIELDS_ACCEPT_SAM_LICENSE=1`. Ask the user before accepting it on their behalf. Import `Sam2Tracker` / `Sam3Tracker` from `@framefields/vision-sam` when you drive SAM directly.
+`@framefields/vision-sam` is an optional peer of `framefields`, Apache-2.0 like the rest of framefields. It is loaded only when a clip uses `sam2` or `sam3`; without it, those clips fail with an install message. SAM 2.1's weights are Apache-2.0 and need no acceptance. SAM 3's weights are under Meta's SAM License, so `sam3` needs explicit acceptance before anything downloads: `acceptSamLicense: true` on the clip (or `acceptLicense: true` inside `sam3`), or `FRAMEFIELDS_ACCEPT_SAM_LICENSE=1`. Ask the user before accepting it on their behalf. Import `Sam2Tracker` / `Sam3Tracker` from `@framefields/vision-sam` when you drive SAM directly.
### Prompts