This is a simple workflow that will let you automatically generate text captions for a folder full of images AND save the text files with the correct names in that same folder. I got tired of doing it in multiple steps. It uses the Florence2 model for caption generation.
Use the comfyui manager to install any missing nodes.
Run the workflow to automatically download the Florence2 model.
(added a pre and post text field in v1.1)
Description
Added pre & post text fields for caption
FAQ
Comments (5)
Super work, works like a boss! Thank you lots!
Appreciate it! Glad it helped you out
Getting error:
Save Text File expected string or bytes-like object, got 'list'
I worked around this by inserting the default Save Text File node, but this required manual file naming to match the dataset images (semi-automated with a custom batch file). Still appreciated the workflow, but would love to figure out why it didn't work out of the box.
@m0n3t Possible that I was on ubuntu - often creates issues with file naming and folder slashes. The save file stuff always seems to be finicky.
