ホーム 暮らし Trying out SAM 3.1 in ComfyUI

Trying out SAM 3.1 in ComfyUI

篠原 沙世 篠原 沙世 • 更新: • 公開: • 読了約 4 分
目次

SAM 3.1 is now available for use in ComfyUI.
It is a model for detecting objects specified by prompts in images and obtaining masks.

Here is the "SAM31_test_02.json" workflow.

I have also explained it in a video.


Environment

nd6c7402facca

OS: Windows 11
GPU: GeForce RTX 4090
CPU: i9-13900KF
memory: 128G


Setup Procedure

Please install the following custom nodes and update ComfyUI to the latest version.


Model

sam3.1_multiplex_fp16.safetensors download and place in "ComfyUI\models\checkpoints"


Workflow

The workflow is as follows.

The top half is a workflow that takes an image as input, and the bottom half is a workflow that takes a video as input.


Generation Results

It was processed in about 75 seconds using approximately 23GB of VRAM.
As shown below, the image successfully captures the mask of the person.
(Although there is a strange mask around the feet.)

For the video, I specify 'girl' and 'house'.
The house in the background is also detected.
The mask image only outputs the person.

To get the mask for the house, you can change the number in SAM3 Track to Mask from 0 to 1.
It seems that a sequential index number is assigned to each object.


Impressions

Being able to specify mask objects via prompts feels well-suited for agents.
Since it is a simple feature, it has high versatility.

同じカテゴリの記事

篠原 沙世

アニメとゲームの新作情報を担当。制作会社・配信元の公式告知と登壇情報を照合して記事化します。

おすすめの関連記事