File size: 5,490 Bytes
ab69c77 68a5a31 64ca643 68a5a31 64ca643 58fafe6 77ea2c6 64ca643 58fafe6 ab69c77 64ca643 ab69c77 68a5a31 64ca643 ab69c77 64ca643 ab69c77 68a5a31 ab69c77 64ca643 ab69c77 68a5a31 ab69c77 64ca643 68a5a31 ab69c77 64ca643 ab69c77 64ca643 ab69c77 68a5a31 77ea2c6 64ca643 ab69c77 64ca643 68a5a31 77ea2c6 64ca643 ab69c77 64ca643 ab69c77 64ca643 68a5a31 ab69c77 64ca643 58fafe6 77ea2c6 58fafe6 77ea2c6 68a5a31 77ea2c6 58fafe6 77ea2c6 58fafe6 77ea2c6 58fafe6 77ea2c6 58fafe6 77ea2c6 58fafe6 77ea2c6 58fafe6 77ea2c6 58fafe6 64ca643 58fafe6 64ca643 58fafe6 ab69c77 5e8aca3 64ca643 ab69c77 64ca643 ab69c77 64ca643 ab69c77 64ca643 ab69c77 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | ---
tags:
- music-to-dance
- dance-generation
- 3d-human-motion
- motion-generation
- meanflow
- bimamba
---
<!-- Hugging Face model card source. Upload this file as README.md to xlt99/FlowerDance. -->
<h1 align="center">πΈ FlowerDance</h1>
<h3 align="center">MeanFlow for Efficient and Refined 3D Dance Generation</h3>
<p align="center">
<a href="https://arxiv.org/abs/2511.21029">
<img src="https://img.shields.io/badge/arXiv-FlowerDance-green" alt="Paper">
</a>
<a href="https://sun-happy-ykx.github.io/FlowerDance/">
<img src="https://img.shields.io/badge/Project_Page-FlowerDance-blue" alt="Project Page">
</a>
<a href="https://github.com/XulongT/FlowerDance">
<img src="https://img.shields.io/badge/Conference-ECCV%202026-orange" alt="Conference">
</a>
<a href="https://huggingface.co/xlt99/FlowerDance">
<img src="https://img.shields.io/badge/Hugging_Face-%F0%9F%A4%97_Model-FFD21E" alt="Hugging Face">
</a>
</p>
<p align="center">
<img src="./flowerteaser.png" width="90%" alt="FlowerDance teaser">
</p>
> **Abstract**: Music-to-dance generation translates auditory signals into expressive human motion, yet existing approaches still struggle to balance refined 3D motion quality with strict inference budgets. FlowerDance is designed for both physically plausible, artistically expressive motion and efficient generation in speed and memory usage.
>
> FlowerDance combines MeanFlow with Physical Consistency Constraints for high-quality few-step sampling, and uses a lightweight non-autoregressive BiMamba backbone with Channel-Level Fusion for long-horizon music-to-dance synthesis. It also supports motion editing through time-decayed soft masking, enabling users to refine generated dance sequences interactively.
<p align="center">
<strong>π FlowerDance has been accepted to ECCV 2026! π</strong><br>
<em>β¨ Training and inference code are now available. β¨</em>
</p>
---
<a id="code"></a>
## π Code
The complete training, evaluation, and inference code is maintained in the [GitHub repository](https://github.com/XulongT/FlowerDance).
### π οΈ Set up the Environment
To set up the necessary environment for running this project, follow the steps below:
1. **Clone the repository**
```bash
git clone https://github.com/XulongT/FlowerDance.git
cd FlowerDance
```
2. **Create a new conda environment**
```bash
conda create -n Flower_env python=3.10
conda activate Flower_env
```
3. **Install PyTorch (CUDA 12.8)**
```
pip install torch==2.7.1+cu128 torchvision==0.22.1+cu128 torchaudio==2.7.1+cu128 \
--index-url https://download.pytorch.org/whl/cu128
```
4. **Install remaining dependencies**
```bash
pip install -r requirements.txt
```
---
## π¦ Download Resources
- Download the complete **preprocessed data archive** from [Hugging Face](https://huggingface.co/datasets/xlt99/FlowerDance-Preprocessed/resolve/main/data.7z?download=true) and extract it so that the preprocessed files are located under `./data/`.
- The **pretrained checkpoint** is hosted in this model repository. Custom-music inference downloads it automatically when `--checkpoint` is omitted.
---
## π§© Directory Structure
After downloading the necessary files, ensure the directory structure follows the pattern below:
```
FlowerDance/
β
βββ data/
βββ dataset/
βββ model/
βββ runs/
βββ requirements.txt
βββ args.py
βββ EDGE.py
βββ train.py
βββ test.py
βββ inference.py
βββ inpaint.py
βββ vis.py
```
---
## ποΈ Training
```bash
export WANDB_MODE=offline
accelerate launch train.py --batch_size 128 --epochs 4000 --feature_type baseline
```
---
## π Evaluation
### π§ͺ Evaluate the Model
To evaluate the model:
```bash
python test.py --batch_size 128
```
---
<a id="inference"></a>
## π΅ Inference
Generate a genre-conditioned dance sequence of a custom length from your own music:
```bash
python inference.py path/to/music.wav \
--genre Hiphop \
--duration 32
```
List all supported dance genres:
```bash
python inference.py --list-genres
```
The checkpoint is downloaded automatically from [Hugging Face](https://huggingface.co/xlt99/FlowerDance) when `--checkpoint` is omitted. Generated motions are saved to `inference_outputs/`.
---
## π Acknowledgements
This code is standing on the shoulders of giants. We want to thank the following contributors that our code is based on: [EDGE](https://github.com/Stanford-TML/EDGE), [Adan-pytorch](https://github.com/lucidrains/Adan-pytorch), [denoising-diffusion-pytorch](https://github.com/lucidrains/denoising-diffusion-pytorch), [Mamba](https://github.com/state-spaces/mamba), [causal-conv1d](https://github.com/Dao-AILab/causal-conv1d), and [fairmotion](https://github.com/facebookresearch/fairmotion). The preprocessed data builds on [AIST++](https://github.com/google/aistplusplus_api) and [FineDance](https://github.com/li-ronghui/FineDance).
---
## π Citation
```bibtex
@article{yang2025flowerdance,
title={FlowerDance: MeanFlow for Efficient and Refined 3D Dance Generation},
author={Kaixing Yang and Xulong Tang and Ziqiao Peng and Xiangyue Zhang and Puwei Wang and Jun He and Hongyan Liu},
journal={arXiv preprint arXiv:2511.21029},
year={2025}
}
```
|