Batch Size Troubles

The Extraction process failing on you, and you aren't getting an error back with clear instructions? Tell us about it here


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for reporting errors with the Extraction process. If you want to get tips, or better understand the Extract process, then you should look in the Extract Discussion forum.

Please mark any answers that fixed your problems so others can find the solutions.

Post Reply
User avatar
BillyThompsFosho
Posts: 6
Joined: Fri Jan 05, 2024 7:32 pm
Has thanked: 3 times

Batch Size Troubles

Post by BillyThompsFosho »

Hey all,

I have managed to get the Windows version of faceswap to function as it should. However, when I first started using the program my PC would crash and reboot every time I started the extraction process, without a crash log. I started to look through the forum and found this topic, "viewtopic.php?t=783."

This was pretty much the exact same problem I was having, so I was pretty bummed because I didn't want to get a new PSU.

I kept looking through the forum and found this topic, "viewtopic.php?t=771" and found that TensorFlow could affect crashing some how.

I wasn't sure if that topic was a separate issue from mine, because it had a crash log. I wanted to get this project going, so I set my batch sizes to 1 for both my Fan align and S3Fd detect batch size settings. After I did that, the program functioned without my computer crashing.

So far after using the guides I have been able to run faceswap pretty well, and have managed to extract a good amount of data for face A. I am starting Face B and also having no issues.

So finally my question and the TLDR is this; the first topic's issue was only fixed by getting a new PSU, and I don't even know what the issue was in the second topic. I want to increase the batch sizes for Fan and S3Fd but I'm wondering if that is even necessary/possible since I am still getting decent data. So does anyone know what issue I was possibly having?

Last edited by BillyThompsFosho on Sun Jan 07, 2024 4:20 pm, edited 4 times in total.
User avatar
torzdf
Posts: 2687
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 135 times
Been thanked: 628 times

Re: Batch Size Troubles

Post by torzdf »

Unfortunately that 2nd issue's crash log is lost to time, so I don't know what the issue was there.

However, the computer entirely rebooting is usually hardware related. It's very hard to pin it down beyond that.

IIRC, you are an AMD user, so I suspect that you are using the DirectML build.

If you are feeling adventurous (and I only suggest this as you were running on WSL2 before, so I imagine you have, at least, a small idea of what you are doing), and you have a supported GPU, then you can try to run the ROCm version under Windows: https://rocm.docs.amd.com/projects/inst ... stall.html

I do not have an AMD GPU to test out how well this works, however, off the top of my head, after installing ROCm you will need to:

This should then hopefully work. Like I say, never tested, but if you do go this route, I would be interested to hear if it works, or anything you needed to do to get it working. If it is fairly straightforward then I will add ROCm as an install option under Windows.

My word is final

User avatar
BillyThompsFosho
Posts: 6
Joined: Fri Jan 05, 2024 7:32 pm
Has thanked: 3 times

Re: Batch Size Troubles

Post by BillyThompsFosho »

torzdf wrote: Sun Jan 07, 2024 7:50 pm

If you are feeling adventurous (and I only suggest this as you were running on WSL2 before, so I imagine you have, at least, a small idea of what you are doing), and you have a supported GPU, then you can try to run the ROCm version under Windows: https://rocm.docs.amd.com/projects/inst ... stall.html

I do not have an AMD GPU to test out how well this works, however, off the top of my head, after installing ROCm you will need to:

Well, I've been working on this for a day or so and so far the biggest struggle is getting tensorflow-rocm working. I can't seem to find a way to get that to windows, every time I try to pip install it gives me this error:

ERROR: Could not find a version that satisfies the requirement tensorflow-rocm<2.11.0,>=2.10.0 (from versions: none)
ERROR: No matching distribution found for tensorflow-rocm<2.11.0,>=2.10.0.

When I tried to get everything going for ROCm on WSL2, I was able to install tensorflow-rocm. However I get stuck trying to get Ubuntu to find my gpu. 'rocminfo' gives me this error:

ROCk module is NOT loaded, possibly no GPU devices.

I downloaded the HIP SDK and I'm fairly certain I have that installed. I looked around online and I am also starting to think that WSL doesn't support direct GPU access. Everything online I find for tensorflow-rocm is for linux systems, and I can't figure out how to get that to windows. And on WSL2 Ubuntu I can't figure out how to load the ROCk module. Maybe I could do something with docker? I'm still pretty new to coding, so my knowledge is limited and I am probably missing something, but if I figure anything else out I will let you know.

User avatar
torzdf
Posts: 2687
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 135 times
Been thanked: 628 times

Re: Batch Size Troubles

Post by torzdf »

Hmmm.

Ok, it may be that tensorflow-rocm is just not available for windows... checking pypi, I can only see linux versions :/

Sorry to lead you down the garden path. I had just assumed that as AMD had ported ROCm to Windows, then they would also port their plugins.

As for GPU access in WSL2... I'm not entirely sure how it works to be honest, but I would not be surprised if direct access were abstracted away.

My word is final

User avatar
BillyThompsFosho
Posts: 6
Joined: Fri Jan 05, 2024 7:32 pm
Has thanked: 3 times

Re: Batch Size Troubles

Post by BillyThompsFosho »

All good, it was worth a shot. I'll check into it as I use faceswap the way you helped me do it. Like I said if I ever do eventually figure anything out I will pass the knowledge down.

Post Reply