ComfyUI  >  Nodes  >  ComfyUI-Florence2

ComfyUI Extension: ComfyUI-Florence2

Repo Name


kijai (Account age: 2180 days)
View all nodes (2)
Latest Updated
Github Stars

How to Install ComfyUI-Florence2

Install this extension via the ComfyUI Manager by searching for  ComfyUI-Florence2
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Florence2 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ComfyUI-Florence2 Description

ComfyUI-Florence2 integrates Microsoft's Florence2 vision model into ComfyUI, enabling functionalities like captioning, object detection, and segmentation.

ComfyUI-Florence2 Introduction

ComfyUI-Florence2 is an advanced extension designed to enhance your AI art creation experience by leveraging the powerful Florence-2 vision foundation model. This extension allows you to perform a wide range of vision and vision-language tasks using simple text prompts. Whether you need to generate image captions, detect objects, or segment images, ComfyUI-Florence2 can handle it all with ease.

The extension is built on the robust FLD-5B dataset, which includes 5.4 billion annotations across 126 million images. This extensive dataset enables the model to excel in multi-task learning, making it a versatile tool for both zero-shot and fine-tuned settings. In simpler terms, ComfyUI-Florence2 can perform tasks without prior training on specific data (zero-shot) or can be fine-tuned for more specialized tasks.

How ComfyUI-Florence2 Works

At its core, ComfyUI-Florence2 uses a sequence-to-sequence architecture. Think of this as a conversation where the model reads a prompt (input) and generates a response (output). For example, if you provide a text prompt like "A cat sitting on a windowsill," the model can generate a caption for an image, detect the cat in the image, or even segment the cat from the background.

The model's ability to understand and generate responses is powered by its training on the FLD-5B dataset. This extensive training allows it to recognize patterns and make accurate predictions, even for tasks it hasn't explicitly been trained on. This makes ComfyUI-Florence2 a highly adaptable tool for various artistic and practical applications.

ComfyUI-Florence2 Features


Generate descriptive captions for your images. Simply provide a text prompt, and the model will create a caption that accurately describes the content of the image.

Object Detection

Identify and locate objects within an image. This feature is particularly useful for tasks that require precise identification of multiple elements within a scene.


Separate different elements within an image. This can be used to isolate specific objects or regions, making it easier to manipulate or analyze individual parts of an image.


Each feature can be customized to suit your specific needs. For example, you can adjust the sensitivity of object detection to focus on larger or smaller objects, or fine-tune the segmentation to achieve more precise boundaries.

ComfyUI-Florence2 Models

ComfyUI-Florence2 supports several models, each tailored for different levels of performance and specificity:

  • : A general-purpose model suitable for a wide range of tasks.
  • : A fine-tuned version of the base model, offering improved performance for specific tasks.
  • : A more powerful model designed for complex tasks requiring higher accuracy.
  • : The fine-tuned version of the large model, providing the highest level of performance and accuracy. Choosing the right model depends on your specific needs. For general tasks, the base model is usually sufficient. For more specialized or complex tasks, the large or fine-tuned models may be more appropriate.

Troubleshooting ComfyUI-Florence2

Common Issues and Solutions

Issue: Model Not Loading

Solution: Ensure that you have a stable internet connection as the models are automatically downloaded. If the problem persists, check if the required dependencies, such as the latest version of transformers, are installed.

Issue: Poor Performance

Solution: Try switching to a more powerful model like Florence-2-large or its fine-tuned version. Additionally, ensure that your hardware meets the necessary requirements for running these models.

Issue: Inaccurate Results

Solution: Fine-tune the model settings or provide more specific prompts. Sometimes, adjusting the sensitivity or specificity of the task can yield better results.

Frequently Asked Questions

Q: Can I use ComfyUI-Florence2 for commercial projects? A: Yes, you can use it for both personal and commercial projects. However, always check the licensing terms of the specific models you are using.

Q: How do I update the extension? A: Updates are typically pushed to the repository. You can pull the latest changes from the repository to keep your extension up-to-date.

Learn More about ComfyUI-Florence2

To further enhance your experience with ComfyUI-Florence2, here are some additional resources:

  • : Detailed documentation on the Florence-2 models.
  • : Join discussions, ask questions, and share your experiences with other AI artists.
  • : Watch video tutorials to get step-by-step guidance on using ComfyUI-Florence2. By exploring these resources, you can gain a deeper understanding of how to make the most out of ComfyUI-Florence2 and elevate your AI art projects to new heights.

ComfyUI-Florence2 Related Nodes


© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.