Extensions/ComfyUI Speech Bubble Detector
ComfyUI Extension

ComfyUI Speech Bubble Detector

Speech bubble detector for ComfyUI based on SAM3 Text Segmentation with crop-locked region detection for manga/manhwa cleanup workflows.

By daminik124124-ops·Created 2 months ago·Updated 2 months ago· 0
daminik124124-ops/ComfyUI-Speech-Bubble-Detector
Nodes
On cloudLocal install
Stars0
Updated2 months ago
Readme

ComfyUI Speech Bubble Detector

A ComfyUI custom node package for manga/manhwa speech bubble cleanup workflows.

This package is based on comfyui-sam3 and includes a patched SAM3 Text Segmentation workflow for crop-locked speech bubble detection.

Main node

Search in ComfyUI:

Speech Bubble Detector

This is the renamed/patched version of SAM3 Text Segmentation.

What is changed

  • The text segmentation node can use positive_boxes as crop-locked regions.
  • When positive_boxes are connected, detection runs only inside those regions and pastes masks back to the full image.
  • Added region_padding input for expanding each crop region.
  • Includes the attention fallback patch to reduce Flash Attention mask-warning spam.

Typical workflow

Use this together with the separate helper node:

JSON Regions to SAM3 Boxes API -> positive_boxes -> Speech Bubble Detector

Recommended settings:

text_prompt = speech bubble
confidence_threshold = 0.1 - 0.2
max_detections = -1
region_padding = 0 - 20

Install

Clone into ComfyUI/custom_nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/daminik124124-ops/ComfyUI-Speech-Bubble-Detector.git

Then restart ComfyUI.

Important

Do not install this fork side-by-side with the original comfyui-sam3 unless you know what you are doing. This package is intended to replace the original SAM3 custom node package for this speech-bubble workflow.

The helper node ComfyUI-SAM3-JSON-Boxes-API remains a separate repository/package.

Credits

Based on the original ComfyUI-SAM3 project by PozzettiAndrea. This fork adds speech-bubble/crop-lock workflow changes.