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.

Improving CodeFormer videos
#30
(13.02.2024, 21:00)Selur Wrote: Does it work if the files from Hybrid\64bit\Vapoursynth\torch_dependencies\bin are used?
(not planing to install the CUDA SDK)

I'm using the Hybrid environment which should be based on CUDA 12.x, and the filter is using that libraries.
CUDA is backward compatible with the previous versions and so CUDA 11.4 is a good starting point. 
To be sure I renamed the folder with my SDK installation (which was necessary to compile dblib) in


'C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.4
 
and the filter worked perfectly, so my answer to your question is that the Hybrid\64bit\Vapoursynth\torch_dependencies\bin.
I'm not sure if during the installation of the wheel python checks the existence of the libraries. But given that "python" is very lazy on this kind of controls, I expect that the installation should proceed smoothly.

Dan

Hello Selur,

  the fixing of CUDA problem, raised another issue.
  There are situations (or clips) where VSpipe fails to fully encode the movie.
  The error is the following:

  Error: fwrite() call failed when writing frame: xxx, plane: 0, errno: 32

  I was unable to fix this issue.  

  This problem started to happen when I enabled CUDA in dlib.

  I suspect that some library raise some kind of error.

  I tried to fix the problem by adding to the script the following code

  
# Blind Face Restoration using CodeFormer
from vscodeformer import codeformer as CodeFormer
try:
   clipEx = CodeFormer(clip=clip, upscale=1, detector=1, weight=1.0, num_streams=1) # 720x390
except Exception as e:
   vs.core.log_message(2,'Codeformer Error: ' + str(e))
   clipEx = CodeFormer(clip=clip, upscale=1, detector=0, weight=1.0, num_streams=1)
finally:
   clip = clipEx

  maybe the error is raised before or after I not checked all the code.

  But what is really strange is that using "VsViewer" to encode the same video, the encoding proceed smoothly.

  I obtained the same result using the original Codeformer script: 
inference_codeformer.py

  So It seems that the problem is limited to VSpipe.
  But given that also "VsViewer" is using the "pipes" to perform the encoding I expected to see the same problem on "VsViewer".

  I know that you worked on "VsViewer", maybe this the reason why "VsViewer"  is working better that "VSpipe". Smile
  Do you have any idea on how the problem can be fixed ?

  It is theoretically possible to extend "VsViewer" so that can be launched using the command line like "VSpipe" ?

  I guess that "VsViewer" is more robust because the "pipe" is directly controlled by the program, while with "VSpipe" is the OS that control the pipe.

  I attached an archive containing:

    1) the script used
    2) the clip used
    3) the log.

  I hope that this can help.

Thanks,
Dan
Reply


Messages In This Thread
Improving CodeFormer videos - by Dan64 - 06.02.2024, 19:59
RE: Improving CodeFormer videos - by Selur - 06.02.2024, 20:08
RE: Improving CodeFormer videos - by Dan64 - 06.02.2024, 21:28
RE: Improving CodeFormer videos - by Selur - 07.02.2024, 15:37
RE: Improving CodeFormer videos - by Dan64 - 07.02.2024, 17:01
RE: Improving CodeFormer videos - by Selur - 07.02.2024, 17:04
RE: Improving CodeFormer videos - by Dan64 - 07.02.2024, 17:23
RE: Improving CodeFormer videos - by Selur - 07.02.2024, 17:48
RE: Improving CodeFormer videos - by Dan64 - 07.02.2024, 18:43
RE: Improving CodeFormer videos - by Selur - 07.02.2024, 19:43
RE: Improving CodeFormer videos - by Dan64 - 07.02.2024, 20:18
RE: Improving CodeFormer videos - by Selur - 07.02.2024, 20:20
RE: Improving CodeFormer videos - by Dan64 - 08.02.2024, 00:41
RE: Improving CodeFormer videos - by Selur - 08.02.2024, 05:47
RE: Improving CodeFormer videos - by Dan64 - 08.02.2024, 18:35
RE: Improving CodeFormer videos - by Selur - 08.02.2024, 19:09
RE: Improving CodeFormer videos - by Selur - 08.02.2024, 20:08
RE: Improving CodeFormer videos - by Dan64 - 09.02.2024, 19:04
RE: Improving CodeFormer videos - by Selur - 09.02.2024, 19:20
RE: Improving CodeFormer videos - by Selur - 09.02.2024, 19:44
RE: Improving CodeFormer videos - by Dan64 - 10.02.2024, 00:32
RE: Improving CodeFormer videos - by Dan64 - 10.02.2024, 11:27
RE: Improving CodeFormer videos - by Selur - 10.02.2024, 11:43
RE: Improving CodeFormer videos - by Dan64 - 10.02.2024, 19:21
RE: Improving CodeFormer videos - by Selur - 10.02.2024, 19:37
RE: Improving CodeFormer videos - by Dan64 - 10.02.2024, 20:02
RE: Improving CodeFormer videos - by Selur - 11.02.2024, 16:57
RE: Improving CodeFormer videos - by Dan64 - 12.02.2024, 22:11
RE: Improving CodeFormer videos - by Selur - 13.02.2024, 21:00
RE: Improving CodeFormer videos - by Dan64 - 13.02.2024, 21:51
RE: Improving CodeFormer videos - by Selur - 13.02.2024, 22:31
RE: Improving CodeFormer videos - by Dan64 - 13.02.2024, 23:53
RE: Improving CodeFormer videos - by Dan64 - 14.02.2024, 01:05
RE: Improving CodeFormer videos - by Selur - 14.02.2024, 06:40
RE: Improving CodeFormer videos - by Dan64 - 14.02.2024, 09:26
RE: Improving CodeFormer videos - by Selur - 14.02.2024, 09:37
RE: Improving CodeFormer videos - by Dan64 - 14.02.2024, 09:40
RE: Improving CodeFormer videos - by Selur - 14.02.2024, 09:42
RE: Improving CodeFormer videos - by Dan64 - 14.02.2024, 10:19
RE: Improving CodeFormer videos - by Selur - 14.02.2024, 10:22
RE: Improving CodeFormer videos - by Dan64 - 14.02.2024, 10:24
RE: Improving CodeFormer videos - by Selur - 14.02.2024, 16:40
RE: Improving CodeFormer videos - by Selur - 14.02.2024, 18:52
RE: Improving CodeFormer videos - by Dan64 - 14.02.2024, 21:32
RE: Improving CodeFormer videos - by Selur - 14.02.2024, 21:37
RE: Improving CodeFormer videos - by Dan64 - 14.02.2024, 21:37
RE: Improving CodeFormer videos - by Selur - 14.02.2024, 21:38
RE: Improving CodeFormer videos - by Dan64 - 14.02.2024, 21:40
RE: Improving CodeFormer videos - by Selur - 14.02.2024, 21:45
RE: Improving CodeFormer videos - by Dan64 - 14.02.2024, 21:48
RE: Improving CodeFormer videos - by Dan64 - 15.02.2024, 04:33
RE: Improving CodeFormer videos - by Selur - 15.02.2024, 06:28
RE: Improving CodeFormer videos - by Dan64 - 15.02.2024, 18:44
RE: Improving CodeFormer videos - by Selur - 15.02.2024, 19:02
RE: Improving CodeFormer videos - by Dan64 - 15.02.2024, 22:47
RE: Improving CodeFormer videos - by Selur - 16.02.2024, 05:33
RE: Improving CodeFormer videos - by Dan64 - 16.02.2024, 07:41
RE: Improving CodeFormer videos - by Dan64 - 16.02.2024, 19:01
RE: Improving CodeFormer videos - by Selur - 16.02.2024, 19:15
RE: Improving CodeFormer videos - by Selur - 16.02.2024, 19:31
RE: Improving CodeFormer videos - by Dan64 - 16.02.2024, 21:23
RE: Improving CodeFormer videos - by Selur - 16.02.2024, 21:42
RE: Improving CodeFormer videos - by Dan64 - 18.02.2024, 12:33
RE: Improving CodeFormer videos - by Selur - 18.02.2024, 13:05
RE: Improving CodeFormer videos - by Dan64 - 18.02.2024, 13:28
RE: Improving CodeFormer videos - by Selur - 18.02.2024, 13:38
RE: Improving CodeFormer videos - by Dan64 - 18.02.2024, 20:19
RE: Improving CodeFormer videos - by Selur - 18.02.2024, 20:23
RE: Improving CodeFormer videos - by Dan64 - 25.02.2024, 18:55
RE: Improving CodeFormer videos - by Selur - 25.02.2024, 19:12
RE: Improving CodeFormer videos - by Dan64 - 01.03.2024, 20:20
RE: Improving CodeFormer videos - by Selur - 01.03.2024, 20:24
RE: Improving CodeFormer videos - by Dan64 - 11.06.2024, 19:01
RE: Improving CodeFormer videos - by Selur - 11.06.2024, 19:02
RE: Improving CodeFormer videos - by Selur - 12.06.2024, 06:52

Forum Jump:


Users browsing this thread: 7 Guest(s)