This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Why VSGAN is not supported,...
#1
Okay, since every few month someone asks me why Hybrid does not support VSGAN (https://github.com/rlaPHOENiX/VSGAN) here's the answer:
It would increase Hybrids install size by 5,4 GB.

In case you want to verify it, here's how-to "Create a VSGAN portable version":
  • Download latest Vapoursynth portabe Fatpack (https://github.com/theChaosCoder/vapours...K/releases) and extract it to a folder
  • Delete the links an folders inside the VapourSynth64 aside from VapourSynth64 and the Scripts folder (optional)
  • Open a Windows command prompt and change into the VapourSynth64/VapourSynth64-folder.
  • Call `python.exe -m pip install --upgrade pip" to update pip` to update pip
  • Call `python.exe -m pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html` to install pytorch
    For cuda10 use `python.exe -m pip install torch==1.8.1+cu102 torchvision==0.9.1+cu102 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html` to install pytorch
  • Call `python.exe -m pip install pyd2v pymediainfo vsgan" to install vsgan`
  • Close Windows Command Prompt.
now you got a 6GB folder containing a portable Vapoursynth (~560MB) with VSGAN (~5.4GB).
So adding this to Hybrid would add an additional 5.4GB and this does not include any models (each ~64MB).

In case you want to try out VSGAN:
  • Download some models
  • I went to https://upscale.wiki/wiki/Model_Database and then to Anime Oldies Alternative (https://drive.google.com/drive/folders/1...o6Dnk-svNL) and downloaded the pth files and extract them somewhere.
  • Open VapourSynth64Portable\VapourSynth64\vsedit.exe and write a script like:
    # Imports
    import vapoursynth as vs
    core = vs.get_core()
    # Loading Plugins
    from vsgan import VSGAN

    # Loading F:\TestClips&Co\files/5000frames.mp4 using LWLibavSource
    clip = core.lsmas.LWLibavSource(source="F:/TestClips&Co/files/5000frames.mp4", format="YUV420P10", cache=0, prefer_hw=0)
    # making sure input color matrix is set as 470bg
    clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
    # making sure frame rate is set to 25
    clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1)
    # Setting color range to TV (limited) range.
    clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)

    # creating a VSGAN instance
    vsgan = VSGAN("cuda")
    # setting model
    model = "C:/Users/Selur/Desktop/Vapoursynth64portable/vsgan_models/PSNR Pretrain Models/4xPSNR.pth"
    vsgan.load_model(model)
    # convert clip color space from YUV420P8 to RGB24 for vsgan
    clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="470bg", range_s="limited")
    clip = vsgan.run(clip=clip)

    clip.set_output()
(paths need to be adjusted to your setup)
start the preview.

Cu Selur

Links to pth files:
Reply


Messages In This Thread
Why VSGAN is not supported,... - by Selur - 15.05.2021, 12:55
RE: Why VSGAN is not supported,... - by Selur - 09.10.2021, 17:11
RE: Why VSGAN is not supported,... - by Selur - 08.11.2021, 16:25
RE: Why VSGAN is not supported,... - by Selur - 29.12.2021, 17:29
RE: Why VSGAN is not supported,... - by Selur - 26.03.2022, 14:10
RE: Why VSGAN is not supported,... - by Selur - 26.03.2022, 17:29
RE: Why VSGAN is not supported,... - by ld57 - 25.10.2023, 09:13
RE: Why VSGAN is not supported,... - by Selur - 25.10.2023, 09:28
RE: Why VSGAN is not supported,... - by ld57 - 25.10.2023, 13:17
RE: Why VSGAN is not supported,... - by ld57 - 25.10.2023, 14:52
RE: Why VSGAN is not supported,... - by Selur - 25.10.2023, 16:45
RE: Why VSGAN is not supported,... - by ld57 - 26.10.2023, 22:58
RE: Why VSGAN is not supported,... - by ld57 - 29.10.2023, 16:24
RE: Why VSGAN is not supported,... - by Selur - 29.10.2023, 16:34
RE: Why VSGAN is not supported,... - by ld57 - 29.10.2023, 17:38
RE: Why VSGAN is not supported,... - by Selur - 29.10.2023, 17:41
RE: Why VSGAN is not supported,... - by ld57 - 29.10.2023, 17:54
RE: Why VSGAN is not supported,... - by Selur - 29.10.2023, 18:08
RE: Why VSGAN is not supported,... - by Selur - 29.10.2023, 18:15
RE: Why VSGAN is not supported,... - by ld57 - 29.10.2023, 18:31
RE: Why VSGAN is not supported,... - by Selur - 29.10.2023, 18:34
RE: Why VSGAN is not supported,... - by ld57 - 29.10.2023, 19:08
RE: Why VSGAN is not supported,... - by Selur - 29.10.2023, 19:09

Forum Jump:


Users browsing this thread: 1 Guest(s)