motion-diffusion-model icon indicating copy to clipboard operation
motion-diffusion-model copied to clipboard

cache text embedding in inference

Open RalphHan opened this issue 1 year ago • 1 comments

@GuyTevet I've done a little bit change to the code to cache text embedding in inference

RalphHan avatar Aug 29 '23 09:08 RalphHan

Thanks! While this should not affect training mode, for readability purposes, I would also wrap this with if not self.training and add a comment that explains this mechanism. https://discuss.pytorch.org/t/check-if-model-is-eval-or-train/9395

GuyTevet avatar Aug 30 '23 01:08 GuyTevet