A hacky implementation of Simswap based on Comfyui ReActor Node 0.5.1 and Simswap
I just put this together so that I could use Simswap in my workflows. It's probably bloated with lots of unnecessary code and probably does not work optimally. A lot of the options for Simswap are not exposed and the default values are being used. But it is able to use the simswap model, uniface and also ghost.
git clone this repo into your comfyui/custom_nodes directory
Download the simswap models from here and place them under comfyui/models/simswap: https://huggingface.co/netrunner-exe/Insight-Swap-models-onnx/tree/main
Download the arcface model from here and place it under comfyui/models/simswap: https://github.com/neuralchen/SimSwap/blob/main/docs/guidance/preparation.md
Download the mask from here and place it under comfyui/models/simswap: https://github.com/zllrunning/face-makeup.PyTorch/blob/master/cp/79999_iter.pth
Download the 512 Net_G model from here and place it under comfyui/models/simswap: https://github.com/neuralchen/SimSwap/releases/download/512_beta/512.zip
^ It should look like comfyui/models/simswap/512/550000_net_G.pth
Edit: I just noticed the insightface model link was broken so I replaced it.
Download the insightface models from here: https://huggingface.co/immich-app/antelopev2/tree/main
You need to rename them both and place them in comfyui/models/simswap/antelope
The recognition model should be named glintr100.onnx
The detection model should be named scrfd_10g_bnkps.onnx
Load up comfyui - place the node and try it out! So far my best results were with ghost_unet_3block, restore face set to gfpgan, codeformer weight to 1.00 and restore face visibility to 0.8.
My objective for this was just to get the simswap model working in ComfyUI for my own workflows. I will not be maintaining it or adding to it. If anyone wants to take over the repo then feel free to contact me. Also feel free to put in your own pull requests!
Thanks to all the creators mentioned in the Reactor Credits, to neuralchen and to Gourrief.
Click to expand
file | source | license |
---|---|---|
buffalo_l.zip | DeepInsight | |
codeformer-v0.1.0.pth | sczhou | |
GFPGANv1.3.pth | TencentARC | |
GFPGANv1.4.pth | TencentARC | |
inswapper_128.onnx | DeepInsight | |
inswapper_128_fp16.onnx | Hillobar |
BasicSR - @XPixelGroup
facexlib - @xinntao
@s0md3v, @henryruhs - the original Roop App
@ssitu - the first version of ComfyUI_roop extension
neuralchen - The official implementation of Simswap
Gourrief - The original implementation of ReActor
And thanks to anyone else that was involved in the creation of this node that I failed to mention.