I have seen (and asked for help on) similar topics before and also tried to figure out how to do this myself, but I guess I'm just too stupid
(Recently I have started playing around with generating images with AI locally using a software called NMKD. This software creates image files where the file name contains information on the settings used for creating it).
What I would like is to have a button that takes the information in the file names of the selected files and adds it as metadata tags, like this:
File name example:
1-2376659996-scale4.50-k_euler-sd-v1-5-fp16.png
The settings included in the file name:
1 = file number (not important)
2376659996 = Seed
scale4.50 = PromtGuidance
k_euler = Sampler
sd-v1-5-fp16 = Model
All the different settings are separated by a hyphen in the file names, except for the Model that also can include hyphens.
These are the metadata-tags I would like to be created from the file name:
Seed:2376659996
PromtGuidance:4.50
Sampler:k_euler
Model:sd-v1-5-fp16
This is super helpful for anyone using custom RegEx columns as well. Allows you to have a copy of the metadata and ensures compatibility with certain applications that only look at the built-in meta-data fields without having to manual copy it all in.
Thank you.
I have been meaning to figure out how to add the folder name as a tag, but haven't tried yet.
I suppose this script could be modified to do that?