taming-transformers icon indicating copy to clipboard operation
taming-transformers copied to clipboard

config for conditional training?

Open entangledothers opened this issue 4 years ago • 1 comments
trafficstars

I'm trying to figure out how to train a conditional model, but am a little stumped as to the correct way to setup the config, my data structure looks this:

root_folder -- category_01_folder -- category_02_folder -- category_03_folder ... etc.

My question is how do I format the config, say from the custom_vqgan config file to train this as a conditional model, and additionally, the text files we should generate for train and test, how are they formatted in this regard?

Thanks in advance for any help!

entangledothers avatar Jul 04 '21 08:07 entangledothers

I came here looking for this as well. I found this config from the conditional image net (CIN) model linked in the README, which looks like this:

model:
  ...
  params:
    first_stage_key: image
    cond_stage_key: class_label
    ...
    cond_stage_config:
      target: taming.modules.util.Labelator
      params:
        n_classes: 1000

However, it's not clear how the labels for each image are supposed to be supplied during training.

areiner-novetta avatar Jul 07 '21 16:07 areiner-novetta