Create SAM2 segmentation bridge
create_sam2_segmentation_bridgeBuilds a TouchDesigner bridge for external SAM2/FastSAM segmentation, with source input, mask receiver, and mask/matte/preview outputs. Supports multiple mask transport modes.
Instructions
Build a TouchDesigner bridge surface for an external SAM2/FastSAM segmentation service. Creates source input, mask receiver, mask_out, matte_out, preview_out, and clear notes that no model is bundled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Container name for the bridge under parent_path. | sam2_segmentation_bridge |
| active | No | Start request/polling endpoints active. Default is off for artist validation. | |
| server_url | No | External SAM2/FastSAM service URL or WebSocket endpoint. | http://127.0.0.1:8188 |
| bridge_mode | No | External mask transport used by the SAM2/FastSAM service. | comfyui |
| parent_path | No | COMP that will receive the SAM2/FastSAM bridge container. | /project1 |
| prompt_mode | No | Prompt style expected by the external SAM2/FastSAM service. | auto |
| watch_folder | No | Folder used by file_watch mode for externally rendered mask images. | |
| input_top_path | No | Optional source TOP path. When provided it is pulled into the container via a Select TOP. | |
| mask_source_name | No | NDI/Syphon/Spout sender name that publishes the segmentation mask. |