SAM 3.1 mixed INT8 / FP16

Unofficial mixed INT8/FP16 conversion of the SAM 3.1 Multiplex checkpoint. This is not an official Meta release or a stock ComfyUI checkpoint. Derived from Comfy-Org/sam3, revision 7bb8374780a725b4353ed31f3a9395c9742b5621, checkpoint sam3.1_multiplex_fp16.safetensors. The included SAM License applies to these derivative weights, including its redistribution and use conditions. Meta supplies the underlying SAM model; this repository supplies the conversion.

Custom mixed format: signed symmetric INT8 per output row for 487 matrix weights, each accompanied by a FP32 row-scale tensor. Reconstruction is q.float() * scale[:, None]. 1,103 other tensors retain FP16. The file is 957,880,192 bytes. SHA256: abd739893274423df88f9421b65970824df2d2f2d37a0d815e3a129da900c69d.

Compatibility

This file needs a loader supporting this exact mixed INT8/FP16 format. A standard ComfyUI/Meta loader cannot directly consume it. The tested implementation uses Python, PyTorch and Metal; this repository does not provide a Python-free SAM runtime. Applications expecting the FP16 checkpoint will not automatically load this file. Use an implementation that explicitly supports this conversion.

The checkpoint includes the detector, text encoder and SAM 3.1 Multiplex tracker. Internal model resolution remains 1008x1008. Frames and temporal history are not reduced by the conversion. Non-quantized tensors are retained exactly from the source. Source SHA256: 9ba99c92703c2e8b4f47de2d34a539bb8e18923049e238b780d70dbe6368eb03.

For independent inspection, each INT8 matrix is reconstructed as (q.float() * scale[:, None]).half(), omitting the companion row-scale entries from the reconstructed state dictionary. This describes the numerical format, not a complete inference loader. Compared with the original 1,745,546,848-byte FP16 file, this saves 787,666,656 bytes (45.12%). Download integrity details are in manifest.json.

Initial local validation

On an Apple M5 Pro, three 48-frame selection cases across two source clips took 20.09–20.24 seconds with the experimental large-attention routing and custom Metal tensor kernels, compared with 63.74–66.43 seconds in the current runtime. The custom tensor path also quantizes selected vision activations to INT8. Mean thresholded-mask IoU against the current FP16 implementation was 99.65% for a face and 99.96–99.97% for the two person-selection cases. These are limited agreement measurements, not ground-truth accuracy or a general speed guarantee. The largest speed improvement came from fused attention dispatch; INT8 weights primarily reduce storage. Other chips, long clips, multiple objects, click/paint prompts and complete edited-video output have not been validated.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for MonkeyMagic100/sam3.1-mixed-int8

Base model

facebook/sam3.1
Finetuned
Comfy-Org/sam3.1
Finetuned
(2)
this model