Skip to content

[FR] Multiclass Finetuning with Dreambooth  #3309

Closed
@mauricio-repetto

Description

@mauricio-repetto

Is your feature request related to a problem? Please describe.

Hi! first of all thanks for such a great tool and all your hard work. Well at this moment I'm working with a partner @fededemo on a thesis related to data augmentation using synthetic images with generative models. We were fintuning things with dreambooth using some scripts from this repo which allows us to finetune two classes simultaneously by using a parameter call concept_list I would like if possilbe to add this kind of capabilty to the official scripts.

The concept list work this way
concepts_list = [
{
"instance_prompt": "photo of zwx dog",
"class_prompt": "photo of a dog",
"instance_data_dir": "/content/data/zwx",
"class_data_dir": "/content/data/dog"
},
{
"instance_prompt": "photo of ukj person",
"class_prompt": "photo of a person",
"instance_data_dir": "/content/data/ukj",
"class_data_dir": "/content/data/person"
}
]

NOTE: In particular something that this script didn't take into account was to also consider sample_batch_size and save_sample_prompt within this dictionary for the additional classes since eventually someone would want to save different prompts and number of images for each class.

Describe the solution you'd like

We would like to see the above implemented, why? well we would like to see if the DM is capable of give better attention to the differences between objects by finetuning at the same time two different concepts that belong to the same class, for instance an image of a pneumonia xray and an image of a penoumoconiosis xray

Describe alternatives you've considered

Use the alternative scripts that we have being using so far, with the drawback that there aren't official scripts :'(

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions