I saw the NVIDIA RTX Neural Faces showcase and I needed to make something similar in ComfyUI, so I made this workflow that works with HunyuanVideo, using the wrapper from Kijai ,
Some random facts about this one:
-It’s not perfect, and the settings may vary depending on your input video.
-24GB of VRAM is required (in this configuration). You can process more frames if you lower the desired resolution (of the face crop), and vice versa, as long as you don't hit 99% VRAM usage and get stuck in the VAE encode, or OOM.
-On this configuration, using a 4090, it takes about 70s to process the output
-You can input any resolution up to 4K with any aspect ratio.
-The output will maintain the input resolution and aspect ratio.
-If multiple faces are detected, the results may not be ideal.
-If the subject moves too fast, it may not work well.
-You can adjust the "bbox smooth_alpha" parameter in the "Batch Crop From Mask Advanced" node to tweak the head crop size (depends on the character's distance).
-If your denoise value is too strong, the original movements of the head will no longer match with the input movements, keep it under 0.6, this is more than enough to change the face and create new expressions like natural blinks, eyes and lips movements.
-So It's a good way to make video games/renders faces more lifelike, I don't really see the point of using real videos (Hector Salamanca) but I guess this will work just as fine if you want to replace the face by a random one, you can use characters LoRA's but idk if the denoise value will be strong enough to generate a specific face, you will have to find out.
-I made this one for myself, feel free to ask if you have questions or suggestions ofc, but don't spread your venom if the workflow is messy or too hard for you to understand how it works, thanks.