HiDream-ai/DMSampler ? reverse-engineered prompt
Reverse engineered prompt
Build me the DMSampler training pipeline from this repo.
I want a system that alternates between two phases, one where a diffusion model is trained with reinforcement learning using cheap few step rollouts, and another where the updated model is used to distill a fast sampler back into the loop. It should support reward based trajectory recording, automatic switching between phases, and checkpoint handoff so training can keep going without manual babysitting.
Please make it work with the existing config files and shell scripts, and keep it practical for running on multiple GPUs or multiple machines. I also need the reward dataset generation and trajectory recorder pieces to work, plus the reward aware distillation path that reuses high reward samples. If anything depends on current external docs or model setup, look them up online if you need to.
Are you gonna build this?
make sure you review the code using coderabbit