kohya_ss / docs /image_folder_structure.md
zengxi123's picture
Upload folder using huggingface_hub
fb83c5b verified
|
raw
history blame
2.11 kB

Drambootd, Lora and TI image folder structure

To ensure successful training with Kohya, it is crucial to follow a specific folder structure that provides the necessary image repeats. Please adhere to the following structure precisely:

Folder Structure Example:

c:
|
β”œβ”€β”€images
|   |
|   β”œβ”€β”€ 30_cat
|   |   |
|   |   β”œβ”€β”€ image1.jpg
|   |   β”œβ”€β”€ image1.txt
|   |   β”œβ”€β”€ image2.png
|   |   └── image2.txt
|   |
|   β”œβ”€β”€ 30_dog
|   |   |
|   |   β”œβ”€β”€ image1.jpg
|   |   β”œβ”€β”€ image1.txt
|   |   β”œβ”€β”€ image2.png
|   |   └── image2.txt
|   |
|   └── 40_black mamba
|       |
|       β”œβ”€β”€ image1.jpg
|       β”œβ”€β”€ image1.txt
|       β”œβ”€β”€ image2.png
|       └── image2.txt
|
β”œβ”€β”€regularization
|   |
|   β”œβ”€β”€ 1_cat
|   |   |
|   |   β”œβ”€β”€ reg1.jpg
|   |   β”œβ”€β”€ reg2.jpg
|   |
|   β”œβ”€β”€ 1_dog
|   |   |
|   |   β”œβ”€β”€ reg1.jpg
|   |   β”œβ”€β”€ reg2.jpg
|   |
|   └── 1_black mamba
|       |
|       β”œβ”€β”€ reg1.jpg
|       β”œβ”€β”€ reg2.jpg

Please note the following important information regarding file extensions and their impact on concept names during model training:

If a file with a .txt or .caption extension and the same name as an image is present in the image subfolder, it will take precedence over the concept name during the model training process. For example, if there is an image file named image1.jpg in the 30_cat subfolder, and there is a corresponding text file named image1.txt or image1.caption in the same subfolder, the concept name used during training will be determined by the content of that text file rather than the subfolder name.

Ensure that the content of such text files accurately reflects the desired concept name or any relevant caption information associated with the corresponding image.

By considering this information and maintaining the proper folder structure, including any necessary text or caption files, you can ensure a smooth and effective training process with Kohya.