Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 25th April 2022, 18:08   #101  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
a. That guide, won't work with current vsrealesrgan.
b. Assuming you use Vapoursynth R57 and not the new Vapoursynth R58 the steps I posted over at https://forum.doom9.org/showthread.php?t=184000 should work.
Using VapourSynth R58 would require to use Python 3.8 (not 3.9 or 3.10) since R58 only supports 3.8 and 3.10, but onnxruntime does not support 3.10 atm.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 25th April 2022, 19:42   #102  |  Link
knumag
Registered User
 
Join Date: Oct 2018
Posts: 7
I got it working now, but why does VSGAN seem better when looking at the result? Same model is being used, but it still seem sharper.
knumag is offline   Reply With Quote
Old 25th April 2022, 19:54   #103  |  Link
knumag
Registered User
 
Join Date: Oct 2018
Posts: 7
And also, using the latest vsrealesrgan with onnx, R58 and pyton 3.8, I got 90-100% GPU usage with same fps as i got with the older vsrealesrgan 1.2.0 at 10% GPU which I did get to work with R57 and python 3.9.
Very confusing. CPU might av been a bit higher without ONNX, but that different is weird, when getting same FPS, no?

Last edited by knumag; 25th April 2022 at 20:01.
knumag is offline   Reply With Quote
Old 25th April 2022, 19:58   #104  |  Link
knumag
Registered User
 
Join Date: Oct 2018
Posts: 7
Quote:
Originally Posted by Selur View Post
a. That guide, won't work with current vsrealesrgan.
b. Assuming you use Vapoursynth R57 and not the new Vapoursynth R58 the steps I posted over at https://forum.doom9.org/showthread.php?t=184000 should work.
Using VapourSynth R58 would require to use Python 3.8 (not 3.9 or 3.10) since R58 only supports 3.8 and 3.10, but onnxruntime does not support 3.10 atm.

Cu Selur
I tried that guide also, didnt work for me. Had to install earlier versions of a lot of them to get it to work for some reason.
Been at this now for 10-15 hours..
knumag is offline   Reply With Quote
Old 7th December 2022, 04:50   #105  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
What are the required GPU ram to run this? I'm upscaling 2x on a 1080p image and it's eating up all my 6G of ram.
lansing is offline   Reply With Quote
Old 7th December 2022, 09:20   #106  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
@lansing: going for 4k from 1080p with an 2x_-model with 16bit indicates a VRAM usage of 6.3GB on my card (Geforce rtx 4080), so you might be out of luck. You could try setting an overlap value, maybe that triggers the tiling support of VSGAN and help with the ram shortage.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 7th December 2022, 09:36   #107  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,148
Lol, 4080, a rich man
kedautinh12 is offline   Reply With Quote
Old 7th December 2022, 09:53   #108  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
Not any more. (new card + new power supply + new ups)
After 5 years my old 1070 simply was having more and more issues, since NVIDIA messed up the driver support more and more. (Accessing my 5k display which needs dual display port import wasn't possible with any drivers newer than the drivers from May.)
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 7th December 2022, 11:14   #109  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by Selur View Post
@lansing: going for 4k from 1080p with an 2x_-model with 16bit indicates a VRAM usage of 6.3GB on my card (Geforce rtx 4080), so you might be out of luck. You could try setting an overlap value, maybe that triggers the tiling support of VSGAN and help with the ram shortage.
Is the plugin Nvidia card only? AMD card offers so much more ram for lesser price.
lansing is offline   Reply With Quote
Old 7th December 2022, 11:40   #110  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,148
But don't support CUDA if VSGAN will support CUDA
kedautinh12 is offline   Reply With Quote
Old 7th December 2022, 18:21   #111  |  Link
Julek
Registered User
 
Julek's Avatar
 
Join Date: Dec 2020
Posts: 83
Quote:
Originally Posted by lansing View Post
Is the plugin Nvidia card only? AMD card offers so much more ram for lesser price.
You can use vsncnn with vs-mlrt to run on AMD, here is the list of models currently supported by vs-mlrt, for other specific models you need to convert to onnx by yourself.
__________________
CPU: AMD 3700X | GPU: RTX 3070Ti | RAM: 32GB 3200MHz
Discord: @Julek#9391 || GitHub
Julek is offline   Reply With Quote
Old 8th December 2022, 06:49   #112  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by Julek View Post
You can use vsncnn with vs-mlrt to run on AMD, here is the list of models currently supported by vs-mlrt, for other specific models you need to convert to onnx by yourself.
I'm waiting for the RX 7900 XTX launch next week to upgrade to AMD. But wow this field is so dominated by Nvidia. It's like nobody is developing anything for AMD...

The models I'm interested in are the 2x_LD-Anime_Skr_v1.0 and some anime sharpen AI for old anime. It's turning my anime dvd into blu-ray.

original


2x_LD-Anime_Skr_v1.0


color matched to cel



I tried to run another 2x sharpen upscale to the result but ran out of memory.
lansing is offline   Reply With Quote
Old 8th December 2022, 10:05   #113  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Some test I made, One Piece DVD:
https://cdn.discordapp.com/attachmen...454592/op1.png <-- (stronger filtering)

https://cdn.discordapp.com/attachmen...04/unknown.png
https://cdn.discordapp.com/attachmen...28/unknown.png
https://cdn.discordapp.com/attachmen...38/unknown.png

One problem that I often see with these models is that there is often a color shift. It is not very fast, but awesome quality (if the source video "matches")
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database

Last edited by ChaosKing; 8th December 2022 at 10:10.
ChaosKing is offline   Reply With Quote
Old 8th December 2022, 11:16   #114  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,148
Do you had channel of discord for encoder?? Can let me in?
kedautinh12 is offline   Reply With Quote
Old 8th December 2022, 23:03   #115  |  Link
Krizzz989
Registered User
 
Join Date: Mar 2002
Posts: 49
ChaosKing those look great, are you open to sharing your script for that? I'm interesting in upscaling the same anime but I'm completely lost on where to start.
Krizzz989 is offline   Reply With Quote
Old 8th December 2022, 23:47   #116  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by ChaosKing View Post
Some test I made, One Piece DVD:
https://cdn.discordapp.com/attachmen...454592/op1.png <-- (stronger filtering)

https://cdn.discordapp.com/attachmen...04/unknown.png
https://cdn.discordapp.com/attachmen...28/unknown.png
https://cdn.discordapp.com/attachmen...38/unknown.png

One problem that I often see with these models is that there is often a color shift. It is not very fast, but awesome quality (if the source video "matches")
I just found the model's author on discord, I'll see if I can get some support from him.



UPDATE:

I got reply from the author. I don't know how to interpret it, so I direct quoted him:
Quote:
Because LDs have crap colors. I had to color match the entire data set, so in the end, there's still a bit of shift
So the shift is expected since our source is DVD instead of LD.

Last edited by lansing; 9th December 2022 at 05:34. Reason: update
lansing is offline   Reply With Quote
Old 9th December 2022, 00:16   #117  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by Krizzz989 View Post
ChaosKing those look great, are you open to sharing your script for that? I'm interesting in upscaling the same anime but I'm completely lost on where to start.
OP has a installation guide:
https://vsgan.phoeniix.dev/en/stable/installation.html

Total file size would be a few GB.

And then go here to look for a model, there are model for different situations. What we use here is 2x_LD-Anime_Skr_v1.0:
https://upscale.wiki/wiki/Model_Database#Anime

Code:
import vapoursynth as vs
from vsgan import ESRGAN

core = vs.core

# your dvd source
clip = core.ffms.Source()

# convert to RGB
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="470bg", range_s="limited")

# instantiate esrgan and load the model
esrgan = ESRGAN(clip, "cuda")

model = r'my_path\2x_LD-Anime_Skr_v1.0.pth'

esrgan.load(model)
esrgan.apply()
clip = esrgan.clip

# get output
clip_set_output()
lansing is offline   Reply With Quote
Old 9th December 2022, 09:52   #118  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
I don't remember which models I used, I simply tried out different models (and combined some).
You can start with one of these: 2x_AnimeClassics_UltraLite_510K, 2x_LD-Anime_Skr_v1.0, 2x_SHARP_ANIME_V1, 2x_DigitalFlim_SubCompact_nf24-nc8_289k_net_g

I also used the example script from the docs. Nothing special, just patience, oh and save your script from time to time, because your editor will crash!

LD = Laserdisc? My source is a jap. R2 DVD.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database

Last edited by ChaosKing; 9th December 2022 at 09:59.
ChaosKing is offline   Reply With Quote
Old 9th December 2022, 11:55   #119  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
After going through many models, for upscaling old anime, I think the models with the best quality are the one that were trained using the actual blu-ray, such as 2x_LD-Anime_Skr_v1.0. There's a guy in the sailormoon forum that trained his model using blu-ray from the sailor moon movies is also getting amazing result.
lansing is offline   Reply With Quote
Old 9th December 2022, 12:08   #120  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
I really need to learn how to train models myself. Imagine if you had like 200 CELs to train on.
I read that you need at least 100 different frames to get decent results.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Reply

Tags
esrgan, gan, upscale, vapoursynth

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.