Sign In

Workflow ComfyUi Bulk Booru Tags to TXT Files

33
597
7
Type
Workflows
Stats
597
0
Reviews
Published
Sep 19, 2023
Base Model
Other
Hash
AutoV2
CEF4E911F4

This workflow takes in a text file containing a list of images, uses WD 1.4 tagging to output a list of tags for the image into a file named the same as the image file, but with a .txt extension. Please read below:

#1: If any nodes are red, use ComfyUI Manager to download them. This workflow uses ComfyMath, WAS Node Suite, ComfyUI_lb_CustomNodes, pythongosssss/ComfyUI-Custom-Scripts, pythongosssss/ComfyUI WD 1.4 Tagger, tinyterraNodes, & Quality of life Suite V2.

#2: Fill in the full path to your text file in the Text Load Line From File node. Leave the rest alone.

#3: Incrementing can only occur on the Primitive from 0-2048. When you reach that, any batching will just repeat the tag file creation for 2048 (or whatever value you have in the IntBinaryOperation "a" field + 2048).

#4: All file names in the list and all paths must be the same length or else you will not get matching file names. You will need to adjust the truncate_to values in the two Text String Truncate fields to provide the correct file name result. The first one strips the front off (the path) and the second strips the end off (the extension). (I know it reads the other way around, but trust me, that's how it works...I dunno, I didn't write the nodes.)

#5: Adjust the first text field in the 3x TXT Loader MultiConcat node to have the path where you want to save the .txt files.

#6: When ready, click Extra options, put in a value from 1-2048 into the Batch Count, then click Queue Prompt. Sit back and watch it go. (I do recommend testing with a small number before running a large batch, just to make sure everything's setup ok.)

Thank you for checking out the workflow and I hope it's useful to you. -soul