sd-scripts icon indicating copy to clipboard operation
sd-scripts copied to clipboard

[feature request]: Recursive loading of image folder

Open TeKett opened this issue 1 year ago • 4 comments

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.

TeKett avatar Nov 04 '24 13:11 TeKett

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.

kohya-ss avatar Nov 06 '24 13:11 kohya-ss

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.

TeKett avatar Nov 06 '24 13:11 TeKett

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

kohya-ss avatar Nov 06 '24 13:11 kohya-ss

Recursive loading would be much appreciated, rather than having to specify a new dataset subset for each folder.

ribawaja avatar Sep 02 '25 06:09 ribawaja