neuralchen / SimSwap

An arbitrary face-swapping framework on images and videos with one single trained model!
Other
4.55k stars 895 forks source link

Getting errors with the NEW 512 Res - Help ? 😩 #164

Open AlonDan opened 2 years ago

AlonDan commented 2 years ago

After many tries, re-installing fresh environment again and again... I finally got to run it but now I get errors after it starts the process.

I'm still not sure how to make it work, I followed all the instructions, downloaded all needed zips, extract to the directories needed, but still get errors.

cmd_2021-11-24_20-31-14

Any idea How can I fix it? 😵

If you can help please explain step-by-step so it will be easy to understand, thanks ahead!

Yishaqel commented 2 years ago

lastest_net_G.pth is not in the folder as you can read in the console, maybe that's it?

AlonDan commented 2 years ago

Thanks for the quick reply, I don't know what is the file or how do I find it and in what directory to put it. I did unzip all the needed files in the correct directories, but maybe when unzip since I used "Extract Here" it created extra sub-directories, it's not very clear so I'm not sure.


UPDATE: I believe it's in my SimSwap ROOT directory, as "people" directory, I extract: checkpoints.zip with the FULL name "checkpoint/people/ files in here" 🤔

So now part of the error is gone... maybe I shouldn't extract with "extract here" I'll keep update if I don't understand the error again.

Thanks ahead for any tips!

AlonDan commented 2 years ago

I believe I fixed most of the directories and sub-directories naming one by one. But now I'm not sure about the all "onnx" if it's my GPU or some other thing I need to re-install? or is it the path which I don't know how to change:

cmd_2021-11-24_21-14-15

My GPU worked with the older SimSwap version (without the 512 res) GTX 980 4GB (old, but works fine with the old SimSwap)

I would like to try with the GPU but, If my GPU is the problem, How can I use CPU only, what should I change exactly?

Any help will be appreciated, thanks ahead!

netrunner-exe commented 2 years ago

You need to download 512 model and unzip in checkpoints folder. And add --crop_size 512 in line. Please read carefully the updated Inference for image or video face swapping and Preparation . Link to 512 model in the end of Preparation, example is in the end of "Inference for image or video face swapping".

AlonDan commented 2 years ago

Thanks for your reply, That's exactly what I did, as I described I did follow all the instructions. The first issue I guess was because I used using "Extract Here" instead of extract with the zip as sub-directory name, so I created the directories manually now.

But I still get the error related to "onnx" or path which I have no idea how to fix, I described it + screenshot on my latest post above.

I wonder how can I pass these errors, it looks like I'm getting "closer" to make the SimSwap works with the new 512 resolution... help?

bmc84 commented 2 years ago

"My GPU worked with the older SimSwap version (without the 512 res)"

If you have a working instance of SimSwap, why are you creating a new environment? Just use the existing one.

For example, I have an Anaconda environment: simswap. I have the old version (256x256) installed to d:\simswap To use it, I run conda activate simswap then goto d:\simswap & run the python scripts.

To use the new 512 version, all I have done is set up a new folder: d:\simswap512 This new folder contains the new git repo, plus the new 512 checkpoint, as described in the new documentation. To use the 512 version, I do the same as the old version: conda activate simswap then goto d:\simswap512 & run the python scripts, ensuring --crop_size 512 is added.

Everything works the same as the old version, and I have not set up a new Anaconda environment, just a new folder for SimSwap. If you want a new environment, you could even clone your existing working version instead of having to re-install everything again.

I can't really help beyond this, since everything just worked the first time I tried... it wasn't complicated at all.

AlonDan commented 2 years ago

Thanks for the detailed reply @bmc84 the reason I made a new environment was because I wasn't sure if it changed and I need to install some different things or it's just the pre-trained and commands (as I found out that it is the case later) I got confused with the current documents so it's my bad.

I'm going to listen to your advice and use same old environment with new directory for the 512 one so I can test it, thank you for the advice!

coldplayer12 commented 2 years ago

Hello! Sorry to interrupt, but I'm having troubles installing this as well. I followed every step of preparation and I using the GUI and I keep getting this message. imagen

instant-high commented 2 years ago

Looks like you try to run the simswap512 gui on the old repo.