Downloads · 30 days
0
honeysandhu/sam3.1-int8-int4-convrot
sam3.1-int8-int4-convrot is a image segmentation model from honeysandhu. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for comfyui. The card lists the license as other.
Downloads · 30 days
0
Access
Public
Updated Aug 23, 2026
Repo size
2.3 GB
Likes
0
Public
Click a slice to open those files.
.safetensors2.3 GB · 100%
From the Hugging Face model README

Smaller, native-ComfyUI quantizations of Meta's SAM 3.1 Multiplex checkpoint. Both variants use ConvRot weight and activation quantization for selected transformer linears while keeping CLIP and quality-sensitive layers in FP16. They load through ComfyUI's standard checkpoint loader—no custom quantization node or loader is required.
SAM 3.1's headline change is Object Multiplex for faster multi-object video tracking. Meta's release notes focus on optimized tracking and do not claim an image-detector accuracy upgrade, so this should not be read as “SAM 3.0, but smarter at still-image segmentation.” See the official SAM 3.1 release notes.
| Variant | File | Size | Saving vs. FP16 | Minimum ComfyUI |
|---|---|---|---|---|
| INT8 ConvRot W8A8 | sam3.1_multiplex_int8_convrot_selective_fp16clip_fp32source.safetensors | 1.19 GiB | 26.60% | v0.27.0 |
| INT4 ConvRot W4A4 | sam3.1_multiplex_w4a4_convrot_selective_fp16clip_fp32source.safetensors | 0.98 GiB | 39.95% | v0.28.0 |
| Official Comfy-Org FP16 reference | sam3.1_multiplex_fp16.safetensors | 1.63 GiB | — | current release recommended |
| Official Meta FP32 source | sam3.1_multiplex.pt | 3.26 GiB | — | not distributed here |
Relative to Meta's FP32 source, the INT8 file is 63.42% smaller and the INT4 file is 70.08% smaller. INT4 is 18.19% smaller than INT8.
ComfyUI v0.27.0 introduced native INT8 ConvRot support. ComfyUI v0.28.0 added native INT4 ConvRot support. INT4 matrix multiplication is used on supported GPUs; ComfyUI may fall back to INT8 multiplication on unsupported hardware. Keep ComfyUI and comfy-kitchen current, especially on Turing or AMD hardware where backend fixes have continued to land.
Put either .safetensors file in:
ComfyUI/models/checkpoints/
Then use the normal native chain:
Load Checkpoint → CLIP Text Encode → SAM3 Detect
The files may also live in any checkpoint directory configured through extra_model_paths.yaml. Select the checkpoint with the standard Load Checkpoint node. Do not use a legacy INT8 custom loader.
These releases were validated on the native image-segmentation path. The checkpoint also contains SAM 3.1 Multiplex tracking weights, but video tracking has not received the same breadth of release testing yet.
The conversion starts from Meta's official FP32 sam3.1_multiplex.pt, not from the FP16 repack. Its 3,502,755,717-byte size and SHA-256 match the file served by facebook/sam3.1:
0567DEBEEC80BA4AC6369540C6C248025283CB3FF2B92827509E57E2B3541CB6
For each of 230 eligible block-linear weights, the converter:
The INT8 file uses W8A8 operations: 8-bit weights with online 8-bit activation quantization at those linears. The INT4 file similarly uses W4A4 operations. Unselected floating-point tensors are stored as FP16. This is dynamic per-operation activation quantization, so no calibration image set is embedded in the files.
Quantization improves file size reliably. Speed is more workload- and GPU-dependent because SAM's preprocessing, mask refinement, convolutions, CPU/GPU synchronization, and relatively small matrix multiplications can dominate the quantized linears.
Controlled warm benchmark on an RTX 3090, PyTorch 2.11 + CUDA 13.0, comfy-kitchen 0.2.22, 1280×720 input, six detected people, threshold 0.3, and two native refinement passes. Values are the median of four model-resident runs:
| Checkpoint | Median | Difference vs. FP16 |
|---|---|---|
| FP16 | 1.933 s | — |
| INT8 | 1.647 s | 14.8% faster |
| INT4 | 1.396 s | 27.8% faster |
With refinement disabled, a CUDA operator profile showed INT8 reducing total self GPU time by approximately 17.5%, while time in the main eligible linear operations fell by approximately 32%. In ordinary single-object workflows, warm FP16 and INT8 measurements were both commonly around 0.6–0.7 seconds; a measurable end-to-end speedup is therefore not guaranteed. Image size, detection count, refinement count, GPU generation, offloading, and model warm-up all matter.

On the pictured official Meta truck.jpg demo image, using the prompt truck, threshold 0.3, and two refinement passes:
| Comparison | Binary-mask IoU |
|---|---|
| FP16 vs. FP32 source | 0.99999 |
| INT8 vs. FP16 | 0.99765 |
| INT4 vs. FP16 | 0.99652 |
| INT4 vs. INT8 | 0.99716 |
On a separate six-person test with refinement disabled, union-mask IoU versus FP16 was 0.99882 for INT8 and 0.98498 for INT4. These are useful regression and visual checks, not a substitute for evaluation across a segmentation benchmark. Some prompts or difficult edges may regress even when these examples look nearly identical.
The release candidates were deliberately narrowed to selective quantization with FP16 CLIP:
comfy-kitchen kernels. Larger gains would likely require fusing SAM-specific preprocessing, detector, and refinement operations, reducing dispatch and synchronization, or compiling stable subgraphs. That is substantial, hardware-sensitive engineering rather than a straightforward weight conversion.D4AF12DF7DB2881ED44476DEBF555A5ACE15234572E6C25EBAA3AF3183AD2133 sam3.1_multiplex_int8_convrot_selective_fp16clip_fp32source.safetensors
A75D0559F508C30FC418FD060A5E3F330F1B7085ED2636F5FD67E3384A2EBBBD sam3.1_multiplex_w4a4_convrot_selective_fp16clip_fp32source.safetensors
The original checkpoint is from Meta's gated SAM 3.1 repository. The gate controls access to the upstream download; it does not replace the license. The included weights are derivatives of the SAM Materials and remain subject to the SAM License, which permits derivative works and redistribution only under that same agreement and requires a copy of the agreement to accompany the files. SAM_LICENSE.txt is included for that purpose. Review the full terms before uploading or using the checkpoints.
The Comfy-Org SAM 3.1 repository uses the same SAM License for its repackaged FP16 weights. ComfyUI's GPL-3.0 software license applies to ComfyUI code; it does not relicense Meta's model weights.
Credits:
comfy-kitchen for native SAM 3.1 and ConvRot execution support.The comparison and promo use Meta's official assets/images/truck.jpg. The promo's abstract background was generated specifically for this release.