Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extras / enhancers the performance is terribly slow. #945

Open
7 tasks
talbertj20 opened this issue Oct 4, 2024 · 2 comments
Open
7 tasks

Extras / enhancers the performance is terribly slow. #945

talbertj20 opened this issue Oct 4, 2024 · 2 comments

Comments

@talbertj20
Copy link

talbertj20 commented Oct 4, 2024

When using the extras / enhancers the performance is terribly slow. Previously when using ESRGAN X2 i would process at about 1-2 fps
and now it is about 33 fps. I do not see a drop in face swapping, or at least nothing as noticeable. This has been occurring for the past several release. See screenshots below for errors.

Things i have tried so far and still get the same results.
-Completely deleted old Roop-Unleashed Folder.
-Completed removed all traces of NVidia Drivers
-Ran Windows 11 Updates
-Reinstalled NVidia CUDA 11.8
-Fresh install of Roop-Unleashed on my fastest local SSD Drive.

Other System Specs:
AMD Ryzen 7 5800X3D
32GB RAM

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Extras'
  2. Add Image Files to Process
  3. Click on 'Enhancers'
  4. Scroll down to 'ESRGAN X2'
  5. Click on Start Processing
  6. See error in screenshot below

Details
What OS are you using?

  • Linux
  • Linux in WSL
  • [ X] Windows 11 23H2
  • Mac

Are you using a GPU?

  • No. CPU FTW
  • [X ] NVIDIA (NVIDIA GeForce RTX 4070 Ti SUPER OC Edition)
  • AMD
  • Intel
  • Mac

Which version of roop unleashed are you using?
roop unleashed 4.3.2

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2024-10-04 092605
Screenshot 2024-10-04 103223

@C0untFloyd
Copy link
Owner

C0untFloyd commented Oct 5, 2024

Thanks for the info, I can reproduce the warning in yellow but I'm actually unsure if this wasn't always present. Upscaling always was quite slow with my RTX 2060 Super so I'm not certain if it's slower or faster nowadays. What I'm sure about is that there has been no code change since upscaling was first implemented. There were however upgrades of the onnxruntime versions.
Your powerful gpu taking so long for a frame isn't right. For testing I upscaled a 1920x1080 video with ESRGANx2 and it's taking ~8 secs on average for a frame:

Processed resolution: (3840, 2160)
['ffmpeg', '-hide_banner', '-hwaccel', 'auto', '-y', '-loglevel', 'error', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '3840x2160', '-pix_fmt', 'bgr24', '-r', '25.0', '-an', '-i', '-', '-vcodec', 'libx264', '-crf', '14', '-vf', 'colorspace=bt709:iall=bt601-6-625:fast=1', '-pix_fmt', 'yuv420p', 'E:\Coding\Projects\Python\roop-unleashed_main\output\tag_cut__temp.mp4']
Processing: 99%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋ | 90/91 [14:38<00:09, 9.76s/frames, memory_usage=01.10GB, execution_threads=3]

Just an idea, you're writing that you installed new and I'm seeing that you're using 3 threads. Perhaps you used a higher number of frames back then? Because as you have quite a fast gpu the number of threads here could make a difference. I'm still investigating in this case, perhaps there is something but you could test if 6 threads make a difference for you. Also for a minor speedup you could change the image output format to jpg.

@talbertj20
Copy link
Author

I was already using jpg output. I did increase threads from 3 to 6 and restarted roop-unleashed and rana small test.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants