kohya-ss / sd-scripts

Apache License 2.0
5.31k stars 880 forks source link

[feature request]: Recursive loading of image folder #1760

Open TeKett opened 3 weeks ago

TeKett commented 3 weeks ago

Could you add an option for recursive loading of image files, with any number of layers? So you can sort more then just having multiple folders?

So rather then

1_Character 1
1_Character 2
1_Character 3
1_Character 4
1_Character 5

You can have

Series 1 
    Character 1
        1_Outfit 1
        1_Outfit 2
    1_Character 2
Series 2
    1_Character 1
    Character 2
        1_Outfit 1
        1_Outfit 2
    1_Character 3

Currently what i'm doing is prefixing the series or another tag to the beginning of the folder name, but it gets very cluttery with thousands of folders, yes im trying to train a Checkpoint.

1_Series 1 Character 1 Outfit 1
1_Series 1 Character 1 Outfit 2
1_Series 1 Character 2
1_Series 2 Character 1
1_Series 2 Character 2 Outfit 1
1_Series 2 Character 2 Outfit 2
1_Series 2 Character 3

But it has gotten so cluttery i am now thinking of using SymLinks as a temporary solution. So i can have one structured folder and then the unstructured training folder with SymLinks.

kohya-ss commented 2 weeks ago

We recommend that you create a *.caption (or *.txt) file with the same base filename for each image, and write the caption there, so that you can place all your images (and text files) in one folder. Please use --caption_extension option to specify the extension of the caption files.

TeKett commented 2 weeks ago

We recommend that you create a *.caption (or *.txt) file with the same base filename for each image, and write the caption there, so that you can place all your images (and text files) in one folder. Please use --caption_extension option to specify the extension of the caption files.

Im already doing that, the problem is with organizing a million images in the same folder. One way is to split it into multiple folders, but imo its not enough, i want subfolders ontop of that as well.

kohya-ss commented 2 weeks ago

We plan to enable arbitrary file/folder structure using metadata file. Please wait a little longer.