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

EGVSR model leaving a grid pattern? #18

Closed
AIisCool opened this issue Jan 24, 2022 · 5 comments
Closed

EGVSR model leaving a grid pattern? #18

AIisCool opened this issue Jan 24, 2022 · 5 comments
Labels
question Further information is requested

Comments

@AIisCool
Copy link

Sorry to bring up another apparent issue....

image

Had to scale it down to attach, but there's a grid-like pattern and overall the result looks quite odd.

I read over on doom9 that you said:

Please note though, that EGVSR does not auto-detect settings from the model file yet. So you should manually override any settings that needs it when you load the model for correct results.

and so I assume this result is due to not doing that and simply using:

from vsgan import EGVSR
clip = EGVSR(clip, device="cuda").\
load(r"C:\VapourSynth\vsgan_models\EGVSR\EGVSR_iter420000.pth").\
apply().\
clip

isn't going to work. But I have no idea how to override it to get the correct results?

@rlaphoenix
Copy link
Owner

rlaphoenix commented Jan 24, 2022

Network settings are not automatically detected from EGVSR model files at the moment.
That model expects the settings: nb=10, degradation="BD" in load.

I obtained these settings by reading the testing template files in the repo they are from: https://github.com/Thmen/EGVSR/blob/master/experiments_BD/EGVSR/001/test.yml

@rlaphoenix rlaphoenix added the question Further information is requested label Jan 24, 2022
@AIisCool
Copy link
Author

Thanks, that took care of that grid stuff. Though oddly without the grid, I'm getting a crash if I go a few frames into the sequence. Seem to not be getting as great results from EGVSR as I had expected based on their examples, but that's not on you.

@rlaphoenix
Copy link
Owner

rlaphoenix commented Jan 25, 2022

I'm getting a crash if I go a few frames into the sequence.

Try setting the max VapourSynth threads to 1 to make sure you aren't getting more than (interval+1) frames every frame.

Since you super-res not 1, but 1+n(interval) frames every frame, the VRAM requirements are quite high.
On my system I barely get interval=3 or 5 to work and I have 11 GiB. Sadly, I don't know if there's some kind of memory leak or something as I don't really know what performance would be expected by other people's inference code.

Regardless, I try my absolute best to get as much performance with as little VRAM as possible. I've since done a few commits to try to help as much as I can, which will be out in the next version. It might not help, as simply VRAM requirements are quite high. But do try setting the max threads to 1 via core.num_threads = 1 as it will definitely help. It will automatically do this when you use EGVSR in the next version.

P.S., on the latest commit, through vs-pipe, with interval=3 on a 720x480 RGB24 input, I got 6.0 fps, which climbed from 4.5~ to 6 over about a minute. It might have even grown further than 6 fps but the video finished rendering just as it reached it.

@rlaphoenix
Copy link
Owner

v1.6.4 fixes a big memory leak. This will definitely help reduce your VRAM. It reduced mine from about 9.6 GiB to 2.6 GiB with interval=3. I can now go as far as interval=30 and reach 10.8 GiB/11 GiB.

@rlaphoenix
Copy link
Owner

Going to close this now as all questions seem to be addressed.

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

No branches or pull requests

2 participants