hollowstrawberry / kohya-colab

Accessible Google Colab notebooks for Stable Diffusion Lora training, based on the work of kohya-ss and Linaqruf
GNU General Public License v3.0
561 stars 80 forks source link

please clarify how to specify a regularization folder #80

Closed SAC020 closed 4 months ago

SAC020 commented 5 months ago

Hi,

Not really a bug but couldn't find a Q&A section. Can you please explain more clearly how to specify a regularization folder?

If my folder structure in the google drive is "my drive => loras => sacbf", in which I have a "dataset" folder and a "reg_images" folder, what and how do I need to specify in the colab?

Thank you!

hollowstrawberry commented 5 months ago

Down in the "Multiple folders in dataset" section, you need to edit the cell and run it. It should look like this:

custom_dataset = """
[[datasets]]

[[datasets.subsets]]
image_dir = "/content/drive/MyDrive/Loras/sacbf/dataset"
num_repeats = 

[[datasets.subsets]]
image_dir = "/content/drive/MyDrive/Loras/sacbf/reg_images"
num_repeats = 
is_reg = true

"""

Please specify the number of repeats before running it.

SAC020 commented 5 months ago

Thank you very much, I will test it.

I am assuming the last triple quote (below the is_reg = true line) is not needed but related to github code formatting?

hollowstrawberry commented 5 months ago

The first line was hidden, sorry. The code block needs to define a variable custom_dataset that starts and ends with the triple quote.