bmaltais / kohya_ss

Apache License 2.0
9.71k stars 1.25k forks source link

Can we use Differential Output Preservation loss for LoRA at the moment #2963

Open FurkanGozukara opened 1 week ago

FurkanGozukara commented 1 week ago

I feel like it requires special case @bmaltais

Do we have it at the moment? Thank you so much

I mean this pull request : https://github.com/kohya-ss/sd-scripts/pull/1710

So as usual we set regularization images. But it requires a special toml file set. How can we do it? Can we do it?

DriveHabits commented 1 week ago

Its already there you need to make a dataset.toml file instead of img directory

FurkanGozukara commented 1 week ago

dataset.toml

this kills the aim of bmaltais gui automation. can't we add it?

also how we gonna give that toml file from the gui?

DriveHabits commented 1 week ago

@FurkanGozukara no you see the section right next to image folder, Dataset config file, you add it in there, and in that dataset config file you add in your images and regularzation images

FurkanGozukara commented 1 week ago

@DriveHabits can you share here example file that has training images and reg images please

DriveHabits commented 1 week ago

@FurkanGozukara

[[datasets]] resolution = 512 batch_size = 4 enable_bucket = true

[[datasets.subsets]] num_repeats = 1 image_dir = "/home/recris/sd_train/test/export/samples_default"

[[datasets.subsets]] is_reg = true num_repeats = 1 image_dir = "/home/recris/sd_train/test/export/samples_reg" custom_attributes.diff_output_preservation = true

DriveHabits commented 1 week ago

create a .toml file and put this data in there

FurkanGozukara commented 1 week ago

@DriveHabits ty gonna test

DriveHabits commented 1 week ago

only works for lora @FurkanGozukara

heinrichI commented 3 days ago

It can be used with mask conditioning_data_dir ?