FAQ - C0untFloyd/roop-unleashed GitHub Wiki
When starting a face swap or preview this error shows up (excerpt): CUDA failure 35: CUDA driver version is insufficient for CUDA runtime version
The default installation is using Cuda for hardware accelerated calculations. The Cuda runtime is newer NVIDIA GPUs only! If you want to use it without GPU assistance you can change the provider setting in the settings tab to CPU. Of course this will cause a lot slower processing speed. If you own a newer AMD gpu you can try installing DirectML and for Intel Hardware you can try installing OpenVino. Please refer to the installation page in this wiki for details. After installation be sure to apply this new execution provider in the settings.
If you're getting the above error although you actually use an NVIDIA GPU:
- Did you install the necessary Cuda Runtime previously?
- Is your GPU at least a 1080 GT? Most mobile Laptop GPUs are just too weak.
- Is there a version conflict? Try installing an older version of the onnxruntime.
roop-unleashed uses the Gradio Framework for its web-ui which incorporates a webserver. Everything you load into it, will be stored as a temporary copy. However this sometimes seems to go wrong, especially when adding stuff in parallel. If it keeps hanging, just click on the x close button and try again.
The face detection used is picky if your target person's face is at weird angles or looking sideways. Try finding a better image. Another reason could be that the face is too close. In this case try painting a border frame around the face or change to the non-standard det-size in the Settings Tab (you need to apply settings and restart the app to make it work).
You could either try masking the mouth or occluders or a cheap way would be to play with the offset bottom values. Both will paste parts of the original image back into the faked image.
Either the word isn't known to the parser or the object itself is much too small for the algorithm to find and mask. An example would be using 'lips' which are never found, instead using 'mouth' for it. Mouth won't be found however if it is open or having a big smile, then you can try using 'chin' or 'teeth'. Text masking is far from perfect but it's a start.
The answer is creating symbolic links. They allow you to redirect any path to another path. See here:
https://www.howtogeek.com/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/
- Users with Nvidia Graphics Cards: Try disabling System Memory Fallback for python - only if you're having issues.
- Windows users: Make sure that "Hardware-accelerated GPU scheduling" is enabled in your Windows Graphics settings.
- Make sure that all needed components according to Installation, specific to your graphics card, are properly installed.
- In the roop-unleashed "Settings"-Tab, check if the right "Provider" is selected (cuda for Nvidia cards for example) - After making changes to "Provider" (don't forget to hit "Apply Settings"), you need to restart roop-unleashed (close the browser tab and the python / cmd window), as it needs to reload the models.
- Check if the used provider in the cmd window matches your settings and graphics card.
- Most performance issues are related to exhausting all of your available VRAM (GPU memory), as a result of running too many threads ("Max. Number of Threads" in the "Settings" tab). The goal is to fully utilize the GPU, without exhausting its VRAM. To achieve this, follow the next steps and tipps.
- Open the Windows Task Manager or GPU-Z. I recommend using GPU-Z, since the Windows Task Manager doesn't show the correct GPU utilization in some cases. Start a swapping process with a short video (≈ 1-2 minutes), your desired enhancer ("Select post-processing" in the "Face Swap" tab), and "Max. Number of Threads" set to 1 or 2.
- Check your GPU-, and espescially the VRAM-usage in the Windows Task Manager / GPU-Z
- If you're already at 90%+ GPU-utilization, you're good. There's no need to raise the "Max. Number of Threads" further.
- If you're under 90% GPU-utilization and you have enough unused VRAM (Important: Always leave ≈ 15-20% of your total VRAM free for other processes and possible spikes from roop-unleashed): Let the swapping process finish or abort / restart roop-unleashed, raise the "Max. Number of Threads" by one, apply Settings and run the swapping process again. Repeat this step until you either reach 90-100% GPU-utilization, or 80% of your total available VRAM. That's the maximum, stable performance you will get.
- The different enhancers come with different VRAM needs. If you change the enhancer, there's a good chance you'll have to adjust "Max. Number of Threads" too. GFPGAN (3 threads max. with RTX3060 12GB) uses less VRAM than GPEN (2 threads max. with RTX3060 12GB) for example.
- If VRAM usage goes over your available amount (too many threads, editing a video in Adobe Premiere Pro at the same time, other processes etc.) the performance will drop significantly. There's no way to fix that for the current swapping process, you'll have to restart roop-unleashed.