From ef25ccac363f4762718dc62b515365a4eef6255e Mon Sep 17 00:00:00 2001 From: Anthony Mercurio Date: Tue, 1 Nov 2022 12:40:39 -0700 Subject: [PATCH] add vae config --- configs/stable-diffusion/v1-4-vae.yaml | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 configs/stable-diffusion/v1-4-vae.yaml diff --git a/configs/stable-diffusion/v1-4-vae.yaml b/configs/stable-diffusion/v1-4-vae.yaml new file mode 100644 index 0000000..57aaaca --- /dev/null +++ b/configs/stable-diffusion/v1-4-vae.yaml @@ -0,0 +1,62 @@ +model: + base_learning_rate: 1.5e-7 + target: ldm.models.autoencoder.AutoencoderKL + params: + monitor: "val/rec_loss" + embed_dim: 4 + lossconfig: + target: ldm.modules.losses.LPIPSWithDiscriminator + params: + disc_start: 50001 + kl_weight: 0.000001 + disc_weight: 0.5 + + ddconfig: + double_z: True + z_channels: 4 + resolution: 256 + in_channels: 3 + out_ch: 3 + ch: 128 + ch_mult: [ 1,2,4,4 ] # num_down = len(ch_mult)-1 + num_res_blocks: 2 + attn_resolutions: [ ] + dropout: 0.0 + +data: + target: main.DataModuleFromConfig + params: + num_workers: 16 + batch_size: 16 + wrap: True + train: + target: ldm.data.localdanbooruvae.LocalDanbooruBaseVAE + params: + data_root: "../dataset" + size: 256 + mode: "train" + downscale_f: 8 + validation: + target: ldm.data.localdanbooruvae.LocalDanbooruBaseVAE + params: + data_root: "../dataset" + size: 256 + mode: "val" + val_split: 64 + downscale_f: 8 + +lightning: + callbacks: + image_logger: + target: main.ImageLogger + params: + batch_frequency: 200 + max_images: 4 + increase_log_steps: True + + trainer: + find_unused_parameters: True + benchmark: True + limit_val_batches: 0 + num_sanity_val_steps: 0 + accumulate_grad_batches: 1