Unsupervised Representation Learning from Pre-trained Diffusion Probabilistic Models Appendix A Algorithm