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

Having issues with r3.1,... #6

Closed
Selur opened this issue Jun 3, 2021 · 4 comments
Closed

Having issues with r3.1,... #6

Selur opened this issue Jun 3, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@Selur
Copy link

Selur commented Jun 3, 2021

# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ResizeFilter/Waifu2x-cnn/vsw2xnvk.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2.dll")
# source: 'F:\TestClips&Co\files\test.avi'
# current color space: YUV420P8, bit depth: 8, resolution: 640x352, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading source using FFMS2
clip = core.ffms2.Source(source="F:/TestClips&Co/files/test.avi",cachefile="E:/Temp/avi_078c37f69bb356e7b5fa040c71584c40_853323747.ffindex",format=vs.YUV420P8,alpha=False)
# 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=clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# adjusting color space from YUV420P8 to RGBS for vsw2xnvk
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# resizing using Waifu2xNvk
# resizing to 1280x704
clip = core.w2xnvk.Waifu2x(clip=clip, scale=2, model=1)
# adjusting output color from: RGBS to YUV420P10 for x265Model (i420@8)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="470bg", range_s="limited")
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()

and
VSPipe.exe --info c:\Users\Selur\Desktop\test.vpy -
I get:

[0 NVIDIA GeForce GTX 1070 Ti]  queueC=2[8]  queueG=0[16]  queueT=1[2]
[0 NVIDIA GeForce GTX 1070 Ti]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 NVIDIA GeForce GTX 1070 Ti]  fp16-p/s/a=1/1/0  int8-p/s/a=1/1/1
[0 NVIDIA GeForce GTX 1070 Ti]  subgroup=32  basic=1  vote=1  ballot=1  shuffle=1
Width: 1280
Height: 704
Frames: 429
FPS: 25/1 (25.000 fps)
Format Name: YUV420P10
Color Family: YUV
Alpha: No
Sample Type: Integer
Bits: 10
SubSampling W: 1
SubSampling H: 1

and everything freezes.
replacing the vsw2xnvk.dll with the one from r3 everything works fine an no freezing.

Any idea what my cause this?
I'm a using Geforce GTX 1070ti 8GB VRAM (driver version 466.47) on Win10 x64 21H1 (19043.1023) with 32GB RAM and a Ryzen 7 1800x.
Is there some missing dependency for newer ncnn/vulkan I might lack on my system?

Cu Selur

Ps.: completely uninstalling and reinstalling the nvidia drivers didn't help either. (switching to 'Studio drivers' didn't either)

@Selur
Copy link
Author

Selur commented Jun 3, 2021

Just tested with r3.2:

  • vsedit can now open the script and preview the images (didn't work with 3.1)
  • closing vsedit causes a freeze
  • vspipe has the same behaviour (freezes)

@nlzy nlzy added the bug Something isn't working label Jun 3, 2021
@nlzy
Copy link
Owner

nlzy commented Jun 6, 2021

NCNN is already static linked in vsw2xnvk.dll, and Vulkan runtime is included in graphics card driver, no other dependency is required.

I can’t reproduce this issue on my computer. Based on your test result, I guess the problem is occurred in ncnn::destroy_gpu_instance(). Some NCNN user reported they have segfault in Vulkan API when NCNN implicit excuting ncnn::destroy_gpu_instance(), NCNN developer replied a workaround is call ncnn::destroy_gpu_instance() explicitly. And one of the changes in the R3.1 is to change the calling method from explicit to implicit.

Could you help me test this attachment?

w2xnvk-test.zip (SHA-256: 126ADEF0E0F4B1D5B80DCFF3E805A3F0CD91DD03F5455D846E7FBF8F36594A6C)

@Selur
Copy link
Author

Selur commented Jun 6, 2021

No problem, happy to help.
Tried the attached dll and this version works fine.
I can open the script without problems, as output I see:
during the opening I see:
begin ncnn::destroy_gpu_instance()
end ncnn::destroy_gpu_instance()
same output during closing.
Using vspipe works fine too.
Output looks as expected.

@nlzy nlzy closed this as completed in dda5dca Jun 11, 2021
@nlzy
Copy link
Owner

nlzy commented Jun 11, 2021

A new version is released.

Thanks for report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants