Skip to content

Commit

Permalink
Refactor code and configs, rename modules, adjust default LR schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
yqzhishen committed Apr 16, 2024
1 parent 9606e4e commit dc6896b
Show file tree
Hide file tree
Showing 26 changed files with 325 additions and 475 deletions.
14 changes: 0 additions & 14 deletions configs/RectifiedFlow_test.yaml

This file was deleted.

20 changes: 13 additions & 7 deletions configs/acoustic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,28 @@ use_tension_embed: false
use_key_shift_embed: false
use_speed_embed: false

diffusion_type: reflow
time_scale_factor: 1000
timesteps: 1000
max_beta: 0.02
rel_pos: true
sampling_algorithm: euler
sampling_steps: 20
diff_accelerator: ddim
diff_speedup: 10
hidden_size: 256
residual_layers: 20
residual_channels: 512
dilation_cycle_length: 4 # *
diff_decoder_type: 'wavenet'
diff_loss_type: l2
backbone_type: 'wavenet'
main_loss_type: l2
main_loss_log_norm: false
schedule_type: 'linear'

# shallow diffusion
use_shallow_diffusion: true
T_start: 0.4
T_start_infer: 0.4
K_step: 400
K_step_infer: 400

Expand All @@ -100,20 +107,19 @@ num_sanity_val_steps: 1
optimizer_args:
lr: 0.0006
lr_scheduler_args:
step_size: 30000
gamma: 0.5
step_size: 10000
gamma: 0.75
max_batch_frames: 50000
max_batch_size: 64
dataset_size_key: 'lengths'
val_with_vocoder: true
val_check_interval: 2000
num_valid_plots: 10
max_updates: 200000
max_updates: 160000
num_ckpt_keep: 5
permanent_ckpt_start: 120000
permanent_ckpt_start: 80000
permanent_ckpt_interval: 20000


finetune_enabled: false
finetune_ckpt_path: null

Expand Down
9 changes: 6 additions & 3 deletions configs/templates/config_acoustic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ residual_channels: 512
residual_layers: 20

# shallow diffusion
diffusion_type: reflow
use_shallow_diffusion: true
T_start: 0.4
T_start_infer: 0.4
K_step: 300
K_step_infer: 300
shallow_diffusion_args:
Expand All @@ -73,11 +76,11 @@ optimizer_args:
lr: 0.0006
lr_scheduler_args:
scheduler_cls: torch.optim.lr_scheduler.StepLR
step_size: 30000
gamma: 0.5
step_size: 10000
gamma: 0.75
max_batch_frames: 50000
max_batch_size: 64
max_updates: 200000
max_updates: 160000

num_valid_plots: 10
val_with_vocoder: true
Expand Down
91 changes: 0 additions & 91 deletions configs/templates/config_acousticRectifiedFlow.yaml

This file was deleted.

8 changes: 5 additions & 3 deletions configs/templates/config_variance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ use_glide_embed: false
glide_types: [up, down]
glide_embed_scale: 11.313708498984760 # sqrt(128)

diffusion_type: reflow

pitch_prediction_args:
pitd_norm_min: -8.0
pitd_norm_max: 8.0
Expand All @@ -89,16 +91,16 @@ optimizer_args:
lr: 0.0006
lr_scheduler_args:
scheduler_cls: torch.optim.lr_scheduler.StepLR
step_size: 12000
step_size: 10000
gamma: 0.75
max_batch_frames: 80000
max_batch_size: 48
max_updates: 288000
max_updates: 160000

num_valid_plots: 10
val_check_interval: 2000
num_ckpt_keep: 5
permanent_ckpt_start: 180000
permanent_ckpt_start: 80000
permanent_ckpt_interval: 10000
pl_trainer_devices: 'auto'
pl_trainer_precision: '16-mixed'
105 changes: 0 additions & 105 deletions configs/templates/config_varianceRectifiedFlow.yaml

This file was deleted.

15 changes: 10 additions & 5 deletions configs/variance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,17 @@ lambda_dur_loss: 1.0
lambda_pitch_loss: 1.0
lambda_var_loss: 1.0

diffusion_type: reflow # ddpm
time_scale_factor: 1000
schedule_type: 'linear'
K_step: 1000
timesteps: 1000
max_beta: 0.02
diff_decoder_type: 'wavenet'
diff_loss_type: l2
backbone_type: 'wavenet'
main_loss_type: l2
main_loss_log_norm: true
sampling_algorithm: euler
sampling_steps: 20
diff_accelerator: ddim
diff_speedup: 10

Expand All @@ -111,16 +116,16 @@ num_sanity_val_steps: 1
optimizer_args:
lr: 0.0006
lr_scheduler_args:
step_size: 12000
step_size: 10000
gamma: 0.75
max_batch_frames: 80000
max_batch_size: 48
dataset_size_key: 'lengths'
val_check_interval: 2000
num_valid_plots: 10
max_updates: 288000
max_updates: 160000
num_ckpt_keep: 5
permanent_ckpt_start: 180000
permanent_ckpt_start: 80000
permanent_ckpt_interval: 10000

finetune_enabled: false
Expand Down
Loading

0 comments on commit dc6896b

Please sign in to comment.