Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement Request] FaceSwap Node: Cache faces and face_analyser model #19

Closed
MoonMoon82 opened this issue Jul 11, 2023 · 3 comments
Closed
Labels
type: 🤚 feature request New feature or request

Comments

@MoonMoon82
Copy link

Hi!

I just saw that the faces (source_face and target_face) in function swap_face are not being cached.
Also in function get_face_single the face_analyser model is loaded everytime the node is executed.

I assume it would save some time if the faces and face_analyser model is cached after the FaceSwap node is executed.
(If you agree, please be aware of caching this data in the FaceSwap node wouldn't help because it's going to be resetted immediately if any input is changed - so I suggest you to store this cache data in the LoadFaceSwapModel node.)

Kind regards

@melMass
Copy link
Owner

melMass commented Jul 11, 2023

Thanks!
Good points! I will look into it

@melMass melMass added the type: 🤚 feature request New feature or request label Jul 11, 2023
This was referenced Jul 14, 2023
@melMass
Copy link
Owner

melMass commented Jul 25, 2023

@MoonMoon82 This was auto closed by my commit, but it's indeed much faster now! I think there is still a bit of optimization possible but it's much better already!

I made this to test it out 😅

Georges Lucas as Terminator:
The player seems to no like it, but you can click here to watch it

terminator_lucas.mp4

I also updated the example file to match this update

@MoonMoon82
Copy link
Author

@melMass This is awesome fast!! Great work!!
Just a tiny issue: antelopev2.zip and buffalo_m.zip could not been downloaded automatically. I guess these file are taken down. I needed to search the web to download them from a google drive and extract them manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: 🤚 feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants