hacksider / Deep-Live-Cam

real time face swap and one-click video deepfake with only a single image
GNU Affero General Public License v3.0
39.55k stars 5.77k forks source link

Loading Model Initially takes a very long time #564

Closed saketh12 closed 5 days ago

saketh12 commented 1 month ago

Whenever I load the onnx file for the first time/run the get_one_face().get(frame) function for the first time on a GPU/CUDA environment, it takes 100+ seconds to load. For further references however, it doesn't take any time at all. The most perplexing part of this is that if I try to load it on a CPU, it will be almost instantaneous. Why is this happening and how do I fix this?