pxovela commited on
Commit
4a3ab9a
1 Parent(s): 597b72c

training cofigs

Browse files
training_configs/optimizer_dadapt.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "doc": {
3
+ "base": "base optimizer configuration for unet and text encoder",
4
+ "text_encoder_overrides": "text encoder config overrides",
5
+ "text_encoder_lr_scale": "if LR not set on text encoder, sets the Lr to a multiple of the Base LR. for example, if base `lr` is 2e-6 and `text_encoder_lr_scale` is 0.5, the text encoder's LR will be set to `1e-6`.",
6
+ "-----------------": "-----------------",
7
+ "optimizer": "adamw, adamw8bit, lion, dadapt_adam, dadapt_lion",
8
+ "optimizer_desc": "'adamw' in standard 32bit, 'adamw8bit' is bitsandbytes, 'lion' is EvoLved Sign Momentum, 'dadapt_...' are D-Adaptation methods",
9
+ "lr": "learning rate, if null will use CLI or main JSON config value",
10
+ "lr_scheduler": "'constant' or 'cosine'",
11
+ "lr_warmup_steps": "number of steps to warmup LR to target LR, if null will use CLI or default a value based on max epochs",
12
+ "lr_decay_steps": "number of steps to decay LR to zero for cosine, if null will use CLI or default a value based on max epochs",
13
+ "betas": "exponential decay rates for the moment estimates",
14
+ "epsilon": "value added to denominator for numerical stability, unused for lion, also used as d0 for dadaptation",
15
+ "weight_decay": "weight decay (L2 penalty)",
16
+ "d0": "for dadaptation only, scale of initial steps (def: 1e-6)",
17
+ "decouple": "for dadapt_adam only, whether to decouple the learning rates of the two distributions, suggested true",
18
+ "momentum": "for dadapt_sgd only, the momentum factor",
19
+ "------------------": "-----------------",
20
+ "freeze_embeddings": "whether to freeze the text embeddings",
21
+ "freeze_front_n_layers": "if not null, freeze the front N layers of the text encoder (you can pass eg -2 to leave only the last 2 layers unfrozen)",
22
+ "freeze_final_layer_norm": "whether to freeze the text encoder's final layer norm"
23
+ },
24
+ "base": {
25
+ "optimizer": "dadapt_adam",
26
+ "lr": 1e-1,
27
+ "lr_scheduler": "constant",
28
+ "lr_decay_steps": null,
29
+ "lr_warmup_steps": null,
30
+ "betas": [0.9, 0.999],
31
+ "epsilon": 1e-8,
32
+ "weight_decay": 0.80,
33
+ "d0": 1e-6,
34
+ "decouple": true
35
+ },
36
+ "text_encoder_overrides": {
37
+ "optimizer": "dadapt_adam",
38
+ "lr": 1e-1,
39
+ "lr_scheduler": "constant",
40
+ "lr_decay_steps": null,
41
+ "lr_warmup_steps": null,
42
+ "betas": [0.9, 0.999],
43
+ "epsilon": 1e-8,
44
+ "weight_decay": 0.80,
45
+ "d0": 1e-6,
46
+ "decouple": true
47
+ },
48
+ "text_encoder_freezing": {
49
+ "freeze_embeddings": true,
50
+ "freeze_front_n_layers": -3,
51
+ "freeze_final_layer_norm": false
52
+ }
53
+ }
training_configs/train.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batch_size": 4,
3
+ "ckpt_every_n_minutes": null,
4
+ "clip_grad_norm": null,
5
+ "clip_skip": 0,
6
+ "cond_dropout": 0.05,
7
+ "data_root": "input/vodka_v4",
8
+ "disable_amp": false,
9
+ "disable_textenc_training": false,
10
+ "disable_xformers": false,
11
+ "flip_p": 0.0,
12
+ "gpuid": 0,
13
+ "gradient_checkpointing": true,
14
+ "grad_accum": 1,
15
+ "logdir": "logs",
16
+ "log_step": 1,
17
+ "lowvram": false,
18
+ "lr_decay_steps": 0,
19
+ "lr_scheduler": "constant",
20
+ "lr_warmup_steps": null,
21
+ "max_epochs": 100,
22
+ "notebook": false,
23
+ "optimizer_config": "optimizer_dadapt.json",
24
+ "project_name": "vodka_v4_3",
25
+ "resolution": 512,
26
+ "resume_ckpt": "sd_v1-5_vae",
27
+ "run_name": null,
28
+ "sample_prompts": "sample_prompts.txt",
29
+ "sample_steps": 10000,
30
+ "save_ckpt_dir": null,
31
+ "save_ckpts_from_n_epochs": 0,
32
+ "save_every_n_epochs": 25,
33
+ "save_optimizer": false,
34
+ "scale_lr": false,
35
+ "seed": 555,
36
+ "shuffle_tags": false,
37
+ "validation_config": "validation_default.json",
38
+ "wandb": false,
39
+ "write_schedule": false,
40
+ "rated_dataset": false,
41
+ "rated_dataset_target_dropout_percent": 50,
42
+ "zero_frequency_noise_ratio": 0.00
43
+ }
training_configs/validation_default.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "documentation": {
3
+ "validate_training": "If true, validate the training using a separate set of image/caption pairs, and log the results as `loss/val`. The curve will trend downwards as the model trains, then flatten and start to trend upwards as effective training finishes and the model begins to overfit the training data. Very useful for preventing overfitting, for checking if your learning rate is too low or too high, and for deciding when to stop training.",
4
+ "val_split_mode": "Either 'automatic' or 'manual', ignored if validate_training is false. 'automatic' val_split_mode picks a random subset of the training set (the number of items is controlled by auto_split_proportion) and removes them from training to use as a validation set. 'manual' val_split_mode lets you provide your own folder of validation items (images+captions), specified using 'manual_data_root'.",
5
+ "auto_split_proportion": "For 'automatic' val_split_mode, how much of the train dataset that should be removed to use for validation. Typical values are 0.15-0.2 (15-20% of the total dataset). Higher is more accurate but slower.",
6
+ "manual_data_root": "For 'manual' val_split_mode, the path to a folder containing validation items.",
7
+ "extra_manual_datasets": "Dictionary of 'name':'path' pairs defining additional validation datasets to load and log. eg { 'santa_suit': '/path/to/captioned_santa_suit_images', 'flamingo_suit': '/path/to/flamingo_suit_images' }",
8
+ "stabilize_training_loss": "If true, stabilize the train loss curves for `loss/epoch` and `loss/log step` by re-calculating training loss with a fixed random seed, and log the results as `loss/train-stabilized`. This more clearly shows the training progress, but it is not enough alone to tell you if you're overfitting.",
9
+ "stabilize_split_proportion": "For stabilize_training_loss, the proportion of the train dataset to overlap for stabilizing the train loss graph. Typical values are 0.15-0.2 (15-20% of the total dataset). Higher is more accurate but slower.",
10
+ "every_n_epochs": "How often to run validation (1=every epoch, 2=every second epoch; 0.5=twice per epoch, 0.33=three times per epoch, etc.).",
11
+ "seed": "The seed to use when running validation and stabilization passes.",
12
+ "use_relative_loss": "logs val/loss as negative relative to first pre-train val/loss value"
13
+ },
14
+ "validate_training": true,
15
+ "val_split_mode": "automatic",
16
+ "auto_split_proportion": 0.15,
17
+ "manual_data_root": null,
18
+ "extra_manual_datasets" : {},
19
+ "stabilize_training_loss": false,
20
+ "stabilize_split_proportion": 0.15,
21
+ "every_n_epochs": 1,
22
+ "seed": 555,
23
+ "use_relative_loss": false
24
+ }