kmraven commited on
Commit
bbd663d
·
verified ·
1 Parent(s): 84601dc

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,3 +1,92 @@
1
  ---
2
- license: cc-by-sa-4.0
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: other
3
+ library_name: pytorch
4
+ tags:
5
+ - audio-generation
6
+ - music-generation
7
+ - dance-to-music
8
+ - motion-conditioned-generation
9
+ - controlnet
10
+ - audioldm
11
+ - pytorch-lightning
12
+ - arxiv:2607.10537
13
  ---
14
+
15
+ # AudioLDM-ControlNet
16
+
17
+ Official model checkpoint for the paper:
18
+
19
+ **Dance to Music Generation leveraging Pre-training with Unpaired data and Contrastive Alignment**
20
+
21
+ - Paper: https://huggingface.co/papers/2607.10537
22
+ - arXiv: https://arxiv.org/abs/2607.10537
23
+ - Source code: https://github.com/kmraven/AudioLDM-ControlNet
24
+
25
+ ## Model Description
26
+
27
+ AudioLDM-ControlNet is a dance-conditioned music generation model. It combines:
28
+
29
+ 1. pretrained motion and music encoders,
30
+ 2. beat-guided contrastive pretraining for cross-modal alignment, and
31
+ 3. a ControlNet-style conditioning module built on an AudioLDM backbone.
32
+
33
+ The released checkpoint corresponds to the **full model** reported in the paper.
34
+
35
+ ## Repository Contents
36
+
37
+ The following files are stored in the root of this model repository:
38
+
39
+ | File | Description |
40
+ | --- | --- |
41
+ | `checkpoint-global_step=299999.ckpt` | Full AudioLDM-ControlNet model checkpoint at training step 299999 |
42
+ | `audioldm_original_medium_stretch_pretrained.yaml` | Model and preprocessing configuration corresponding to the checkpoint |
43
+
44
+ ## Checkpoint Details
45
+
46
+ - Framework: PyTorch / PyTorch Lightning
47
+ - Checkpoint format: `.ckpt`
48
+ - Paper variant: Full model
49
+ - Training step: 299999
50
+ - Audio sampling rate: 16 kHz
51
+ - Motion input frame rate: 60 FPS
52
+ - Motion sequence length used by the paper configuration: 128 frames
53
+
54
+ The checkpoint contains a PyTorch Lightning-compatible `state_dict`.
55
+
56
+ ## Input Representation
57
+
58
+ The model is conditioned on human pose sequences represented as NumPy arrays with the following shape:
59
+
60
+ ```text
61
+ [frames, 17, 3]
62
+ ```
63
+
64
+ The 17 joints follow COCO joint order. The final dimension contains the per-joint coordinates expected by the official preprocessing and evaluation code.
65
+
66
+ ## Training Procedure
67
+
68
+ Training is performed in two stages:
69
+
70
+ 1. MotionBERT and MERT features are aligned using beat-guided contrastive pretraining based on BeatDance.
71
+ 2. The pretrained dance encoder conditions an AudioLDM backbone through a ControlNet adapter.
72
+
73
+ The implementation, preprocessing code, training scripts, and evaluation scripts are available in the official GitHub repository.
74
+
75
+ ## Citation
76
+
77
+ ```bibtex
78
+ @article{kimura2026dance,
79
+ title={Dance to Music Generation leveraging Pre-training with Unpaired Data and Contrastive Alignment},
80
+ author={Kimura, Ryota and Park, Sangheon and Polouliakh, Natalia and Akama, Taketo},
81
+ journal={arXiv preprint arXiv:2607.10537},
82
+ year={2026}
83
+ }
84
+ ```
85
+
86
+ ## Acknowledgements
87
+
88
+ This project builds on AudioLDM, ControlNet, MotionBERT, MERT, and BeatDance. Please cite the corresponding projects in addition to this work when using the model.
89
+
90
+ ## License
91
+
92
+ The source code repository is distributed under the MIT License. The model checkpoint may also be subject to the licenses and terms of the upstream pretrained models and datasets. Review the applicable upstream licenses before redistribution or commercial use.
audioldm_original_medium_stretch_pretrained.yaml ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ metadata_root: "./data/dataset/metadata/dataset_root.json"
2
+ log_directory: "./log/latent_diffusion_controlnet_beatdance"
3
+ project: "audioldm_controlnet"
4
+ precision: "high"
5
+
6
+ variables:
7
+ sampling_rate: &sampling_rate 16000
8
+ mel_bins: &mel_bins 64
9
+ latent_embed_dim: &latent_embed_dim 8 # TODO might need to change
10
+ latent_t_size: &latent_t_size 128 # TODO might need to change
11
+ latent_f_size: &latent_f_size 16
12
+ in_channels: &unet_in_channels 8 # The input channel of the UNet model
13
+ model_channels: &unet_model_channels 192
14
+ optimize_ddpm_parameter: &optimize_ddpm_parameter true
15
+ optimize_gpt: &optimize_gpt true
16
+ warmup_steps: &warmup_steps 2000
17
+ default_unet_params: &default_unet_params
18
+ image_size: 64
19
+ extra_film_condition_dim: 512 # If you use film as extra condition, set this parameter. For example if you have two conditioning vectors each have dimension 512, then this number would be 1024
20
+ # context_dim:
21
+ # - 768
22
+ in_channels: *unet_in_channels
23
+ out_channels: *latent_embed_dim
24
+ model_channels: *unet_model_channels
25
+ attention_resolutions:
26
+ - 8
27
+ - 4
28
+ - 2
29
+ num_res_blocks: 2
30
+ channel_mult:
31
+ - 1
32
+ - 2
33
+ - 3
34
+ - 5
35
+ num_head_channels: 32
36
+ use_spatial_transformer: true
37
+ transformer_depth: 1
38
+ extra_sa_layer: False
39
+
40
+ data:
41
+ train: ["aist"]
42
+ val: "aist"
43
+ test: "aist"
44
+ class_label_indices: ""
45
+ dataloader_add_ons: []
46
+
47
+ step:
48
+ validation_every_n_epochs: 10
49
+ save_checkpoint_every_n_steps: 10000
50
+ # limit_val_batches: 2
51
+ max_steps: 1000000
52
+ save_top_k: 1
53
+
54
+ preprocessing:
55
+ audio:
56
+ sampling_rate: *sampling_rate
57
+ max_wav_value: 32768.0
58
+ duration: 5.12
59
+ stft:
60
+ filter_length: 1024
61
+ hop_length: 160
62
+ win_length: 1024
63
+ mel:
64
+ n_mel_channels: *mel_bins
65
+ mel_fmin: 0
66
+ mel_fmax: 8000
67
+ # added for dance-controlnet
68
+ strech_augmentation:
69
+ additional_strech_rate: 0.2
70
+ stretch_prob: 0.7
71
+ motion:
72
+ target_length: *latent_t_size
73
+ camera_height: 1080
74
+ camera_width: 1920
75
+ scale_range_train: [1, 3]
76
+ scale_range_test: [2, 2]
77
+ fps_keypoints: 60
78
+ beat_dim: 2
79
+
80
+ augmentation:
81
+ mixup: 0.0
82
+
83
+ model:
84
+ target: audioldm_train.modules.latent_diffusion.controlnet.ControlLDM
85
+ params:
86
+ # Autoencoder
87
+ first_stage_config:
88
+ base_learning_rate: 8.0e-06
89
+ target: audioldm_train.modules.latent_encoder.autoencoder.AutoencoderKL
90
+ params:
91
+ reload_from_ckpt: "data/checkpoints/vae_mel_16k_64bins.ckpt"
92
+ sampling_rate: *sampling_rate
93
+ batchsize: 8
94
+ monitor: val/rec_loss
95
+ image_key: fbank
96
+ subband: 1
97
+ embed_dim: *latent_embed_dim
98
+ time_shuffle: 1
99
+ lossconfig:
100
+ target: audioldm_train.losses.LPIPSWithDiscriminator
101
+ params:
102
+ disc_start: 50001
103
+ kl_weight: 1000.0
104
+ disc_weight: 0.5
105
+ disc_in_channels: 1
106
+ ddconfig:
107
+ double_z: true
108
+ mel_bins: *mel_bins # The frequency bins of mel spectrogram
109
+ z_channels: 8
110
+ resolution: 256
111
+ downsample_time: false
112
+ in_channels: 1
113
+ out_ch: 1
114
+ ch: 128
115
+ ch_mult:
116
+ - 1
117
+ - 2
118
+ - 4
119
+ num_res_blocks: 2
120
+ attn_resolutions: []
121
+ dropout: 0.0
122
+ # Other parameters
123
+ base_learning_rate: 1.0e-4
124
+ warmup_steps: *warmup_steps
125
+ optimize_ddpm_parameter: *optimize_ddpm_parameter
126
+ sampling_rate: *sampling_rate
127
+ batchsize: 8
128
+ linear_start: 0.0015
129
+ linear_end: 0.0195
130
+ num_timesteps_cond: 1
131
+ log_every_t: 200
132
+ timesteps: 1000
133
+ unconditional_prob_cfg: 0.1
134
+ parameterization: eps # [eps, x0, v]
135
+ first_stage_key: fbank
136
+ latent_t_size: *latent_t_size # TODO might need to change
137
+ latent_f_size: *latent_f_size
138
+ channels: *latent_embed_dim # TODO might need to change
139
+ monitor: val/loss_simple_ema
140
+ scale_by_std: true
141
+ unet_config:
142
+ target: audioldm_train.modules.latent_diffusion.controlnet.ControlledUnetModel
143
+ params:
144
+ <<: *default_unet_params
145
+ cond_stage_config:
146
+ film_clap_cond1:
147
+ cond_stage_key: text
148
+ conditioning_key: film
149
+ target: audioldm_train.conditional_models.CLAPAudioEmbeddingClassifierFreev2
150
+ params:
151
+ pretrained_path: data/checkpoints/clap_music_speech_audioset_epoch_15_esc_89.98.pt
152
+ sampling_rate: 16000
153
+ embed_mode: text # or text
154
+ amodel: HTSAT-base
155
+ # added for ControlNet
156
+ controlnet_stage_config:
157
+ dance_controlnet:
158
+ controlnet_stage_key: motion
159
+ target: audioldm_train.modules.latent_diffusion.dance_controlnet.DanceControlNetWrapper
160
+ params:
161
+ feature_encoder_config:
162
+ target: audioldm_train.modules.motion_encoder.encoder.BeatDanceEncoderWrapper
163
+ params:
164
+ motion_bert_config:
165
+ target: audioldm_train.modules.motion_encoder.MotionBERT.DSTformer.DSTformerWrapper
166
+ params:
167
+ dim_in: 3
168
+ dim_out: 3
169
+ dim_feat: 512 # default value: intermediate representation
170
+ dim_rep: &dim_rep 512 # default value
171
+ depth: 5 # default value
172
+ num_heads: 8 # default value
173
+ mlp_ratio: 2 # default value
174
+ maxlen: 243 # default value
175
+ num_joints: &num_joints 17
176
+ motion_bert_pretrained_weights_path: data/checkpoints/latest_epoch.bin
177
+ feature_mapper_config:
178
+ target: audioldm_train.modules.motion_encoder.encoder.MotionBERT2BeatDance2AudioLDMEncoder
179
+ params:
180
+ kpt_num_joints: *num_joints
181
+ kpt_feat_dim: *dim_rep
182
+ audio_channels: *unet_model_channels
183
+ audio_freq: *latent_f_size
184
+ beatdance_output_dim: &beatdance_output_dim 256
185
+ beatdance_config:
186
+ target: BeatDance.model.clip_transformer.DanceOnlyBeatDanceWrapper
187
+ params:
188
+ beatdance_config_path: audioldm_train/config/2025_11_23_dance_controlnet_beatdance/aist_seg10_L10.json
189
+ kpt_num_joints: *num_joints
190
+ kpt_feat_dim: *dim_rep
191
+ beat_dim: 2
192
+ beatdance_output_dim: *beatdance_output_dim
193
+ num_frames: *latent_t_size
194
+ beatdance_pretrained_weights_path: data/checkpoints/model_best.pth
195
+ freeze_beatdance: false
196
+ controlnet_model_config:
197
+ target: audioldm_train.modules.latent_diffusion.controlnet.ControlNet
198
+ params:
199
+ <<: *default_unet_params
200
+ evaluation_params:
201
+ unconditional_guidance_scale: 3.5
202
+ ddim_sampling_steps: 200
203
+ n_candidates_per_samples: 3
204
+ evaluator_config:
205
+ target: audioldm_train.metrics.eval.ControlNetEvaluationHelper
206
+ params:
207
+ sampling_rate: *sampling_rate
checkpoint-global_step=299999.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5673a101b25cc2d3e3b218574dcedf2a0fc9a8263e4d7363bab0001f7d28b239
3
+ size 8031577085