Skip to content

Commit

Permalink
add scheduled jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
piercus committed Jan 27, 2024
1 parent 072feeb commit dde18ed
Show file tree
Hide file tree
Showing 4 changed files with 230 additions and 0 deletions.
78 changes: 78 additions & 0 deletions configs/scheduled-remote/finetune-color-palette-schedule-mlp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
script = "finetune-ldm-color-palette.py" # not used for now
[wandb]
mode = "online" # "online", "offline", "disabled"
entity = "piercus"
project = "color-palette"
name = "mlp"
tags = ["remote", "l4"]

[models]
unet = {checkpoint = "tests/weights/stable-diffusion-1-5/unet.safetensors", train = false, gpu_index = 0}
text_encoder = {checkpoint = "tests/weights/stable-diffusion-1-5/CLIPTextEncoderL.safetensors", train = false, gpu_index = 0}
lda = {checkpoint = "tests/weights/stable-diffusion-1-5/lda.safetensors", train = false, gpu_index = 0}
color_palette_encoder = {train = true, gpu_index = 0}

[adapters]
color_palette_adapter = {}

[latent_diffusion]
unconditional_sampling_probability = 0.1
offset_noise = 0.2

[color_palette]
max_colors = 8
feedforward_dim = 20
num_layers = 2
mode='mlp'
embedding_dim = 10

[training]
duration = "2:epoch"
seed = 0
gpu_index = 0
batch_size = 10
gradient_accumulation = "1:step"
clip_grad_norm = 1.0
# clip_grad_value = 1.0
evaluation_interval = "250:step"
evaluation_seed = 1
num_workers = 8

[optimizer]
optimizer = "AdamW" # "SGD", "Adam", "AdamW", "AdamW8bit", "Lion8bit"
learning_rate = 1e-4
betas = [0.9, 0.999]
eps = 1e-8
weight_decay = 1e-2

[scheduler]
scheduler_type = "ConstantLR"
update_interval = "1:step"
warmup = "250:step"

[dropout]
dropout_probability = 0.0
use_gyro_dropout = false

[dataset]
hf_repo = "1aurent/unsplash-lite-palette"
revision = "main"
resize_image_max_size = 512
caption_key = "ai_description"
split = "train"

[checkpointing]
save_interval = "2:epoch"
use_wandb = true

[test_color_palette]
num_inference_steps = 30
use_short_prompts = false
prompts = [
{"text" = "a cute cat", "color_palette" = [[0,0,255]], seed=1},
{"text" = "a cute cat", "color_palette" = [[255,0,0]], seed=1},
{"text" = "a cute cat", "color_palette" = [[0,0,255], [255,255,255], [255,0,0]]},
{"text" = "a cute cat", "color_palette" = [[255,0,0], [255,255,255], [0,0,255]]}
]
num_palette_sample = 8
condition_scale = 7.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
script = "finetune-ldm-color-palette.py" # not used for now
[wandb]
mode = "online" # "online", "offline", "disabled"
entity = "piercus"
project = "color-palette"
name = "no-layer-lda-l4"
tags = ["remote", "l4"]

[models]
unet = {checkpoint = "tests/weights/stable-diffusion-1-5/unet.safetensors", train = false, gpu_index = 0}
text_encoder = {checkpoint = "tests/weights/stable-diffusion-1-5/CLIPTextEncoderL.safetensors", train = false, gpu_index = 0}
lda = {checkpoint = "tests/weights/stable-diffusion-1-5/lda.safetensors", train = false, gpu_index = 0}
color_palette_encoder = {train = true, gpu_index = 0}

[adapters]
color_palette_adapter = {}

[latent_diffusion]
unconditional_sampling_probability = 0.1
offset_noise = 0.2

[color_palette]
max_colors = 8
num_layers = 0
use_lda = true

[training]
duration = "2:epoch"
seed = 0
gpu_index = 0
batch_size = 10
gradient_accumulation = "1:step"
clip_grad_norm = 1.0
# clip_grad_value = 1.0
evaluation_interval = "250:step"
evaluation_seed = 1
num_workers = 8

[optimizer]
optimizer = "AdamW" # "SGD", "Adam", "AdamW", "AdamW8bit", "Lion8bit"
learning_rate = 1e-4
betas = [0.9, 0.999]
eps = 1e-8
weight_decay = 1e-2

[scheduler]
scheduler_type = "ConstantLR"
update_interval = "1:step"
warmup = "250:step"

[dropout]
dropout_probability = 0.0
use_gyro_dropout = false

[dataset]
hf_repo = "1aurent/unsplash-lite-palette"
revision = "main"
resize_image_max_size = 512
caption_key = "ai_description"
split = "train"

[checkpointing]
save_interval = "1:epoch"
use_wandb = true

[test_color_palette]
num_inference_steps = 30
use_short_prompts = false
prompts = [
{"text" = "a cute cat", "color_palette" = [[0,0,255]], seed=1},
{"text" = "a cute cat", "color_palette" = [[255,0,0]], seed=1},
{"text" = "a cute cat", "color_palette" = [[0,0,255], [255,255,255], [255,0,0]]},
{"text" = "a cute cat", "color_palette" = [[255,0,0], [255,255,255], [0,0,255]]}
]
num_palette_sample = 8
condition_scale = 7.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
script = "finetune-ldm-color-palette.py" # not used for now
[wandb]
mode = "online" # "online", "offline", "disabled"
entity = "piercus"
project = "color-palette"
name = "no-layer-l4"
tags = ["remote", "l4"]

[models]
unet = {checkpoint = "tests/weights/stable-diffusion-1-5/unet.safetensors", train = false, gpu_index = 0}
text_encoder = {checkpoint = "tests/weights/stable-diffusion-1-5/CLIPTextEncoderL.safetensors", train = false, gpu_index = 0}
lda = {checkpoint = "tests/weights/stable-diffusion-1-5/lda.safetensors", train = false, gpu_index = 0}
color_palette_encoder = {train = true, gpu_index = 0}

[adapters]
color_palette_adapter = {}

[latent_diffusion]
unconditional_sampling_probability = 0.1
offset_noise = 0.2

[color_palette]
max_colors = 8
num_layers = 0
use_lda = false

[training]
duration = "2:epoch"
seed = 0
gpu_index = 0
batch_size = 10
gradient_accumulation = "1:step"
clip_grad_norm = 1.0
# clip_grad_value = 1.0
evaluation_interval = "250:step"
evaluation_seed = 1
num_workers = 8

[optimizer]
optimizer = "AdamW" # "SGD", "Adam", "AdamW", "AdamW8bit", "Lion8bit"
learning_rate = 1e-4
betas = [0.9, 0.999]
eps = 1e-8
weight_decay = 1e-2

[scheduler]
scheduler_type = "ConstantLR"
update_interval = "1:step"
warmup = "250:step"

[dropout]
dropout_probability = 0.0
use_gyro_dropout = false

[dataset]
hf_repo = "1aurent/unsplash-lite-palette"
revision = "main"
resize_image_max_size = 512
caption_key = "ai_description"
split = "train"

[checkpointing]
save_interval = "2:epoch"
use_wandb = true

[test_color_palette]
num_inference_steps = 30
use_short_prompts = false
prompts = [
{"text" = "a cute cat", "color_palette" = [[0,0,255]], seed=1},
{"text" = "a cute cat", "color_palette" = [[255,0,0]], seed=1},
{"text" = "a cute cat", "color_palette" = [[0,0,255], [255,255,255], [255,0,0]]},
{"text" = "a cute cat", "color_palette" = [[255,0,0], [255,255,255], [0,0,255]]}
]
num_palette_sample = 8
condition_scale = 7.5

0 comments on commit dde18ed

Please sign in to comment.