-
Notifications
You must be signed in to change notification settings - Fork 861
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from lmzjms/main
update text_to_audio
- Loading branch information
Showing
119 changed files
with
1,062 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
text_to_audio/Make_An_Audio/configs/img_to_audio/img2audio_args.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
model: | ||
base_learning_rate: 1.0e-05 | ||
target: ldm.models.diffusion.ddpm_audio.LatentDiffusion_audio | ||
params: | ||
linear_start: 0.00085 | ||
linear_end: 0.0120 | ||
num_timesteps_cond: 1 | ||
log_every_t: 200 | ||
timesteps: 1000 | ||
first_stage_key: image | ||
cond_stage_key: caption | ||
image_size: 32 # unused | ||
mel_dim: 10 # 80 // 2^3 | ||
mel_length: 78 # 624 // 2^3 | ||
channels: 4 | ||
cond_stage_trainable: false | ||
conditioning_key: crossattn | ||
monitor: val/loss_simple_ema | ||
scale_by_std: True | ||
use_ema: False | ||
|
||
scheduler_config: # 10000 warmup steps | ||
target: ldm.lr_scheduler.LambdaLinearScheduler | ||
params: | ||
warm_up_steps: [10000] | ||
cycle_lengths: [10000000000000] | ||
f_start: [1.e-6] | ||
f_max: [1.] | ||
f_min: [ 1.] | ||
|
||
unet_config: | ||
target: ldm.modules.diffusionmodules.custom_openaimodel.UNetModel | ||
params: | ||
image_size: 32 # ununsed | ||
in_channels: 4 | ||
out_channels: 4 | ||
model_channels: 256 | ||
attention_resolutions: | ||
- 1 | ||
- 2 | ||
num_res_blocks: 2 | ||
channel_mult: # num_down = len(ch_mult)-1 | ||
- 1 | ||
- 2 | ||
num_head_channels: 32 | ||
use_spatial_transformer: true | ||
transformer_depth: 1 | ||
context_dim: 1024 | ||
use_context_project: false | ||
|
||
|
||
first_stage_config: | ||
target: ldm.models.autoencoder.AutoencoderKL | ||
params: | ||
embed_dim: 4 | ||
monitor: val/rec_loss | ||
ddconfig: | ||
double_z: true | ||
z_channels: 4 | ||
resolution: 848 | ||
in_channels: 1 | ||
out_ch: 1 | ||
ch: 128 | ||
ch_mult: [ 1, 2, 2, 4 ] # num_down = len(ch_mult)-1 | ||
num_res_blocks: 2 | ||
attn_resolutions: [106, 212] | ||
dropout: 0.0 | ||
lossconfig: | ||
target: torch.nn.Identity | ||
|
||
cond_stage_config: | ||
target: ldm.modules.encoders.modules.FrozenGlobalNormOpenCLIPEmbedder | ||
params: | ||
freeze: True | ||
delvisual: False | ||
|
||
|
68 changes: 68 additions & 0 deletions
68
text_to_audio/Make_An_Audio/configs/inpaint/txt2audio_args.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
model: | ||
base_learning_rate: 1.0e-05 | ||
target: ldm.models.diffusion.ddpm_audio.LatentDiffusion_audio | ||
params: | ||
linear_start: 0.0015 | ||
linear_end: 0.0205 | ||
log_every_t: 100 | ||
timesteps: 1000 | ||
loss_type: l1 | ||
first_stage_key: image | ||
cond_stage_key: masked_image | ||
image_size: 32 # unused | ||
mel_dim: 10 # 80 // 2^3 | ||
mel_length: 106 # 848 // 2^3 | ||
channels: 4 | ||
concat_mode: true | ||
monitor: val/loss | ||
use_ema: False | ||
|
||
scheduler_config: | ||
target: ldm.lr_scheduler.LambdaWarmUpCosineScheduler | ||
params: | ||
verbosity_interval: 0 | ||
warm_up_steps: 1000 | ||
max_decay_steps: 50000 | ||
lr_start: 0.001 | ||
lr_max: 0.1 | ||
lr_min: 0.0001 | ||
|
||
unet_config: | ||
target: ldm.modules.diffusionmodules.openaimodel.UNetModel | ||
params: | ||
image_size: 32 # ununsed | ||
in_channels: 9 # 4 + 1 + 4 | ||
out_channels: 4 | ||
model_channels: 320 | ||
attention_resolutions: | ||
- 1 | ||
- 2 | ||
num_res_blocks: 2 | ||
channel_mult: # num_down = len(ch_mult)-1 | ||
- 1 | ||
- 2 | ||
num_heads: 8 | ||
resblock_updown: true | ||
|
||
first_stage_config: | ||
target: ldm.models.autoencoder.AutoencoderKL | ||
params: | ||
embed_dim: 4 | ||
monitor: val/rec_loss | ||
ckpt_path: # /apdcephfs/share_1316500/nlphuang/results/Text_to_audio/ae15/2022-12-15T22-24-00_mixdata_kl_4_tile/epoch=000009-v2.ckpt | ||
ddconfig: | ||
double_z: true | ||
z_channels: 4 | ||
resolution: 848 | ||
in_channels: 1 | ||
out_ch: 1 | ||
ch: 128 | ||
ch_mult: [ 1, 2, 2, 4 ] # num_down = len(ch_mult)-1 | ||
num_res_blocks: 2 | ||
attn_resolutions: [106, 212] | ||
dropout: 0.0 | ||
lossconfig: | ||
target: torch.nn.Identity | ||
|
||
cond_stage_config: __is_first_stage__ | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
audio-chatgpt.py