Selur's Little Message Board
Deoldify Vapoursynth filter - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Talk, Talk, Talk (https://forum.selur.net/forum-5.html)
+--- Forum: Small Talk (https://forum.selur.net/forum-7.html)
+--- Thread: Deoldify Vapoursynth filter (/thread-3595.html)



RE: Deoldify Vapoursynth filter - Selur - 27.05.2026

removed encode_mode and updated Hybrid_havc_test

Cu Selur


RE: Deoldify Vapoursynth filter - Dan64 - 28.05.2026

Hello Selur,

  using the R74 I compared the encoding speed of a 10min clip, using "core.num_threads = 1" vs  "core.num_threads = 0" (no limitation on threads count).
  Using only 1 thread I obtained a speed of about 5.28fps, while with no threads limitation I obtained a encoding speed of about 5.62 (see picture)

[Image: attachment.php?aid=3617]

  So in this case, using only 1 thread the speed decreased only of about 6%. But while in R74 the correct thread management is performed automatically, in R76 now this management is left to the user, that need to guess when is necessary or not. I hope there are no further "improvements" of this kind in the new R76, which have not yet been discovered.

Dan

P.S.
I'm going to the rename the github project "vs-deoldify" in "vs-havc" and to rename the package "vsdeoldify" in "vshavc", in the next days I will provide you the preview of "vshavc" package


RE: Deoldify Vapoursynth filter - Selur - 28.05.2026

Quote:Setting to a value less than one makes it default to the number of hardware threads.
source: https://amusementclub.github.io/doc3/pythonreference.html#Core.num_threads

Quote: I'm going to the rename the github project "vs-deoldify" in "vs-havc" and to rename the package "vsdeoldify" in "vshavc", in the next days I will provide you the preview of "vshavc" package
I'll adjust Hybrid accordingly when the time comes. Smile

Cu Selur


RE: Deoldify Vapoursynth filter - Selur - 28.05.2026

I'm uploading a new torch add-on and Hybrid dev, which should be online in ~1 1/2 hours.

Cu Selur


RE: Deoldify Vapoursynth filter - Dan64 - 28.05.2026

Hello Selur,

  I renamed the project as: vs-havc
  no need on your side to update to version v5.8.1

  I attached the new RC8 with the change of package's name.

  The simplest way to move to the new package's name is to manually rename in you packages library the folder "vs-deoldify" in "vs-havc" and to rename the subfolder "vsdeoldify" in "vshavc" and then to overwrite the folder "vshavc" with the one included in the attached archive.

  On Hybrid application side it will be necessary to change

import vsdeoldify as havc
  in
import vshavc as havc

  That's all.


Thanks,
Dan


RE: Deoldify Vapoursynth filter - Selur - 28.05.2026

the torch I uploaded included 5.8.1 and the dev already uses "import vshavc as havc"
will look at the new rc tomorrow


RE: Deoldify Vapoursynth filter - hallomanbh - 04.06.2026

[Image: 6cNjcJgJ]
# Imports
import sys
import os
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# loading plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/akarin/libakarin.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
import chromaBleeding
import vshavc as havc
import validate
# Source: 'C:\Users\CMusic\Downloads\Video\4K _Song.mp4'
# clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 25, color matrix: 709, color primaries: Unspecific, color transfer: BT.709, yuv luminance scale: limited, scanorder: progressive, full height: true (Source)
# Loading 'C:\Users\CMusic\Downloads\Video\4K _Song.mp4Ä using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/CMusic/Downloads/Video/4K _Song.mp4", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0)
frame = clip.get_frame(0)
# setting color matrix to 709.
clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709)
# setting color transfer (vs.TRANSFER_BT709), if it is not set.
if validate.transferIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709)
# setting color primaries info (to vs.PRIMARIES_BT709), if it is not set.
if validate.primariesIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709)
# setting color range to TV (limited) range.
prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange'
clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED})
# making sure frame rate is set to 25fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# making sure the detected scan type is set (detected: progressive)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive
original = clip
# adding colors using HAVC
clip = havc.HAVC_main(clip, ColorModel="DDColor(ModelScope)", DeepExMethod=0, DeepExRefMerge=0, ScFrameDir=None, DeepExModel=0, DeepExEncMode=0, DeepExMaxMemFrames=20)
# Fixing chroma bleeding using FixChromaBleedingMod
clip = chromaBleeding.FixChromaBleedingMod(clip, blur=True)
# adjusting output color from YUV420P8 to YUV420P10 for x265Model
original = core.resize.Bicubic(clip=original, format=vs.YUV420P10)
# adjusting output color from YUV420P8 to YUV420P10 for x265Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10)
original = core.text.Text(clip=original,text="Original",scale=2,alignment=7)
clip = core.text.Text(clip=clip,text="Filtered",scale=2,alignment=7)
stacked = core.std.StackHorizontal([original,clip])
# set output frame rate to 25fps (progressive)
stacked = core.std.AssumeFPS(clip=stacked, fpsnum=25, fpsden=1)
# output
stacked.set_output()
# stacked current meta; color space: YUV420P16, bit depth: 10, resolution: 3840x1080, fps: 25, color matrix: 709, color primaries: , color transfer: , yuv luminance scale: limited, scanorder: progressive, full height: true (Meta)
# script was created by Hybrid 2026.06.03.1
https://ibb.co/6cNjcJgJ[Image: 6cNjcJgJ]


RE: Deoldify Vapoursynth filter - Selur - 04.06.2026

Huh no context, what you want to say with this,..
(also: use 'code'-tags)


RE: Deoldify Vapoursynth filter - hallomanbh - 04.06.2026

NOT WORKING ( gray marked)


https://ibb.co/08TbrKJ


RE: Deoldify Vapoursynth filter - Selur - 04.06.2026

That is correct, and as intended.
Quote: Okay, I will keep CMNet2DiT disabled till it works with R76.
source: https://forum.selur.net/thread-4287-post-29733.html#pid29733