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.

Deoldify Vapoursynth filter
Hi NASS,

  Can you provide a small sample and the script used.

Dan

(6 hours ago)Selur Wrote: updated Hybrid_havc_test, which should update the tool-tips.

Cu Selur

Now, it's Okay.

It is missing only the too-tip for "Retry (threshold/model)" you can add:  
"If Retry (threshold) > 0, this value will be used to detect frames with insufficient permanent-memory coverage and in this case the frame with missing good references will be colorized on the fly, suggested value: 0 (disabled) or 0.20-0.35 . The colorization models can be:  
HAVC (Deoldify + DDColor)  #  fast, but the quality is not good if compared to DiT models 
DiT fp4/int4  (depending on GPU used) # very good quality but can slow-down the inference speed by about 40%-50%".

Thanks,
Dan
Reply
Hi Dan. Thanks so much for your reply. Here's the script in dev version ( Motion Distortion + Color jump ):
# 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/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
import vsdeoldify as havc
import validate
# Source: 'C:\Users\NASS\Desktop\outestny_restoredcolor.mp4'
# clip current meta; color space: YUV420P8, bit depth: 8, resolution: 960x720, fps: 24, color matrix: 709, color primaries: Unspecific, color transfer: BT.709, yuv luminance scale: limited, scanorder: progressive, full height: true (Source)
# Loading 'C:\Users\NASS\Desktop\outestny_restoredcolor.mp4Ä using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/NASS/Desktop/outestny_restoredcolor.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 24fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=24, 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
# adjusting color space from YUV420P8 to RGB24 for vsColorAdjust
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="709", range_in_s="limited", range_s="full")
# stabilize colors using ColorAdjust (HAVC)
clip = havc.HAVC_ColorAdjust(clip, BlackWhiteTune="light", BlackWhiteMode=6)
# adjusting output color from RGB24 to YUV420P8 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_in_s="full", range_s="limited")
# set output frame rate to 24fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=24, fpsden=1)
# output
clip.set_output()
# clip current meta; color space: YUV420P8, bit depth: 8, resolution: 960x720, fps: 24, color matrix: 709, color primaries: Unspecific, color transfer: BT.709, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta)
# script was created by Hybrid 2026.05.22.1

It’s a shame because this is a really great feature, but Motion Distortion Issue + Color jump affects the final result. We definitely need to find a solution!

Thanks so much Dan

NASS

In the original version (Hybrid_2026.03.21.1_SETUP) and VapoursynthR73_torch_2026.02.26 with the old colormnet, there is no color-jumping issue, but the major distortion problem remains.

# Imports
import vapoursynth as vs
# getting Vapoursynth core
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid2/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# loading plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid2/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid2/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
import vsdeoldify as havc
import validate
# Source: 'C:\Users\NASS\Desktop\LA\restoredcolor.mp4'
# Current color space: YUV420P8, bit depth: 8, resolution: 938x698, frame rate: 24fps, scanorder: progressive, yuv luminance scale: limited, matrix: 709, transfer: bt.709, primaries: bt.709, format: AVC
# Loading ' C:\Users\NASS\Desktop\LA\restoredcolor.mp4Ä using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:\Users\NASS\Desktop\LA\restoredcolor.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.
clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_LIMITED)
# making sure frame rate is set to 24fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=24, 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
# adjusting color space from YUV420P8 to RGB24 for vsColorAdjust
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="709", range_in_s="limited", range_s="full")
# stabilize colors using ColorAdjust (HAVC)
clip = havc.HAVC_ColorAdjust(clip, BlackWhiteTune="strong", BlackWhiteMode=6, Strength=1)
# adjusting output color from RGB24 to YUV420P8 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_in_s="full", range_s="limited") # additional resize to match target color sampling
# set output frame rate to 24fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=24, fpsden=1)
# output
clip.set_output()
# script was created by Hybrid 2026.03.21.1

Here are a few photos of the result with the distortion problem

https://drive.google.com/drive/folders/1...KwSv1D5ifD


Best

NASS
Reply
(5 hours ago)Dan64 Wrote: Hi NASS,

  Can you provide a small sample and the script used.

Dan


Hi! Can you provide a step-by-step workflow for using DITserver-based colorization? Also, can DITserver colorize new characters that appear in the same shot without altering the colors of the already colorized areas?
Reply
Hi Dan, thanks so much—with RC3, the colors are stable! Thanks.
Reply
Hi Selur,

  I attached the new RC4, it fix a bug introduced in RC3.
  This should be the last RC before the official release.

Dan


Attached Files
.zip   vsdeoldify-5.8.5_RC4.zip (Size: 641,38 KB / Downloads: 1)
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)