Date:

LoRA Caption Workflow for ComfyUI

ComfyUI LoRA Caption Workflow

I’m very happy to share my LoRA Caption workflow for ComfyUI that will let you run a batch of images through two different captioning methods using Florence 2 model or using Clip Interrogator. Both these are paired with WD14 Tagger node which generates some additional tags/keywords for the caption.

Workflow Overview

The workflow consists of several nodes that work together to generate captions for a batch of images. The images must be in PNG format, as JPEGs are not supported currently in the workflow due to custom node.

LoRA Training "Trigger" Word

You can enter the LoRA training "trigger" word which is added to the prompt.

Node Breakdown

  1. Florence 2 Model: This node uses the Florence 2 model to generate captions for the images.
  2. Clip Interrogator: This node uses the Clip Interrogator to generate captions for the images.
  3. WD14 Tagger: This node generates some additional tags/keywords for the caption.

Useful Tips

  • Caption files generated cannot be overwritten – this is a limitation of the custom node, if you want to re-run, delete the original TXT file.
  • Once all images are run through, you need to Reset the counter. Use the Reset counter (use once) switch – set to true. Remember to turn it off – set to false.
  • List index out of range error – this means you are trying to run it but the txt file caption already exists. Or the counter has reached its limit, you need to reset it.
  • Always review the captions and fine-tune them to ensure you get the best result out of your LoRA.

Conclusion

The ComfyUI LoRA Caption workflow is a powerful tool for generating captions for a batch of images. By using the Florence 2 model and Clip Interrogator, you can generate high-quality captions for your images. Remember to keep the useful tips in mind to get the best results from this workflow.

Frequently Asked Questions

Q: What format should my images be in?
A: Images must be in PNG format.

Q: Can I use JPEGs?
A: No, JPEGs are not supported currently in the workflow due to custom node.

Q: How do I reset the counter?
A: Use the Reset counter (use once) switch – set to true, then turn it off – set to false.

Q: What if I get a List index out of range error?
A: This means you are trying to run it but the txt file caption already exists. Or the counter has reached its limit, you need to reset it.

Latest stories

Read More

LEAVE A REPLY

Please enter your comment!
Please enter your name here