facebookresearch / audio2photoreal

Code and dataset for photorealistic Codec Avatars driven from audio
Other
2.7k stars 254 forks source link

Optimize RenderLayer: GPU utilization & batch processing #13

Closed vivekmaru36 closed 9 months ago

vivekmaru36 commented 9 months ago

tests required

Changes Made :

Device Compatibility: Explicitly handling device placement by utilizing .to(device) for tensors and ensuring tensors are appropriately located on the specified device.

Tensor Operations: Refactoring tensor manipulations for better clarity and efficiency, using functions like th.repeat_interleave and in-place operations.

Code Readability: Enhancing code readability by explicitly defining device-related operations and streamlining tensor manipulations.

evonneng commented 9 months ago

Amazing! Thanks for the optimization! This looks great to me.