ComfyUI > Nodes > ComfyUI-ArchAi3d-Qwen > 🎯 SAM3 Segment (Low VRAM)

ComfyUI Node: 🎯 SAM3 Segment (Low VRAM)

Class Name

ArchAi3D_SAM3_Segment

Category
ArchAi3d/Mask/Segmentation
Author
Amir Ferdos (ArchAi3d) (Account age: 1109days)
Extension
ComfyUI-ArchAi3d-Qwen
Latest Updated
2026-04-17
Github Stars
0.05K

How to Install ComfyUI-ArchAi3d-Qwen

Install this extension via the ComfyUI Manager by searching for ComfyUI-ArchAi3d-Qwen
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-ArchAi3d-Qwen 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

🎯 SAM3 Segment (Low VRAM) Description

Optimized low VRAM segmentation node using SAM3 model with disk caching and memory management.

🎯 SAM3 Segment (Low VRAM):

The ArchAi3D_SAM3_Segment node is designed to perform optimized segmentation using the SAM3 model, specifically tailored for systems with low VRAM. This node is particularly beneficial for AI artists who require efficient segmentation without the need for high-end hardware. It features disk-based output caching to avoid redundant processing, ensuring faster results by storing previous outputs as PNG files. After each execution, the model is unloaded, and memory is aggressively cleaned using torch.cuda.empty_cache() and gc.collect(), making it ideal for low VRAM environments. The node is standalone, meaning it bundles the SAM3 model code, eliminating the need for external dependencies. This makes it a convenient and efficient tool for integrating segmentation capabilities into your workflow, especially when working with limited resources.

🎯 SAM3 Segment (Low VRAM) Input Parameters:

name

This parameter specifies the name of the segmentation task, which can be used for identification purposes in the web interface. It does not directly affect the segmentation process but helps in organizing and retrieving cached results.

image

The image parameter is the input image that you want to segment. It should be a three-dimensional array representing the image data. The node processes this image to generate a segmented output based on the provided prompt and other parameters.

prompt

The prompt is a textual input that guides the segmentation process. It helps the model understand what specific elements or features to focus on within the image. The prompt should be clear and descriptive to achieve the desired segmentation results.

confidence_threshold

This parameter sets the minimum confidence level required for a segment to be considered valid. It ranges from 0 to 1, with a default value of 0.5. A higher threshold means only segments with higher confidence will be included in the output, potentially reducing noise but also excluding less certain segments.

use_cache

A boolean parameter that determines whether to use cached results if available. When set to true, the node will first check for existing cached outputs before processing the image, which can significantly speed up execution time for previously processed images.

mask_blur

This parameter controls the amount of blur applied to the segmentation mask. It is an integer value where higher numbers result in more blur, which can help smooth out the edges of the segmented areas.

mask_offset

The mask_offset parameter adjusts the position of the segmentation mask. It is an integer value that shifts the mask by the specified amount, which can be useful for fine-tuning the alignment of the mask with the image.

invert_output

A boolean parameter that, when set to true, inverts the colors of the segmentation output. This can be useful for highlighting the segmented areas against a different background.

background

This parameter specifies the type of background to use for the segmented output. The default value is "Alpha," which means the background will be transparent. Other options can include solid colors or patterns.

background_color

If a solid color background is chosen, this parameter specifies the color to use. It is a string representing a color code, such as "#222222" for a dark gray background.

device

The device parameter determines whether the segmentation process should run on the CPU or GPU. The default value is "Auto," which automatically selects the best available device. You can specify "cpu" or "cuda" to manually choose the processing unit.

🎯 SAM3 Segment (Low VRAM) Output Parameters:

segmented_image

The segmented_image is the primary output of the node, representing the processed image with the applied segmentation. It highlights the areas of interest as defined by the prompt and other parameters, providing a clear visual distinction between different segments.

cache_status

This output indicates whether the result was retrieved from the cache or processed anew. It helps you understand the efficiency of the operation and whether caching is effectively reducing processing time.

🎯 SAM3 Segment (Low VRAM) Usage Tips:

  • To optimize performance, ensure that the use_cache parameter is enabled, especially when working with images that have been processed before.
  • Adjust the confidence_threshold to balance between including more segments and reducing noise. A higher threshold can help focus on more prominent features.
  • Use the mask_blur parameter to smooth out the edges of the segmentation, which can enhance the visual quality of the output.

🎯 SAM3 Segment (Low VRAM) Common Errors and Solutions:

"Model not found"

  • Explanation: This error occurs when the SAM3 model file is missing or not downloaded correctly.
  • Solution: Ensure that the SAM3 model is downloaded from the specified URL and placed in the correct directory. Verify the file path and download the model again if necessary.

"CUDA out of memory"

  • Explanation: This error indicates that the GPU does not have enough memory to process the image.
  • Solution: Try reducing the image size or switching the device parameter to "cpu" to process the image using the CPU instead of the GPU.

"Cache index file corrupted"

  • Explanation: This error suggests that the cache index file is unreadable or corrupted.
  • Solution: Delete the cache_index.json file in the cache directory to reset the cache index. The node will recreate it during the next execution.

🎯 SAM3 Segment (Low VRAM) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-ArchAi3d-Qwen
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.

🎯 SAM3 Segment (Low VRAM)