Nodes: Images_Converter, Show_Text, Strings_From_List, Save_Text, Random_Images, Load_Images_From_Paths, JSPaint.
A set of custom nodes for ComfyUI I needed for myself but I'm sharing with the public.
The filename of the caption must be the same as the matching image with the extension: .txt
or .caption
.
For eg. with banana.png
, it will try to load in the same directory the following files if they exist :
banana.txt
| banana.png.txt
banana.caption
| banana.png.caption
The filename_prefix
is ignored for the Save Text
node because we are passing it the saved image path.
It will take the same filename name as the image.
N.B. In this example I just do preprocessing on the image but it can be used in various ways; connect it to WD-Tagger after the sampling to automatically caption your images for instance.
In the latest version of this set of custom node, the option to save metadata checks for the seed, sampler, etc. automatically but sometimes the detection of the positive and negative prompt are wonky (if you load them from a path), in this case it's possible to pass the string value to the Save Images node.
N.B. The metadata extraction of the seed, sampler, cfg, etc. will be wonky too if there's many KSampler nodes and sampling happenning in the same workflow.