ComfyUI-AutoLabel

ComfyUI-AutoLabel
★ 12

图像描述自动标注BLIP离线推理
ComfyUI-AutoLabel 使用 BLIP 为图像生成主物体的详细语义描述,支持自定义提示、GPU/CPU/float16 推理和离线模型,便于自动标注与语义检索。
💡 自动为图像生成详细文本标签,用于数据标注与检索
🍴 2 Forks💻 Python🔄 2025-03-18
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/79aaff81621b
📦 requirements.txt
torch>=1.10.0
Pillow>=8.0.0
transformers>=4.15.0
accelerate>=0.12.0
datasets>=2.0.0
sentencepiece>=0.1.96
ComfyUI-AutoLabel
📄 README

ComfyUI-AutoLabel

ComfyUI-AutoLabel is a custom node for ComfyUI that uses BLIP (Bootstrapping Language-Image Pre-training) to generate detailed descriptions of the main object in an image. This node leverages the power of BLIP to provide accurate and context-aware captions for images.

Features

  • Image to Text Description: Generate detailed descriptions of the main object in an image.
  • Customizable Prompts: Provide your own prompt to guide the description generation.
  • Flexible Inference Modes: Supports GPU, GPU with float16, and CPU inference modes.
  • Offline Mode: Option to download and use models offline.
  • Installation

  • Clone the Repository: Clone this repository into your custom_nodes folder in ComfyUI.
  • “`bash

    git clone https://github.com/fexploit/ComfyUI-AutoLabel custom_nodes/ComfyUI-AutoLabel

    “`

  • Install Dependencies: Navigate to the cloned folder and install the required dependencies.
  • “`bash

    cd custom_nodes/ComfyUI-AutoLabel

    pip install -r requirements.txt

    “`

    Usage

    Adding the Node

  • Start ComfyUI.
  • Add the AutoLabel node from the custom nodes list.
  • Connect an image input and configure the parameters as needed.
  • Parameters

  • image (required): The input image tensor.
  • prompt (optional): A string to guide the description generation (default: “a photography of”).
  • repo_id (optional): The Hugging Face model repository ID (default: “Salesforce/blip-image-captioning-base”).
  • inference_mode (optional): The inference mode, can be “gpu_float16”, “gpu”, or “cpu” (default: “gpu”).
  • get_model_online (optional): Boolean flag to download the model online if not already present (default: True).
  • Contributing

    Contributions are welcome! Please open an issue or submit a pull request with your changes.

    License

    This project is licensed under the MIT License.

    Acknowledgements

  • ComfyUI
  • BLIP
  • Contact

    For any inquiries, please open an issue on the GitHub repository.