pytorch-fid
pytorch-fid copied to clipboard
Faster computation for FID
As previously reported in issues #67 and #83, computing the FID is time-consuming. Upon investigation, I discovered that the current implementation uses scipy.linalg.sqrtm, requires multiple dot product operations with NumPy and is particularly slow on CPU. To address this issue, I simply modified the original sqrtm that moves the dot product operation to the GPU. As a result, I observed a significant time improvement, from 6 minutes to just 30 seconds in my environment.
If anyone has encountered a similar problem, please consider trying the modification I proposed: https://github.com/jaywu109/faster-pytorch-fid