ComfyUI > Nodes > ComfyUI-TBG-SAM3 > TBG SAM3 Model Loader and Downloader

ComfyUI Node: TBG SAM3 Model Loader and Downloader

Class Name

TBGSAM3ModelLoaderAdvanced

Category
TBG/SAM3
Author
Ltamann (Account age: 4766days)
Extension
ComfyUI-TBG-SAM3
Latest Updated
2025-11-29
Github Stars
0.14K

How to Install ComfyUI-TBG-SAM3

Install this extension via the ComfyUI Manager by searching for ComfyUI-TBG-SAM3
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-TBG-SAM3 in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

TBG SAM3 Model Loader and Downloader Description

Facilitates loading/downloading SAM3 models with API or local checkpoints for AI artists.

TBG SAM3 Model Loader and Downloader:

The TBGSAM3ModelLoaderAdvanced node is a sophisticated tool designed to facilitate the loading and downloading of SAM3 models, offering flexibility and ease of use for AI artists. This advanced loader allows you to either utilize the official API for automatic configuration or download a local checkpoint if it's missing, ensuring that you always have access to the necessary model files. Additionally, it provides the capability to load specific local checkpoints from a designated directory, giving you control over the model version you wish to work with. The node is designed to return a SAM3 model dictionary, similar to the simpler TBGLoadSAM3Model, but with enhanced functionality and options for model management. This makes it an essential component for those looking to integrate SAM3 models into their workflows with minimal hassle and maximum efficiency.

TBG SAM3 Model Loader and Downloader Input Parameters:

model_source

The model_source parameter determines the source from which the SAM3 model will be loaded. It offers several options: "auto (API to cache)" for using the official API to automatically configure the model, "local (auto-download)" to download the model if it's not already available locally, and additional options for selecting specific local checkpoints. This parameter is crucial as it dictates how the model is obtained and can significantly impact the ease and speed of the model loading process. The default value is "local (auto-download)", which ensures that the model is downloaded and ready for use if not already present.

device

The device parameter specifies the hardware on which the SAM3 model will be executed. You can choose between "cuda" and "cpu", with "cuda" being the default option. This parameter is important because it affects the performance and speed of model processing. Using a CUDA-enabled GPU can significantly accelerate computations, making it the preferred choice for those with compatible hardware. However, if a GPU is not available, the CPU option ensures that the model can still be run, albeit at a slower pace.

TBG SAM3 Model Loader and Downloader Output Parameters:

SAM3_MODEL

The SAM3_MODEL output parameter provides a dictionary containing the loaded SAM3 model, its processor, and the device on which it is running. This output is essential as it encapsulates all the necessary components required to utilize the SAM3 model in your projects. The model dictionary includes the model itself, which is ready for inference or further processing, and the processor, which handles the input and output data transformations. Understanding this output allows you to seamlessly integrate the SAM3 model into your workflow, leveraging its capabilities for various AI art applications.

TBG SAM3 Model Loader and Downloader Usage Tips:

  • To ensure optimal performance, select "cuda" as the device if you have a compatible GPU, as this will significantly speed up model processing compared to using the CPU.
  • When working with multiple model versions, use the specific local checkpoint option in model_source to load the desired model version, providing greater control over your workflow.
  • If you frequently switch between different models, consider using the "auto (API to cache)" option to streamline the process and reduce manual management of model files.

TBG SAM3 Model Loader and Downloader Common Errors and Solutions:

Downloaded model file not found at: <checkpoint_path>

  • Explanation: This error occurs when the node attempts to download the SAM3 model file, but it is not found at the expected location.
  • Solution: Ensure that your internet connection is stable and that the download path is correctly specified. If the problem persists, manually check the directory to confirm the presence of the downloaded file.

Local model file not found: <model_source> -> <checkpoint_path>

  • Explanation: This error indicates that the specified local checkpoint file could not be found in the designated directory.
  • Solution: Verify that the file path is correct and that the file exists in the specified location. If necessary, re-download the model or check for any typos in the file path.

Missing keys: <missing_keys>

  • Explanation: This error suggests that some expected keys are missing from the model's state dictionary during loading.
  • Solution: Check if the model file is complete and not corrupted. Consider re-downloading the model or using a different checkpoint to resolve the issue.

Unexpected keys: <unexpected_keys>

  • Explanation: This error occurs when there are unexpected keys in the model's state dictionary that do not match the expected structure.
  • Solution: Ensure that the correct model version is being loaded. If the issue persists, consult the model documentation or support resources for guidance on resolving state dictionary mismatches.

TBG SAM3 Model Loader and Downloader Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-TBG-SAM3
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.