ZeyuLing commited on
Commit
4138c25
·
verified ·
1 Parent(s): 8a0297a

Publish hftrainer artifact and model card

Browse files
Mean.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26e136555dab04c94a129d446c26e6b9939cbf045fbf77bcf5462c1fb5a2001c
3
+ size 1180
README.md ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: hftrainer
3
+ pipeline_tag: other
4
+ tags:
5
+ - motion-generation
6
+ - text-to-motion
7
+ - humanml3d
8
+ - motionlab
9
+ - motion-editing
10
+ license: other
11
+ ---
12
+
13
+ <!-- This model card is synchronized from docs/model_zoo/motionlab.md by tools/sync_model_zoo_cards.py. -->
14
+
15
+ # MotionLab - Unified Human Motion Generation and Editing
16
+
17
+ Text-to-motion baseline integrated into the hftrainer Model Zoo. The runtime is
18
+ self-contained under `hftrainer.models.motion.motionlab.network` and does not
19
+ import the original repository at inference time.
20
+
21
+ | | |
22
+ |---|---|
23
+ | **Task** | Text-to-Motion (T2M), motion generation / editing research stack |
24
+ | **Bundle / Pipeline** | `MotionLabBundle` / `MotionLabPipeline` |
25
+ | **Processed HF artifact** | [`ZeyuLing/hftrainer-motionlab-humanml3d`](https://huggingface.co/ZeyuLing/hftrainer-motionlab-humanml3d) |
26
+ | **Motion representation** | **HumanML3D-263** (263-dim, 20 fps, 22 joints) |
27
+ | **Architecture** | RFMotion / MotionFlow Transformer with CLIP text conditioning |
28
+ | **Paper** | *MotionLab: Unified Human Motion Generation and Editing via the Motion-Condition-Motion Paradigm*, Guo et al., ICCV 2025 - [arXiv:2502.02358](https://arxiv.org/abs/2502.02358) |
29
+ | **Original code** | https://github.com/Diouo/MotionLab |
30
+
31
+ ---
32
+
33
+ ## Weights
34
+
35
+ Self-contained hftrainer artifact:
36
+
37
+ | Artifact | Location | Contents | Status |
38
+ |---|---|---|---|
39
+ | MotionLab HumanML3D | [`ZeyuLing/hftrainer-motionlab-humanml3d`](https://huggingface.co/ZeyuLing/hftrainer-motionlab-humanml3d) | `motionflow.ckpt` + `configs/` + `Mean.npy` / `Std.npy` + `mean_motion.npy` / `std_motion.npy` + `model_index.json` | public Hub artifact |
40
+ | local mirror | `checkpoints/baselines/motionlab` | same layout | optional local cache |
41
+
42
+ Use directly from the Hub:
43
+
44
+ ```python
45
+ from hftrainer.pipelines.motionlab import MotionLabPipeline
46
+
47
+ pipe = MotionLabPipeline.from_pretrained(
48
+ "ZeyuLing/hftrainer-motionlab-humanml3d",
49
+ device="cuda",
50
+ )
51
+ motions = pipe.infer_t2m(
52
+ ["a person walks forward then sits down"],
53
+ [120],
54
+ ) # list of (T, 263)
55
+ ```
56
+
57
+ For a local mirror:
58
+
59
+ ```python
60
+ pipe = MotionLabPipeline.from_pretrained("checkpoints/baselines/motionlab", device="cuda")
61
+ ```
62
+
63
+ ## Motion Representation
64
+
65
+ MotionLab natively generates **HumanML3D-263** at 20 fps. For shared SMPL and
66
+ MotionStreamer-272 evaluation, use the validated bridge:
67
+
68
+ ```text
69
+ HumanML3D-263 -> SMPL motion_135 via IK refine-80 -> MotionStreamer-272
70
+ ```
71
+
72
+ The artifact contains both the HumanML3D denormalization statistics and
73
+ MotionLab's internal motion statistics so the published pipeline does not depend
74
+ on a separate dataset checkout.
75
+
76
+ ## HumanML3D Leaderboard Metrics
77
+
78
+ The row below uses the shared HumanML3D official-test caption protocol and the
79
+ HML263 round-trip GT reference for SMPL-based evaluators.
80
+
81
+ | Evaluator | R1 up | R2 up | R3 up | FID down | MM down | Div up |
82
+ |---|---:|---:|---:|---:|---:|---:|
83
+ | MotionStreamer-272 | 0.6367 | 0.7882 | 0.8529 | 25.4469 | 17.9756 | 25.5355 |
84
+ | MotionCLIP-135 no-L2 | 0.4807 | 0.6457 | 0.7353 | 102.7770 | 41.5472 | 23.0179 |
85
+
86
+ Physical metrics:
87
+
88
+ | Slide down | Float down | Jitter down | Dynamic down |
89
+ |---:|---:|---:|---:|
90
+ | 2.4231 | 4.0795 | 5.8493 | 24.3519 |
91
+
92
+ ## Implementation Notes
93
+
94
+ - Artifact inference imports only `hftrainer.models.motion.motionlab.network`.
95
+ - Config targets are rewritten from the original `rfmotion.*` namespace into the
96
+ vendored hftrainer namespace before model construction.
97
+ - The default inference stage is `demo`, matching the validated qualitative
98
+ HumanML3D T2M setting.
Std.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6565a65ed9b31e23c328829a309e1c482be8b85fd23b43d65451a9b19a917f40
3
+ size 1180
configs/assets.yaml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FOLDER: './experiments'
2
+
3
+ TEST:
4
+ FOLDER: './results'
5
+
6
+ DATASET:
7
+ SMPL_PATH: './checkpoints/smpl/'
8
+ SMPLH_PATH: './checkpoints/smplh/'
9
+ WORD_VERTILIZER_PATH: './checkpoints/glove/'
10
+ HUMANML3D:
11
+ ROOT: './datasets/humanml3d/'
12
+ SPLIT_ROOT: './datasets/humanml3d/'
13
+ 100STYLE:
14
+ ROOT: './datasets/100style/'
15
+ SPLIT_ROOT: './datasets/100style/'
16
+ HUMANML3D_100STYLE:
17
+ ROOT: './datasets/humanml3d_100style/'
18
+ SPLIT_ROOT: './datasets/humanml3d_100style/'
19
+ ALL:
20
+ ROOT: './datasets/all/'
21
+ SPLIT_ROOT: './datasets/all/'
22
+ MOTIONFIX_RETARGET:
23
+ ROOT: './datasets/motionfix_retarget/'
24
+ SPLIT_ROOT: './datasets/motionfix_retarget/'
25
+ MOTIONFIX:
26
+ ROOT: './datasets/motionfix/'
27
+ preproc:
28
+ stats_file: './datasets/motionfix/statistics_motionfix_feat3.npy'
29
+ split_seed: 0
30
+ calculate_minmax: True
31
+ generate_joint_files: True
32
+ use_cuda: True
33
+ n_body_joints: 22
34
+ norm_type: std # norm or std
35
+ load_feats:
36
+ - "body_transl"
37
+ - "body_orient"
38
+ - "body_pose"
39
+ # - "body_transl_delta_pelv"
40
+ # - "body_orient_xy"
41
+ # - "z_orient_delta"
42
+ # - "body_pose"
43
+ # - "body_joints_local_wo_z_rot"
44
+
45
+ model:
46
+ clip_path: './checkpoints/clip-vit-large-patch14'
47
+ t5_path: './checkpoints/flan-t5-large'
48
+ t2m_path: './checkpoints/t2m/'
49
+ TMR_path: './checkpoints/TMR/'
50
+ style_encoder_path: './checkpoints/smoodi/style_encoder.pt'
configs/base.yaml ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FOLDER: ./experiments
2
+ SEED_VALUE: 42
3
+ DEBUG: True
4
+ TRAIN:
5
+ SPLIT: 'train'
6
+ NUM_WORKERS: 2 # Number of workers
7
+ BATCH_SIZE: 4 # Size of batches
8
+ START_EPOCH: 0 # Start epoch
9
+ END_EPOCH: 2000 # End epoch
10
+ RESUME: '' # Experiment path to be resumed training
11
+ PRETRAINED_VAE: ''
12
+ PRETRAINED: '' # Pretrained model path
13
+
14
+ OPTIM:
15
+ OPTIM.TYPE: 'AdamW' # Optimizer type
16
+ OPTIM.LR: 1e-4 # Learning rate
17
+
18
+ ABLATION:
19
+ VAE_TYPE: 'actor' # vae ablation: actor or mcross
20
+ VAE_ARCH: 'encoder_decoder' # mdiffusion vae architecture
21
+ PE_TYPE: 'actor' # mdiffusion mld or actor
22
+ DIFF_PE_TYPE: 'actor' # mdiffusion mld or actor
23
+ SKIP_CONNECT: False # skip connection for denoiser va
24
+ # use linear to expand mean and std rather expand token nums
25
+ MLP_DIST: False
26
+ IS_DIST: False # Mcross distribution kl
27
+ PREDICT_EPSILON: True # noise or motion
28
+
29
+ EVAL:
30
+ SPLIT: 'gtest'
31
+ BATCH_SIZE: 1 # Evaluating Batch size
32
+ NUM_WORKERS: 12 # Evaluating Batch size
33
+
34
+ TEST:
35
+ TEST_DIR: ''
36
+ CHECKPOINTS: '' # Pretrained model path
37
+ SPLIT: 'gtest'
38
+ BATCH_SIZE: 1 # Testing Batch size
39
+ NUM_WORKERS: 12 # Evaluating Batch size
40
+ SAVE_PREDICTIONS: False # Weather to save predictions
41
+ COUNT_TIME: False # Weather to count time during test
42
+ REPLICATION_TIMES: 5 # Number of times to replicate the test
43
+ MM_NUM_SAMPLES: 100 # Number of samples for multimodal test
44
+ MM_NUM_REPEATS: 30 # Number of repeats for multimodal test
45
+ MM_NUM_TIMES: 10 # Number of times to repeat the multimodal test
46
+ DIVERSITY_TIMES: 300 # Number of times to repeat the diversity test
47
+ REP_I: 0
48
+ model:
49
+ target: 'modules'
50
+ t2m_textencoder:
51
+ dim_word: 300
52
+ dim_pos_ohot: 15
53
+ dim_text_hidden: 512
54
+ dim_coemb_hidden: 512
55
+
56
+ t2m_motionencoder:
57
+ dim_move_hidden: 512
58
+ dim_move_latent: 512
59
+ dim_motion_hidden: 1024
60
+ dim_motion_latent: 512
61
+ LOSS:
62
+ LAMBDA_LATENT: 1e-5 # Lambda for latent losses
63
+ LAMBDA_KL: 1e-5 # Lambda for kl losses
64
+ LAMBDA_REC: 1.0 # Lambda for reconstruction losses
65
+ LAMBDA_JOINT: 1.0 # Lambda for joint losses
66
+ LAMBDA_GEN: 1.0 # Lambda for text-motion generation losses
67
+ LAMBDA_CROSS: 1.0 # Lambda for cross-reconstruction losses
68
+ LAMBDA_CYCLE: 1.0 # Lambda for cycle losses
69
+ LAMBDA_PRIOR: 0.0
70
+ DIST_SYNC_ON_STEP: True
71
+ METRIC:
72
+ FORCE_IN_METER: True
73
+ DIST_SYNC_ON_STEP: True
74
+ DATASET:
75
+ NCLASSES: 10
76
+ SAMPLER:
77
+ MAX_SQE: -1
78
+ MAX_LEN: 196
79
+ MIN_LEN: 40
80
+ MAX_TEXT_LEN: 20
81
+ KIT:
82
+ PICK_ONE_TEXT: true
83
+ FRAME_RATE: 12.5
84
+ UNIT_LEN: 4
85
+ HUMANML3D:
86
+ PICK_ONE_TEXT: true
87
+ FRAME_RATE: 20.0
88
+ UNIT_LEN: 4
89
+ MOTIONFIX_RETARGET:
90
+ PICK_ONE_TEXT: true
91
+ FRAME_RATE: 20.0
92
+ UNIT_LEN: 4
93
+ HUMANML3D_100STYLE:
94
+ PICK_ONE_TEXT: true
95
+ FRAME_RATE: 20.0
96
+ UNIT_LEN: 4
97
+ ALL:
98
+ PICK_ONE_TEXT: true
99
+ FRAME_RATE: 20.0
100
+ UNIT_LEN: 4
101
+ HUMANACT12:
102
+ NUM_FRAMES: 60
103
+ POSE_REP: rot6d
104
+ GLOB: true
105
+ TRANSLATION: true
106
+ UESTC:
107
+ NUM_FRAMES: 60
108
+ POSE_REP: rot6d
109
+ GLOB: true
110
+ TRANSLATION: true
111
+ LOGGER:
112
+ SACE_CHECKPOINT_EPOCH: 1
113
+ LOG_EVERY_STEPS: 1
114
+ VAL_EVERY_STEPS: 10
115
+ TENSORBOARD: true
116
+ WANDB:
117
+ OFFLINE: false
118
+ PROJECT: null
119
+ RESUME_ID: null
120
+ RENDER:
121
+ JOINT_TYPE: mmm
122
+ INPUT_MODE: npy
123
+ DIR: ''
124
+ NPY: ''
125
+ DENOISING: true
126
+ OLDRENDER: true
127
+ RES: high
128
+ DOWNSAMPLE: true
129
+ FPS: 12.5
130
+ CANONICALIZE: true
131
+ EXACT_FRAME: 0.5
132
+ NUM: 7
133
+ MODE: sequence
134
+ VID_EXT: mp4
135
+ ALWAYS_ON_FLOOR: false
136
+ GT: false
137
+ DEMO:
138
+ MOTION_TRANSFER: false
139
+ RENDER: false
140
+ FRAME_RATE: 12.5
141
+ EXAMPLE: null
configs/config_rfmotion.yaml ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ####################################
2
+ # The following are general settings
3
+ ####################################
4
+
5
+ # Experiment name, more details in Section 'Experiment Name Explanation'
6
+ NAME: baseline
7
+ # 1. use a tiny dataset for trianing and evaluation
8
+ # 2. validate more intensively
9
+ # 3. will not use `wandb logger`
10
+ DEBUG: False
11
+ # Devices. Optional: “cpu”, “gpu”
12
+ ACCELERATOR: 'gpu'
13
+ # Index of GPUs eg. [0] or [0,1,2,3]
14
+ DEVICE: [0]
15
+
16
+ #####################################
17
+ # The following are training settings
18
+ #####################################
19
+ TRAIN:
20
+ # Model stage. Optional: "vae", "diffusion"
21
+ STAGE: diffusion
22
+ # Training dataset name
23
+ DATASETS: ['all']
24
+ # Number of dataloader workers
25
+ NUM_WORKERS: 8
26
+ # Size of batches
27
+ BATCH_SIZE: 64
28
+ # Total epochs for training
29
+ END_EPOCH: 8000
30
+
31
+ RESUME: '' # Resume training from this path
32
+ PRETRAINED_VAE: '' # vae model path
33
+ OPTIM:
34
+ TYPE: AdamW # Optimizer type
35
+ LR: 1e-4 # Learning rate
36
+ # Ablation study configurations.
37
+ ABLATION:
38
+ VAE: False
39
+ VAE_PE_TYPE: "sine"
40
+ VAE_PE_DIM: "1D"
41
+ VAE_LATENT_NUMS: 8
42
+
43
+ RF_SEP: False
44
+ LN_Sampling: False
45
+ WARM_UP: False
46
+ HINT_GUIDANCE: False
47
+
48
+ #####################################
49
+ # The following are basic model settings
50
+ #####################################
51
+ model:
52
+ model_type: 'rfmotion'
53
+ condition_type: 'all'
54
+ token_dim: 512
55
+
56
+ # ## For All
57
+ text_guidance_scale: 5.75
58
+ hint_guidance_scale: 1.5
59
+ text_hint_guidance_scale: 1.75
60
+ inbetween_guidance_scale: 1.5
61
+ text_inbetween_guidance_scale: 1.75
62
+ source_text_guidance_scale_1: 2.25
63
+ source_text_guidance_scale_2: 2.25
64
+ source_hint_guidance_scale_1: 2.25
65
+ source_hint_guidance_scale_2: 2.25
66
+ source_text_hint_guidance_scale_1: 2
67
+ source_text_hint_guidance_scale_2: 2
68
+ style_guidance_scale: 1.5
69
+ drop_style_guidance_prob: 0.2
70
+ drop_content_guidance_prob: 0.2
71
+
72
+ #####################################
73
+ # The following are validation settings
74
+ #####################################
75
+ EVAL:
76
+ DATASETS: ['all'] # Evaluating datasets
77
+ BATCH_SIZE: 32 # Evaluating Batch size
78
+ SPLIT: test
79
+
80
+ #####################################
81
+ # The following are testing settings
82
+ #####################################
83
+ TEST:
84
+ CHECKPOINTS: "" # Pretrained model path
85
+ DATASETS: ['all']
86
+ SPLIT: test
87
+ BATCH_SIZE: 32
88
+ MEAN: False
89
+ NUM_SAMPLES: 1
90
+ FACT: 1
91
+
92
+ #####################################
93
+ # The following are demo settings
94
+ #####################################
95
+ DEMO:
96
+ TYPE: ""
97
+ CHECKPOINTS: "" # Pretrained model path
98
+ DATASETS: ['all']
99
+ SPLIT: test
100
+ BATCH_SIZE: 1
101
+ MEAN: False
102
+ NUM_SAMPLES: 1
103
+ FACT: 1
104
+ SAMPLE_NUMS: 10
105
+ REPLICATION: 1
106
+
107
+ #####################################
108
+ # The following are metric settings
109
+ #####################################
110
+ METRIC:
111
+ TYPE: ["MaskedMetrics", "TM2TMetrics", "SourceTextMetrics", "SourceHintMetrics", "SourceTextHintMetrics", "InbetweenMetrics", "TextInbetweenMetrics","TextHintMetrics", "HintMetrics", "StyleMetrics", ]
112
+
113
+ #####################################
114
+ # The following are training losses settings
115
+ #####################################
116
+ LOSS:
117
+ TYPE: mld # Losses type
118
+ LAMBDA_LATENT: 1.0e-5 # Lambda for latent Losses
119
+ LAMBDA_KL: 1.0e-4 # Lambda for kl Losses
120
+ LAMBDA_REC: 1.0 # Lambda for reconstruction Losses
121
+ LAMBDA_GEN: 1.0 # Lambda for text-motion generation losses
122
+ LAMBDA_CROSS: 1.0 # Lambda for reconstruction Losses
123
+ LAMBDA_CYCLE: 0.0 # Lambda for cycle Losses
124
+ LAMBDA_PRIOR: 0.0
125
+ DIST_SYNC_ON_STEP: False # Sync Losses on step when distributed trained
126
+
127
+ #####################################
128
+ # The following are loggers settings
129
+ #####################################
130
+ LOGGER:
131
+ SAVE_CHECKPOINT_EPOCH: 50
132
+ CHECK_VAL_EVERY_N_EPOCH: 25
133
+ TENSORBOARD: True
134
+ WANDB:
135
+ PROJECT: null
136
+ OFFLINE: False
137
+ RESUME_ID: null
configs/config_rfmotion_hint.yaml ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ####################################
2
+ # The following are general settings
3
+ ####################################
4
+
5
+ # Experiment name, more details in Section 'Experiment Name Explanation'
6
+ NAME: baseline_Hint
7
+ # 1. use a tiny dataset for trianing and evaluation
8
+ # 2. validate more intensively
9
+ # 3. will not use `wandb logger`
10
+ DEBUG: False
11
+ # Devices. Optional: “cpu”, “gpu”
12
+ ACCELERATOR: 'gpu'
13
+ # Index of GPUs eg. [0] or [0,1,2,3]
14
+ DEVICE: [0]
15
+
16
+ #####################################
17
+ # The following are training settings
18
+ #####################################
19
+ TRAIN:
20
+ # Model stage. Optional: "vae", "diffusion"
21
+ STAGE: diffusion
22
+ # Training dataset name
23
+ DATASETS: ['humanml3d'] # ['humanml3d'], ['motionfix'] ['motionfix_retarget'] ['100style'] ['humanml3d_100style'] ['all']
24
+ # Number of dataloader workers
25
+ NUM_WORKERS: 8
26
+ # Size of batches
27
+ BATCH_SIZE: 64
28
+ # Total epochs for training
29
+ END_EPOCH: 8000
30
+
31
+ RESUME: '' # Resume training from this path
32
+ PRETRAINED_VAE: '' # vae model path
33
+ OPTIM:
34
+ TYPE: AdamW # Optimizer type
35
+ LR: 1e-4 # Learning rate
36
+ # Ablation study configurations.
37
+ ABLATION:
38
+ VAE: False
39
+ VAE_PE_TYPE: "sine"
40
+ VAE_PE_DIM: "1D"
41
+ VAE_LATENT_NUMS: 8
42
+
43
+ RF_SEP: False
44
+ LN_Sampling: False
45
+ WARM_UP: False
46
+ HINT_GUIDANCE: False
47
+
48
+ #####################################
49
+ # The following are basic model settings
50
+ #####################################
51
+ model:
52
+ model_type: 'rfmotion_seperate'
53
+ condition_type: 'hint'
54
+ token_dim: 512
55
+
56
+ ## For Hint
57
+ text_hint_guidance_scale: 2
58
+ text_hint_guidance_prob: 0.7
59
+ text_guidance_prob: 0.1
60
+ hint_guidance_prob: 0.1
61
+ none_guidance_prob: 0.1
62
+
63
+ #####################################
64
+ # The following are validation settings
65
+ #####################################
66
+ EVAL:
67
+ DATASETS: ['humanml3d'] # Evaluating datasets
68
+ BATCH_SIZE: 32 # Evaluating Batch size
69
+ SPLIT: test
70
+
71
+ #####################################
72
+ # The following are testing settings
73
+ #####################################
74
+ TEST:
75
+ CHECKPOINTS: "" # Pretrained model path
76
+ DATASETS: ['humanml3d']
77
+ SPLIT: test
78
+ BATCH_SIZE: 32
79
+ MEAN: False
80
+ NUM_SAMPLES: 1
81
+ FACT: 1
82
+
83
+ #####################################
84
+ # The following are demo settings
85
+ #####################################
86
+ DEMO:
87
+ TYPE: "hint"
88
+ CHECKPOINTS: "" # Pretrained model path
89
+ DATASETS: ['humanml3d']
90
+ SPLIT: test
91
+ BATCH_SIZE: 1
92
+ MEAN: False
93
+ NUM_SAMPLES: 1
94
+ FACT: 1
95
+ SAMPLE_NUMS: 10
96
+ REPLICATION: 1
97
+
98
+ #####################################
99
+ # The following are metric settings
100
+ #####################################
101
+ METRIC:
102
+ TYPE: ["TextHintMetrics"]
103
+
104
+ #####################################
105
+ # The following are training losses settings
106
+ #####################################
107
+ LOSS:
108
+ TYPE: mld # Losses type
109
+ LAMBDA_LATENT: 1.0e-5 # Lambda for latent Losses
110
+ LAMBDA_KL: 1.0e-4 # Lambda for kl Losses
111
+ LAMBDA_REC: 1.0 # Lambda for reconstruction Losses
112
+ LAMBDA_GEN: 1.0 # Lambda for text-motion generation losses
113
+ LAMBDA_CROSS: 1.0 # Lambda for reconstruction Losses
114
+ LAMBDA_CYCLE: 0.0 # Lambda for cycle Losses
115
+ LAMBDA_PRIOR: 0.0
116
+ DIST_SYNC_ON_STEP: False # Sync Losses on step when distributed trained
117
+
118
+ #####################################
119
+ # The following are loggers settings
120
+ #####################################
121
+ LOGGER:
122
+ SAVE_CHECKPOINT_EPOCH: 50
123
+ CHECK_VAL_EVERY_N_EPOCH: 10
124
+ TENSORBOARD: True
125
+ WANDB:
126
+ PROJECT: null
127
+ OFFLINE: False
128
+ RESUME_ID: null
configs/config_rfmotion_inbetween.yaml ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ####################################
2
+ # The following are general settings
3
+ ####################################
4
+
5
+ # Experiment name, more details in Section 'Experiment Name Explanation'
6
+ NAME: baseline_Inbetween
7
+ # 1. use a tiny dataset for trianing and evaluation
8
+ # 2. validate more intensively
9
+ # 3. will not use `wandb logger`
10
+ DEBUG: False
11
+ # Devices. Optional: “cpu”, “gpu”
12
+ ACCELERATOR: 'gpu'
13
+ # Index of GPUs eg. [0] or [0,1,2,3]
14
+ DEVICE: [0]
15
+
16
+ #####################################
17
+ # The following are training settings
18
+ #####################################
19
+ TRAIN:
20
+ # Model stage. Optional: "vae", "diffusion"
21
+ STAGE: diffusion
22
+ # Training dataset name
23
+ DATASETS: ['humanml3d'] # ['humanml3d'], ['motionfix'] ['motionfix_retarget'] ['100style'] ['humanml3d_100style'] ['all']
24
+ # Number of dataloader workers
25
+ NUM_WORKERS: 8
26
+ # Size of batches
27
+ BATCH_SIZE: 64
28
+ # Total epochs for training
29
+ END_EPOCH: 8000
30
+
31
+ RESUME: '' # Resume training from this path
32
+ PRETRAINED_VAE: '' # vae model path
33
+ OPTIM:
34
+ TYPE: AdamW # Optimizer type
35
+ LR: 1e-4 # Learning rate
36
+ # Ablation study configurations.
37
+ ABLATION:
38
+ VAE: False
39
+ VAE_PE_TYPE: "sine"
40
+ VAE_PE_DIM: "1D"
41
+ VAE_LATENT_NUMS: 8
42
+
43
+ RF_SEP: False
44
+ LN_Sampling: False
45
+ WARM_UP: False
46
+ HINT_GUIDANCE: False
47
+
48
+ #####################################
49
+ # The following are basic model settings
50
+ #####################################
51
+ model:
52
+ model_type: 'rfmotion_seperate'
53
+ condition_type: 'inbetween'
54
+ token_dim: 512
55
+
56
+ ## For Inbetween
57
+ inbetween_guidance_scale: 1.5
58
+
59
+ #####################################
60
+ # The following are validation settings
61
+ #####################################
62
+ EVAL:
63
+ DATASETS: ['humanml3d'] # Evaluating datasets
64
+ BATCH_SIZE: 32 # Evaluating Batch size
65
+ SPLIT: test
66
+
67
+ #####################################
68
+ # The following are testing settings
69
+ #####################################
70
+ TEST:
71
+ CHECKPOINTS: "" # Pretrained model path
72
+ DATASETS: ['humanml3d']
73
+ SPLIT: test
74
+ BATCH_SIZE: 32
75
+ MEAN: False
76
+ NUM_SAMPLES: 1
77
+ FACT: 1
78
+
79
+ #####################################
80
+ # The following are demo settings
81
+ #####################################
82
+ DEMO:
83
+ TYPE: "inbetween"
84
+ CHECKPOINTS: "" # Pretrained model path
85
+ DATASETS: ['humanml3d']
86
+ SPLIT: test
87
+ BATCH_SIZE: 1
88
+ MEAN: False
89
+ NUM_SAMPLES: 1
90
+ FACT: 1
91
+ SAMPLE_NUMS: 10
92
+ REPLICATION: 1
93
+
94
+ #####################################
95
+ # The following are metric settings
96
+ #####################################
97
+ METRIC:
98
+ TYPE: ["TextInbetweenMetrics"] # UncondMetrics, ReconMetrics, TM2TMetrics, MMMetrics, SourceTextMetrics, SourceHintMetrics, InbetweenMetrics, HintMetrics, StyleMetrics
99
+
100
+ #####################################
101
+ # The following are training losses settings
102
+ #####################################
103
+ LOSS:
104
+ TYPE: mld # Losses type
105
+ LAMBDA_LATENT: 1.0e-5 # Lambda for latent Losses
106
+ LAMBDA_KL: 1.0e-4 # Lambda for kl Losses
107
+ LAMBDA_REC: 1.0 # Lambda for reconstruction Losses
108
+ LAMBDA_GEN: 1.0 # Lambda for text-motion generation losses
109
+ LAMBDA_CROSS: 1.0 # Lambda for reconstruction Losses
110
+ LAMBDA_CYCLE: 0.0 # Lambda for cycle Losses
111
+ LAMBDA_PRIOR: 0.0
112
+ DIST_SYNC_ON_STEP: False # Sync Losses on step when distributed trained
113
+
114
+ #####################################
115
+ # The following are loggers settings
116
+ #####################################
117
+ LOGGER:
118
+ SAVE_CHECKPOINT_EPOCH: 50
119
+ CHECK_VAL_EVERY_N_EPOCH: 10
120
+ TENSORBOARD: True
121
+ WANDB:
122
+ PROJECT: null
123
+ OFFLINE: False
124
+ RESUME_ID: null
configs/config_rfmotion_sourcehint.yaml ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ####################################
2
+ # The following are general settings
3
+ ####################################
4
+
5
+ # Experiment name, more details in Section 'Experiment Name Explanation'
6
+ NAME: baseline_SourceHint
7
+ # 1. use a tiny dataset for trianing and evaluation
8
+ # 2. validate more intensively
9
+ # 3. will not use `wandb logger`
10
+ DEBUG: False
11
+ # Devices. Optional: “cpu”, “gpu”
12
+ ACCELERATOR: 'gpu'
13
+ # Index of GPUs eg. [0] or [0,1,2,3]
14
+ DEVICE: [0]
15
+
16
+ #####################################
17
+ # The following are training settings
18
+ #####################################
19
+ TRAIN:
20
+ # Model stage. Optional: "vae", "diffusion"
21
+ STAGE: diffusion
22
+ # Training dataset name
23
+ DATASETS: ['motionfix_retarget'] # ['humanml3d'], ['motionfix'] ['motionfix_retarget'] ['100style'] ['humanml3d_100style'] ['all']
24
+ # Number of dataloader workers
25
+ NUM_WORKERS: 8
26
+ # Size of batches
27
+ BATCH_SIZE: 64
28
+ # Total epochs for training
29
+ END_EPOCH: 8000
30
+
31
+ RESUME: '' # Resume training from this path
32
+ PRETRAINED_VAE: '' # vae model path
33
+ OPTIM:
34
+ TYPE: AdamW # Optimizer type
35
+ LR: 1e-4 # Learning rate
36
+ # Ablation study configurations.
37
+ ABLATION:
38
+ VAE: False
39
+ VAE_PE_TYPE: "sine"
40
+ VAE_PE_DIM: "1D"
41
+ VAE_LATENT_NUMS: 8
42
+
43
+ RF_SEP: False
44
+ LN_Sampling: False
45
+ WARM_UP: False
46
+ HINT_GUIDANCE: False
47
+
48
+ #####################################
49
+ # The following are basic model settings
50
+ #####################################
51
+ model:
52
+ model_type: 'rfmotion_seperate'
53
+ condition_type: 'source_hint'
54
+ token_dim: 512
55
+
56
+ ## For SourceHint
57
+ source_hint_guidance_scale_1: 2
58
+ source_hint_guidance_scale_2: 2
59
+ source_hint_guidance_prob: 0.7
60
+ hint_guidance_prob: 0.1
61
+ source_guidance_prob: 0.1
62
+ none_guidance_prob: 0.1
63
+
64
+ #####################################
65
+ # The following are validation settings
66
+ #####################################
67
+ EVAL:
68
+ DATASETS: ['motionfix_retarget'] # Evaluating datasets
69
+ BATCH_SIZE: 32 # Evaluating Batch size
70
+ SPLIT: test
71
+
72
+ #####################################
73
+ # The following are testing settings
74
+ #####################################
75
+ TEST:
76
+ CHECKPOINTS: "" # Pretrained model path
77
+ DATASETS: ['motionfix_retarget']
78
+ SPLIT: test
79
+ BATCH_SIZE: 32
80
+ MEAN: False
81
+ NUM_SAMPLES: 1
82
+ FACT: 1
83
+
84
+ #####################################
85
+ # The following are demo settings
86
+ #####################################
87
+ DEMO:
88
+ TYPE: "source_hint"
89
+ CHECKPOINTS: "" # Pretrained model path
90
+ DATASETS: ['motionfix_retarget']
91
+ SPLIT: test
92
+ BATCH_SIZE: 1
93
+ MEAN: False
94
+ NUM_SAMPLES: 1
95
+ FACT: 1
96
+ SAMPLE_NUMS: 10
97
+ REPLICATION: 1
98
+
99
+ #####################################
100
+ # The following are metric settings
101
+ #####################################
102
+ METRIC:
103
+ TYPE: ["SourceHintMetrics"]
104
+
105
+ #####################################
106
+ # The following are training losses settings
107
+ #####################################
108
+ LOSS:
109
+ TYPE: mld # Losses type
110
+ LAMBDA_LATENT: 1.0e-5 # Lambda for latent Losses
111
+ LAMBDA_KL: 1.0e-4 # Lambda for kl Losses
112
+ LAMBDA_REC: 1.0 # Lambda for reconstruction Losses
113
+ LAMBDA_GEN: 1.0 # Lambda for text-motion generation losses
114
+ LAMBDA_CROSS: 1.0 # Lambda for reconstruction Losses
115
+ LAMBDA_CYCLE: 0.0 # Lambda for cycle Losses
116
+ LAMBDA_PRIOR: 0.0
117
+ DIST_SYNC_ON_STEP: False # Sync Losses on step when distributed trained
118
+
119
+ #####################################
120
+ # The following are loggers settings
121
+ #####################################
122
+ LOGGER:
123
+ SAVE_CHECKPOINT_EPOCH: 50
124
+ CHECK_VAL_EVERY_N_EPOCH: 10
125
+ TENSORBOARD: True
126
+ WANDB:
127
+ PROJECT: null
128
+ OFFLINE: False
129
+ RESUME_ID: null
configs/config_rfmotion_sourcetext.yaml ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ####################################
2
+ # The following are general settings
3
+ ####################################
4
+
5
+ # Experiment name, more details in Section 'Experiment Name Explanation'
6
+ NAME: baseline_SourceText
7
+ # 1. use a tiny dataset for trianing and evaluation
8
+ # 2. validate more intensively
9
+ # 3. will not use `wandb logger`
10
+ DEBUG: False
11
+ # Devices. Optional: “cpu”, “gpu”
12
+ ACCELERATOR: 'gpu'
13
+ # Index of GPUs eg. [0] or [0,1,2,3]
14
+ DEVICE: [0]
15
+
16
+ #####################################
17
+ # The following are training settings
18
+ #####################################
19
+ TRAIN:
20
+ # Model stage. Optional: "vae", "diffusion"
21
+ STAGE: diffusion
22
+ # Training dataset name
23
+ DATASETS: ['motionfix_retarget'] # ['humanml3d'], ['motionfix'] ['motionfix_retarget'] ['100style'] ['humanml3d_100style'] ['all']
24
+ # Number of dataloader workers
25
+ NUM_WORKERS: 8
26
+ # Size of batches
27
+ BATCH_SIZE: 64
28
+ # Total epochs for training
29
+ END_EPOCH: 8000
30
+
31
+ RESUME: '' # Resume training from this path
32
+ PRETRAINED_VAE: '' # vae model path
33
+ OPTIM:
34
+ TYPE: AdamW # Optimizer type
35
+ LR: 1e-4 # Learning rate
36
+ # Ablation study configurations.
37
+ ABLATION:
38
+ VAE: False
39
+ VAE_PE_TYPE: "sine"
40
+ VAE_PE_DIM: "1D"
41
+ VAE_LATENT_NUMS: 8
42
+
43
+ RF_SEP: False
44
+ LN_Sampling: False
45
+ WARM_UP: False
46
+ HINT_GUIDANCE: False
47
+
48
+ #####################################
49
+ # The following are basic model settings
50
+ #####################################
51
+ model:
52
+ model_type: 'rfmotion_seperate'
53
+ condition_type: 'source_text'
54
+ token_dim: 512
55
+
56
+ ## For SourceText
57
+ source_text_guidance_scale_1: 2
58
+ source_text_guidance_scale_2: 2
59
+ source_text_guidance_prob: 0.8
60
+ source_guidance_prob: 0.1
61
+ none_guidance_prob: 0.1
62
+
63
+ #####################################
64
+ # The following are validation settings
65
+ #####################################
66
+ EVAL:
67
+ DATASETS: ['motionfix_retarget'] # Evaluating datasets
68
+ BATCH_SIZE: 32 # Evaluating Batch size
69
+ SPLIT: test
70
+
71
+ #####################################
72
+ # The following are testing settings
73
+ #####################################
74
+ TEST:
75
+ TYPE: "source_text"
76
+ CHECKPOINTS: "" # Pretrained model path
77
+ DATASETS: ['motionfix_retarget']
78
+ SPLIT: test
79
+ BATCH_SIZE: 32
80
+ MEAN: False
81
+ NUM_SAMPLES: 1
82
+ FACT: 1
83
+
84
+ #####################################
85
+ # The following are demo settings
86
+ #####################################
87
+ DEMO:
88
+ CHECKPOINTS: "" # Pretrained model path
89
+ DATASETS: ['motionfix_retarget']
90
+ SPLIT: test
91
+ BATCH_SIZE: 1
92
+ MEAN: False
93
+ NUM_SAMPLES: 1
94
+ FACT: 1
95
+ SAMPLE_NUMS: 10
96
+ REPLICATION: 1
97
+
98
+ #####################################
99
+ # The following are metric settings
100
+ #####################################
101
+ METRIC:
102
+ TYPE: ["SourceTextMetrics"]
103
+
104
+ #####################################
105
+ # The following are training losses settings
106
+ #####################################
107
+ LOSS:
108
+ TYPE: mld # Losses type
109
+ LAMBDA_LATENT: 1.0e-5 # Lambda for latent Losses
110
+ LAMBDA_KL: 1.0e-4 # Lambda for kl Losses
111
+ LAMBDA_REC: 1.0 # Lambda for reconstruction Losses
112
+ LAMBDA_GEN: 1.0 # Lambda for text-motion generation losses
113
+ LAMBDA_CROSS: 1.0 # Lambda for reconstruction Losses
114
+ LAMBDA_CYCLE: 0.0 # Lambda for cycle Losses
115
+ LAMBDA_PRIOR: 0.0
116
+ DIST_SYNC_ON_STEP: False # Sync Losses on step when distributed trained
117
+
118
+ #####################################
119
+ # The following are loggers settings
120
+ #####################################
121
+ LOGGER:
122
+ SAVE_CHECKPOINT_EPOCH: 50
123
+ CHECK_VAL_EVERY_N_EPOCH: 10
124
+ TENSORBOARD: True
125
+ WANDB:
126
+ PROJECT: null
127
+ OFFLINE: False
128
+ RESUME_ID: null
configs/config_rfmotion_style.yaml ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ####################################
2
+ # The following are general settings
3
+ ####################################
4
+
5
+ # Experiment name, more details in Section 'Experiment Name Explanation'
6
+ NAME: baseline_Style
7
+ # 1. use a tiny dataset for trianing and evaluation
8
+ # 2. validate more intensively
9
+ # 3. will not use `wandb logger`
10
+ DEBUG: False
11
+ # Devices. Optional: “cpu”, “gpu”
12
+ ACCELERATOR: 'gpu'
13
+ # Index of GPUs eg. [0] or [0,1,2,3]
14
+ DEVICE: [0]
15
+
16
+ #####################################
17
+ # The following are training settings
18
+ #####################################
19
+ TRAIN:
20
+ # Model stage. Optional: "vae", "diffusion"
21
+ STAGE: diffusion
22
+ # Training dataset name
23
+ DATASETS: ['humanml3d'] # ['humanml3d'], ['motionfix'] ['motionfix_retarget'] ['100style'] ['humanml3d_100style'] ['all']
24
+ # Number of dataloader workers
25
+ NUM_WORKERS: 8
26
+ # Size of batches
27
+ BATCH_SIZE: 64
28
+ # Total epochs for training
29
+ END_EPOCH: 8000
30
+
31
+ RESUME: '' # Resume training from this path
32
+ PRETRAINED_VAE: '' # vae model path
33
+ OPTIM:
34
+ TYPE: AdamW # Optimizer type
35
+ LR: 1e-4 # Learning rate
36
+ # Ablation study configurations.
37
+ ABLATION:
38
+ VAE: False
39
+ VAE_PE_TYPE: "sine"
40
+ VAE_PE_DIM: "1D"
41
+ VAE_LATENT_NUMS: 8
42
+
43
+ RF_SEP: False
44
+ LN_Sampling: False
45
+ WARM_UP: False
46
+ HINT_GUIDANCE: False
47
+
48
+ #####################################
49
+ # The following are basic model settings
50
+ #####################################
51
+ model:
52
+ model_type: 'rfmotion_seperate'
53
+ condition_type: 'style'
54
+ token_dim: 512
55
+
56
+ # ## For Style
57
+ style_guidance_scale: 2.5
58
+
59
+ all_guidance_prob: 0.6
60
+ drop_content_guidance_prob: 0.1
61
+ drop_hint_guidance_prob: 0.1
62
+ drop_style_guidance_prob: 0.1
63
+ none_guidance_prob: 0.1
64
+
65
+ #####################################
66
+ # The following are validation settings
67
+ #####################################
68
+ EVAL:
69
+ DATASETS: ['humanml3d'] # Evaluating datasets
70
+ BATCH_SIZE: 32 # Evaluating Batch size
71
+ SPLIT: test
72
+
73
+ #####################################
74
+ # The following are testing settings
75
+ #####################################
76
+ TEST:
77
+ CHECKPOINTS: "" # Pretrained model path
78
+ DATASETS: ['humanml3d']
79
+ SPLIT: test
80
+ BATCH_SIZE: 32
81
+ MEAN: False
82
+ NUM_SAMPLES: 1
83
+ FACT: 1
84
+
85
+ #####################################
86
+ # The following are demo settings
87
+ #####################################
88
+ DEMO:
89
+ TYPE: "style"
90
+ CHECKPOINTS: "" # Pretrained model path
91
+ DATASETS: ['humanml3d']
92
+ SPLIT: test
93
+ BATCH_SIZE: 1
94
+ MEAN: False
95
+ NUM_SAMPLES: 1
96
+ FACT: 1
97
+ SAMPLE_NUMS: 10
98
+ REPLICATION: 1
99
+
100
+ #####################################
101
+ # The following are metric settings
102
+ #####################################
103
+ METRIC:
104
+ TYPE: ["StyleMetrics"] # UncondMetrics, ReconMetrics, TM2TMetrics, MMMetrics, SourceTextMetrics, SourceHintMetrics, InbetweenMetrics, HintMetrics, StyleMetrics
105
+
106
+ #####################################
107
+ # The following are training losses settings
108
+ #####################################
109
+ LOSS:
110
+ TYPE: mld # Losses type
111
+ LAMBDA_LATENT: 1.0e-5 # Lambda for latent Losses
112
+ LAMBDA_KL: 1.0e-4 # Lambda for kl Losses
113
+ LAMBDA_REC: 1.0 # Lambda for reconstruction Losses
114
+ LAMBDA_GEN: 1.0 # Lambda for text-motion generation losses
115
+ LAMBDA_CROSS: 1.0 # Lambda for reconstruction Losses
116
+ LAMBDA_CYCLE: 0.0 # Lambda for cycle Losses
117
+ LAMBDA_PRIOR: 0.0
118
+ DIST_SYNC_ON_STEP: False # Sync Losses on step when distributed trained
119
+
120
+ #####################################
121
+ # The following are loggers settings
122
+ #####################################
123
+ LOGGER:
124
+ SAVE_CHECKPOINT_EPOCH: 50
125
+ CHECK_VAL_EVERY_N_EPOCH: 10
126
+ TENSORBOARD: True
127
+ WANDB:
128
+ PROJECT: null
129
+ OFFLINE: False
130
+ RESUME_ID: null
configs/config_rfmotion_text.yaml ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ####################################
2
+ # The following are general settings
3
+ ####################################
4
+
5
+ # Experiment name, more details in Section 'Experiment Name Explanation'
6
+ NAME: baseline_Text
7
+ # 1. use a tiny dataset for trianing and evaluation
8
+ # 2. validate more intensively
9
+ # 3. will not use `wandb logger`
10
+ DEBUG: False
11
+ # Devices. Optional: “cpu”, “gpu”
12
+ ACCELERATOR: 'gpu'
13
+ # Index of GPUs eg. [0] or [0,1,2,3]
14
+ DEVICE: [0]
15
+
16
+ #####################################
17
+ # The following are training settings
18
+ #####################################
19
+ TRAIN:
20
+ # Model stage. Optional: "vae", "diffusion"
21
+ STAGE: diffusion
22
+ # Training dataset name
23
+ DATASETS: ['humanml3d'] # ['humanml3d'], ['motionfix'] ['motionfix_retarget'] ['100style'] ['humanml3d_100style'] ['all']
24
+ # Number of dataloader workers
25
+ NUM_WORKERS: 8
26
+ # Size of batches
27
+ BATCH_SIZE: 64
28
+ # Total epochs for training
29
+ END_EPOCH: 8000
30
+
31
+ RESUME: '' # Resume training from this path
32
+ PRETRAINED_VAE: '' # vae model path
33
+ OPTIM:
34
+ TYPE: AdamW # Optimizer type
35
+ LR: 1e-4 # Learning rate
36
+ # Ablation study configurations.
37
+ ABLATION:
38
+ VAE: False
39
+ VAE_PE_TYPE: "sine"
40
+ VAE_PE_DIM: "1D"
41
+ VAE_LATENT_NUMS: 8
42
+
43
+ RF_SEP: False
44
+ LN_Sampling: False
45
+ WARM_UP: False
46
+ HINT_GUIDANCE: False
47
+
48
+ #####################################
49
+ # The following are basic model settings
50
+ #####################################
51
+ model:
52
+ model_type: 'rfmotion_seperate'
53
+ condition_type: 'text'
54
+ token_dim: 512
55
+
56
+ ## For Text
57
+ text_guidance_scale: 2.5
58
+ text_guidance_prob: 0.9
59
+ none_guidance_prob: 0.1
60
+
61
+ #####################################
62
+ # The following are validation settings
63
+ #####################################
64
+ EVAL:
65
+ DATASETS: ['humanml3d'] # Evaluating datasets
66
+ BATCH_SIZE: 32 # Evaluating Batch size
67
+ SPLIT: test
68
+
69
+ #####################################
70
+ # The following are testing settings
71
+ #####################################
72
+ TEST:
73
+ CHECKPOINTS: "" # Pretrained model path
74
+ DATASETS: ['humanml3d']
75
+ SPLIT: test
76
+ BATCH_SIZE: 32
77
+ MEAN: False
78
+ NUM_SAMPLES: 1
79
+ FACT: 1
80
+
81
+ #####################################
82
+ # The following are demo settings
83
+ #####################################
84
+ DEMO:
85
+ TYPE: "text"
86
+ CHECKPOINTS: "" # Pretrained model path
87
+ DATASETS: ['humanml3d']
88
+ SPLIT: test
89
+ BATCH_SIZE: 1
90
+ MEAN: False
91
+ NUM_SAMPLES: 1
92
+ FACT: 1
93
+ SAMPLE_NUMS: 10
94
+ REPLICATION: 1
95
+
96
+ #####################################
97
+ # The following are metric settings
98
+ #####################################
99
+ METRIC:
100
+ TYPE: ["TM2TMetrics"] # MMMetrics
101
+
102
+ #####################################
103
+ # The following are training losses settings
104
+ #####################################
105
+ LOSS:
106
+ TYPE: mld # Losses type
107
+ LAMBDA_LATENT: 1.0e-5 # Lambda for latent Losses
108
+ LAMBDA_KL: 1.0e-4 # Lambda for kl Losses
109
+ LAMBDA_REC: 1.0 # Lambda for reconstruction Losses
110
+ LAMBDA_GEN: 1.0 # Lambda for text-motion generation losses
111
+ LAMBDA_CROSS: 1.0 # Lambda for reconstruction Losses
112
+ LAMBDA_CYCLE: 0.0 # Lambda for cycle Losses
113
+ LAMBDA_PRIOR: 0.0
114
+ DIST_SYNC_ON_STEP: False # Sync Losses on step when distributed trained
115
+
116
+ #####################################
117
+ # The following are loggers settings
118
+ #####################################
119
+ LOGGER:
120
+ SAVE_CHECKPOINT_EPOCH: 50
121
+ CHECK_VAL_EVERY_N_EPOCH: 10
122
+ TENSORBOARD: True
123
+ WANDB:
124
+ PROJECT: null
125
+ OFFLINE: False
126
+ RESUME_ID: null
configs/config_vae.yaml ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ NAME: baseline_Feat4_Divide8-256_NativeROPE # Experiment name
2
+ DEBUG: False # Debug mode
3
+ ACCELERATOR: 'gpu' # Devices optioncal: “cpu”, “gpu”, “tpu”, “ipu”, “hpu”, “mps, “auto”
4
+ DEVICE: [0] # Index of gpus eg. [0] or [0,1,2,3]
5
+
6
+ # Training configuration
7
+ TRAIN:
8
+ #---------------------------------
9
+ STAGE: vae # stage "vae" or "diffusion", "vae_diffusion"
10
+ #---------------------------------
11
+ DATASETS: ['motionfix'] # Training datasets
12
+ NUM_WORKERS: 8 # Number of workers
13
+ BATCH_SIZE: 128 # 128 # Size of batches
14
+ START_EPOCH: 0 # Start epoch
15
+ END_EPOCH: 4000 # End epoch
16
+ RESUME: '' # Resume training from this path
17
+ PRETRAINED_VAE: ''
18
+ OPTIM:
19
+ TYPE: AdamW # Optimizer type
20
+ LR: 1e-4 # Learning rate
21
+
22
+ ABLATION:
23
+ VAE: True
24
+ VAE_PE_TYPE: "rope"
25
+ VAE_PE_DIM: "1D"
26
+
27
+ RF_PE_TYPE: "sine"
28
+ RF_PE_DIM: "1D"
29
+ RF_TIMEEMBED: "time" # "time_text"
30
+ RF_SEP: False
31
+ LN_Sampling: False
32
+ WARM_UP: False
33
+ HINT_GUIDANCE: False
34
+
35
+ # Model Configuration
36
+ model:
37
+ model_type: "vae"
38
+ latent_dim: [8, 256]
39
+
40
+ mixing_scale: 1
41
+ guidance_type: 'source_text'
42
+
43
+ ## For SourceText
44
+ text_guidance_scale: 2
45
+ text_guidance_prob: 0.85
46
+ source_guidance_scale: 2
47
+ source_guidance_prob: 0.075
48
+ none_guidance_prob: 0.075
49
+
50
+ all_guidance_scale: 1.0
51
+ all_guidance_prob: 0.7
52
+ hint_guidance_scale: 2
53
+ hint_guidance_prob: 0.1
54
+
55
+ # ## For SourceHint
56
+ # all_guidance_scale: 1.0
57
+ # all_guidance_prob: 0.7
58
+ # hint_guidance_scale: 2
59
+ # hint_guidance_prob: 0.1
60
+ # source_guidance_scale: 2
61
+ # source_guidance_prob: 0.1
62
+ # none_guidance_prob: 0.1
63
+
64
+ # text_guidance_scale: 2
65
+ # text_guidance_prob: 0.85
66
+
67
+ # Evaluating Configuration
68
+ EVAL:
69
+ DATASETS: ['motionfix'] # Evaluating datasets
70
+ BATCH_SIZE: 32 # 32 # Evaluating Batch size
71
+ SPLIT: test
72
+
73
+ # Test Configuration
74
+ TEST:
75
+ CHECKPOINTS: '' # Pretrained model path
76
+ DATASETS: ['motionfix'] # training datasets
77
+ SPLIT: test
78
+ BATCH_SIZE: 32 # 32 # training Batch size
79
+ MEAN: False
80
+ NUM_SAMPLES: 1
81
+ FACT: 1
82
+
83
+ # Metric Configuration
84
+ METRIC:
85
+ TYPE: ['MRMetrics','UncondMetrics'] # TYPE: ['MRMetrics','UncondMetrics'] # TYPE: ['MRMetrics']
86
+
87
+ # Losses Configuration
88
+ LOSS:
89
+ LAMBDA_LATENT: 1.0e-5 # Lambda for latent Losses
90
+ LAMBDA_KL: 1.0e-4 # Lambda for kl Losses
91
+ LAMBDA_REC: 1.0 # Lambda for reconstruction Losses
92
+ LAMBDA_GEN: 1.0 # Lambda for text-motion generation losses
93
+ LAMBDA_CROSS: 1.0 # Lambda for reconstruction Losses
94
+ LAMBDA_CYCLE: 0.0 # Lambda for cycle Losses
95
+ LAMBDA_PRIOR: 0.0
96
+ DIST_SYNC_ON_STEP: False # Sync Losses on step when distributed trained
97
+
98
+ # Logger configuration
99
+ LOGGER:
100
+ SAVE_CHECKPOINT_EPOCH: 50
101
+ CHECK_VAL_EVERY_N_EPOCH: 5
102
+ TENSORBOARD: True
configs/modules/content_encoder.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ content_encoder:
2
+ # Optional: mld_vae, vposert_vae
3
+ target: hftrainer.models.motion.motionlab.network.rfmotion.models.architectures.content_encoder.MldVae
4
+ params:
5
+ arch: 'encoder_decoder'
6
+ ff_size: 1024
7
+ num_layers: 9
8
+ num_heads: 4
9
+ dropout: 0.1
10
+ normalize_before: false
11
+ activation: 'gelu'
12
+ position_embedding: 'learned'
13
+ latent_dim: [7, 256]
14
+ nfeats: 263
15
+ ablation:
16
+ SKIP_CONNECT: True
17
+ PE_TYPE: mld
18
+ DIFF_PE_TYPE: mld
configs/modules/denoiser.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ denoiser:
2
+ target: hftrainer.models.motion.motionlab.network.rfmotion.models.architectures.rfmotion_denoiser_4path.RFMotionDenoiser # rfmotion_denoiser.RFMotionDenoiser
3
+ params:
4
+ text_encoded_dim: 768
5
+ ff_size: 1024
6
+ num_layers: 9
7
+ num_heads: 8
8
+ dropout: 0.1
9
+ normalize_before: False
10
+ activation: 'gelu'
11
+ flip_sin_to_cos: True
12
+ return_intermediate_dec: False
13
+ arch: trans_enc
14
+ freq_shift: 0
15
+ token_dim: ${model.token_dim}
16
+ nfeats: ${DATASET.NFEATS}
17
+ nclasses: ${DATASET.NCLASSES}
18
+ ablation: ${TRAIN.ABLATION}
configs/modules/evaluators.yaml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ t2m_textencoder:
2
+ target: hftrainer.models.motion.motionlab.network.rfmotion.models.architectures.t2m_textenc.TextEncoderBiGRUCo
3
+ params:
4
+ word_size: 300
5
+ pos_size: 15
6
+ hidden_size: 512
7
+ output_size: 512
8
+
9
+ t2m_moveencoder:
10
+ target: hftrainer.models.motion.motionlab.network.rfmotion.models.architectures.t2m_textenc.MovementConvEncoder
11
+ params:
12
+ hidden_size: 512
13
+ output_size: 512
14
+
15
+ t2m_motionencoder:
16
+ target: hftrainer.models.motion.motionlab.network.rfmotion.models.architectures.t2m_motionenc.MotionEncoder
17
+ params:
18
+ input_size: ${model.t2m_moveencoder.output_size}
19
+ hidden_size: 1024
20
+ output_size: 512
configs/modules/motion_vae.yaml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ motion_vae:
2
+ target: hftrainer.models.motion.motionlab.network.rfmotion.models.architectures.rfmotion_vae_nativerope.MldVae # rfmotion_vae.RFMotionVae # mld_vae.MldVae
3
+ params:
4
+ ff_size: 1024
5
+ num_layers: 9
6
+ num_heads: 8
7
+ dropout: 0.1
8
+ normalize_before: false
9
+ activation: 'gelu'
10
+ latent_dim: ${model.latent_dim}
11
+ nfeats: ${DATASET.NFEATS}
12
+ ablation: ${TRAIN.ABLATION}
configs/modules/motionclip_params_263.yaml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ activation: gelu
2
+ archiname: transformer
3
+ batch_size: 128
4
+ clip_image_losses:
5
+ - cosine
6
+ clip_lambda_ce: 1.0
7
+ clip_lambda_cosine: 1.0
8
+ clip_lambda_mse: 1.0
9
+ clip_lambdas:
10
+ image:
11
+ cosine: 1.0
12
+ text:
13
+ cosine: 1.0
14
+ clip_layers: 12
15
+ clip_text_losses:
16
+ - cosine
17
+ clip_training: ''
18
+ cuda: true
19
+ datapath: ./data/amass_xyz_911_feats_notrans/amass_30fps_db.pt
20
+ dataset: amass
21
+ debug: false
22
+ device: 3
23
+ expname: exps
24
+ folder: ./exps/9_15_feat_mld_vae_l1loss
25
+ glob: true
26
+ glob_rot:
27
+ - 3.141592653589793
28
+ - 0
29
+ - 0
30
+ jointstype: vertices
31
+ lambda_rc: 100.0
32
+ lambda_rcxyz: 100.0
33
+ lambda_vel: 1.0
34
+ lambda_velxyz: 1.0
35
+ lambdas:
36
+ rc: 100.0
37
+ rcxyz: 100.0
38
+ latent_dim: 512
39
+ losses:
40
+ - rc
41
+ - rcxyz
42
+ lr: 0.0001
43
+ max_len: -1
44
+ min_len: -1
45
+ modelname: motionclip_transformer_rc_rcxyz
46
+ modeltype: motionclip
47
+ num_epochs: 500
48
+ num_frames: 60
49
+ num_layers: 9
50
+ num_seq_max: -1
51
+ only_60_classes: false
52
+ pose_rep: feats
53
+ sampling: conseq
54
+ sampling_step: 1
55
+ snapshot: 20
56
+ translation: true
57
+ use_action_cat_as_text_labels: false
58
+ use_only_15_classes: false
59
+ vertstrans: false
60
+ nfeats: 1
61
+ njoints: 263
62
+ num_classes: 1
configs/modules/scheduler.yaml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # scheduler:
2
+ # target: diffusers.DDIMScheduler
3
+ # num_inference_timesteps: 50
4
+ # eta: 0.0
5
+ # params:
6
+ # num_train_timesteps: 1000
7
+ # beta_start: 0.00085
8
+ # beta_end: 0.012
9
+ # beta_schedule: 'scaled_linear' # Optional: ['linear', 'scaled_linear', 'squaredcos_cap_v2']
10
+ # clip_sample: false # clip sample to -1~1
11
+ # set_alpha_to_one: false
12
+ # steps_offset: 1
13
+ # prediction_type: 'epsilon' # Optional: ['epsilon', 'sample']
14
+
15
+ # noise_scheduler:
16
+ # target: diffusers.DDPMScheduler
17
+ # params:
18
+ # num_train_timesteps: 1000
19
+ # beta_start: 0.00085
20
+ # beta_end: 0.012
21
+ # beta_schedule: 'scaled_linear' # Optional: ['linear', 'scaled_linear', 'squaredcos_cap_v2']
22
+ # variance_type: 'fixed_small'
23
+ # clip_sample: false # clip sample to -1~1
24
+ # prediction_type: 'epsilon' # Optional: ['epsilon', 'sample']
25
+
26
+ scheduler:
27
+ target: diffusers.FlowMatchEulerDiscreteScheduler
28
+ num_eval_steps: 51
29
+ num_demo_steps: 201
30
+ params:
31
+ num_train_timesteps: 1000
32
+
33
+ noise_scheduler:
34
+ target: diffusers.FlowMatchEulerDiscreteScheduler
35
+ params:
36
+ num_train_timesteps: 1000
configs/modules/text_encoder.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ text_encoder:
2
+ target: hftrainer.models.motion.motionlab.network.rfmotion.models.architectures.rfmotion_clip.RFMotionTextEncoder
3
+ params:
4
+ finetune: false
5
+ last_hidden_state: true
6
+ modelpath: ${model.clip_path}
7
+ max_length: 77
mean_motion.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6574331d90d01bd3969df88fdae2de5f475ec3b6328b214a398c60bc686e65c7
3
+ size 392
model_index.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "MotionLabPipeline",
3
+ "_library_name": "hftrainer",
4
+ "model_type": "motionlab",
5
+ "format": "hftrainer-motionlab-artifact-v1",
6
+ "bundle_class": "hftrainer.models.motion.motionlab.bundle.MotionLabBundle",
7
+ "pipeline_class": "hftrainer.pipelines.motionlab.pipeline.MotionLabPipeline",
8
+ "artifacts": {
9
+ "checkpoint": "motionflow.ckpt",
10
+ "configs": "configs",
11
+ "mean": "Mean.npy",
12
+ "std": "Std.npy",
13
+ "mean_motion": "mean_motion.npy",
14
+ "std_motion": "std_motion.npy"
15
+ },
16
+ "api": {
17
+ "from_pretrained": "hftrainer.pipelines.motionlab.MotionLabPipeline.from_pretrained"
18
+ }
19
+ }
motionflow.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4137a5d1b488329f603aff89bb677336ab4092d578b15c007a1ea7acfb23657f
3
+ size 2931450169
std_motion.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0971c47de2a1946e8c6bf1a83ad46e74d8aac89372a6d847fad573cfe8f8201f
3
+ size 392