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
Started the server
F:\Hybrid\64bit\Vapoursynth\DiTServerRPC-main>.venv\Scripts\activate

(.venv) F:\Hybrid\64bit\Vapoursynth\DiTServerRPC-main> python dit_rpc_server.py --load-pipeline --pipeline-config qwen_config_int4.json
2026-05-26 19:51:08,854 [INFO] module_dir             : F:\Hybrid\64bit\Vapoursynth\DiTServerRPC-main
2026-05-26 19:51:08,854 [INFO] dit_colorize_main.py   : found
2026-05-26 19:51:08,854 [INFO] Loading pipeline from config: qwen_config_int4.json
2026-05-26 19:51:08,854 [INFO] Loading pipeline: nunchaku-qwen int4 r32 steps=4
Loading SVDQuant INT4 transformer from: nunchaku-ai/nunchaku-qwen-image-edit-2509/lightning-251115/svdq-int4_r32-qwen-image-edit-2509-lightning-4steps-251115.safetensors
The config attributes {'pooled_projection_dim': 768} were passed to NunchakuQwenImageTransformer2DModel, but are not expected and will be ignored. Please verify your config.json configuration file.
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 24.46it/s]
Loading pipeline components...: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:00<00:00,  6.17it/s]
Optimizing VRAM ...
F:\Hybrid\64bit\Vapoursynth\DiTServerRPC-main\.venv\Lib\site-packages\nunchaku\models\transformers\transformer_qwenimage.py:620: UserWarning: Skipping moving the model to GPU as offload is enabled
  warn("Skipping moving the model to GPU as offload is enabled", UserWarning)
2026-05-26 19:51:33,706 [INFO] Pipeline loaded successfully.
2026-05-26 19:51:33,706 [INFO] HAVC Colorize RPC Server listening on 127.0.0.1:8765
2026-05-26 19:51:33,706 [INFO] Press Ctrl+C to stop.
Loaded a 1h source in Hybrid.
Used:
clip = havc.HAVC_cmnet2dit(clip, encode_mode=1, max_memory_frames=10, dit_engine_params={"host": "127.0.0.1", "port": 8765, "model_precision": "int4"})
I created a job and started it (19:56).
I see no cpu or gpu usage and no additional output in the server terminal window.
After 3min, no cpu or gpu usage, no additional output in the server terminal window.
Is cmnet2dit even trying to connect multiple times to the server?
=> cmnet2dit doesn't work here.

Cu Selur

Ps.: also updated Hybrid_havc_test to the version I did use.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
I update DiTServerRPC now the client connection is logged.

But using your task manger what is your RAM and VRAM usage ?

could you provide the script used ?

Dan

P.S.
try to use the run_server script attached (already included in this post #1)


Attached Files
.zip   run_server.zip (Size: 1,51 KB / Downloads: 2)
Reply
script used was:
import ctypes
import sys
import os
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Limit frame cache to 48449MB
core.max_cache_size = 48449
# Import scripts folder
scriptPath = 'F:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("F:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
# loading plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/bwdif.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/sneedif/libsneedif.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/libeedi3vk.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/addnoise.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/mvtools.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/akarin/libakarin.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/zsmooth/zsmooth.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/DGDecNV/DGDecodeNV_AVX2.dll")
# Import scripts
import vsdeoldify as havc
import qtgmc
import validate
# Source: 'G:\TestClips&Co\files\MakeMKV\Ashes and Snow (Gregory Colbert) [2005, NTSC DVD5] MakeMKV.mkv'
# clip current meta; color space: YUV420P8, bit depth: 8, resolution: 720x480, fps: 24.204, color matrix: 470bg, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: top field first, full height: true (Source)
# Loading 'G:\TestClips&Co\files\MakeMKV\Ashes and Snow (Gregory Colbert) [2005, NTSC DVD5] MakeMKV.mkv' using DGSource
clip = core.dgdecodenv.DGSource("J:/tmp/2026-05-26@19_55_55_2610/2026-05-26@19_55_55_2610.dgi",fieldop=0) # 24.204 fps, scanorder: top field first
frame = clip.get_frame(0)
# setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT470_BG)
# setting color transfer (vs.TRANSFER_BT601), if it is not set.
if validate.transferIsInvalid(clip):
  clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT601)
# setting color primaries info (to vs.PRIMARIES_BT470_BG), if it is not set.
if validate.primariesIsInvalid(clip):
  clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT470_BG)
# 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 24.204fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=6051, fpsden=250)
# making sure the detected scan type is set (detected: top field first)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_TOP) # scan type: top field first
# Deinterlacing using QTGMC
clip = qtgmc.QTGMC(clip, Preset="Fast", TFF=True, opencl=True) # new fps: 48.408
# Making sure content is preceived as frame based
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive
# colorize using CMNet with external DiT (HAVC)
clip = havc.HAVC_cmnet2dit(clip, encode_mode=1, max_memory_frames=10, dit_engine_params={"host": "127.0.0.1", "port": 8765, "model_precision": "int4"})
# adjusting output color from YUV420P8 to YUV420P10 for NVEncModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10)
# set output frame rate to 48.408fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=6051, fpsden=125)
# output
clip.set_output()
# clip current meta; color space: YUV420P10, bit depth: 10, resolution: 720x480, fps: 48.408, color matrix: 470bg, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta)
# script was created by Hybrid 2026.05.26.1

Quote: But using your task manger what is your RAM and VRAM usage ?
RAM was around 20GB (still 40GB free and 16 GB used by the Python process of the server)
VRAM usage spiked on starting the server to around 15GB and then fell down to 2.8GB, when starting the job it goes up to 4.6 GB(short GPU usage and cpu usage spike), but then VRAM usage stays at 4.6GB and no GPU usage or gpu usage.

Stopped server again, updated the server part (git pull), restarted job, same effect small gpu&vram usage spike then nothing.
No additional output in server window.
I also monitored the local firewall nothing gets blocked by it.
In case it matters:
'pip list' in venv shows:
Package            Version
------------------ --------------------
accelerate         1.12.0
annotated-doc      0.0.4
anyio              4.13.0
certifi            2026.5.20
charset-normalizer 3.4.7
click              8.4.1
colorama           0.4.6
diffusers          0.37.0.dev0
einops             0.8.2
filelock           3.29.0
fsspec             2026.4.0
h11                0.16.0
hf-xet             1.5.0
httpcore           1.0.9
httpx              0.28.1
huggingface_hub    0.36.2
idna               3.16
importlib_metadata 9.0.0
Jinja2             3.1.6
markdown-it-py     4.2.0
MarkupSafe         3.0.3
mdurl              0.1.2
mpmath             1.3.0
networkx           3.6.1
numpy              2.4.4
nunchaku           1.2.1+cu12.8torch2.9
packaging          26.2
peft               0.19.1
pillow             12.2.0
pip                26.1.1
protobuf           7.35.0
psutil             7.2.2
Pygments           2.20.0
PyYAML             6.0.3
regex              2026.5.9
requests           2.34.2
rich               15.0.0
safetensors        0.8.0rc0
sentencepiece      0.2.1
setuptools         70.2.0
shellingham        1.5.4
sympy              1.14.0
tokenizers         0.22.2
torch              2.9.1+cu128
torchaudio         2.9.1+cu128
torchvision        0.24.1+cu128
tqdm               4.67.3
transformers       4.57.6
typer              0.25.1
typing_extensions  4.15.0
urllib3            2.7.0
zipp               4.1.0
'python -m pip list' in my normal env shows:
Package                     Version
--------------------------- ------------
addict                      2.4.0
annotated-types             0.7.0
antlr4-python3-runtime      4.9.3
anyio                       4.12.0
beautifulsoup4              4.14.3
blis                        1.3.3
Bottleneck                  1.6.0
catalogue                   2.0.10
certifi                     2025.11.12
charset-normalizer          3.4.4
click                       8.3.1
cloudpathlib                0.23.0
colorama                    0.4.6
coloredlogs                 15.0.1
confection                  0.1.5
contourpy                   1.3.3
cppimport                   22.5.10
cuda-pathfinder             1.5.4
cupy-cuda12x                14.0.1
cycler                      0.12.1
cymem                       2.0.13
distlib                     0.4.0
dlib                        20.0.0
einops                      0.8.1
fastai                      1.0.60
fastprogress                1.0.3
filelock                    3.29.0
flatbuffers                 25.12.19
fonttools                   4.61.1
fsspec                      2025.12.0
h11                         0.16.0
hf-xet                      1.2.0
httpcore                    1.0.9
httpx                       0.28.1
huggingface_hub             1.2.3
humanfriendly               10.0
idna                        3.11
ImageIO                     2.37.2
jetpytools                  2.2.2
Jinja2                      3.1.6
kiwisolver                  1.4.9
kornia                      0.8.2
kornia_rs                   0.1.10
lazy_loader                 0.4
lief                        0.17.6
llvmlite                    0.46.0
Mako                        1.3.12
markdown-it-py              4.0.0
MarkupSafe                  2.1.5
matplotlib                  3.10.8
mdurl                       0.1.2
ml_dtypes                   0.5.4
mmengine                    0.10.7
mpmath                      1.3.0
murmurhash                  1.0.15
networkx                    3.6.1
ninja                       1.13.0
numba                       0.63.1
numexpr                     2.14.1
numpy                       2.2.6
nvidia-cuda-runtime-cu12    12.9.79
nvidia-ml-py                13.595.45
nvidia-ml-py3               7.352.0
nvidia-modelopt             0.43.0
omegaconf                   2.3.0
onnx                        1.19.1
onnx_graphsurgeon           0.5.8
onnx-ir                     0.2.1
onnxconverter-common        1.16.0
onnxruntime-gpu             1.22.0
onnxscript                  0.7.0
onnxslim                    0.1.93
opencv-contrib-python       4.12.0.88
opencv-python               4.12.0.88
packaging                   26.0
pandas                      2.3.3
pillow                      12.0.0
pip                         26.1.1
platformdirs                4.5.1
polygraphy                  0.49.26
positional-encodings        6.0.4
preshed                     3.0.12
protobuf                    6.33.2
PuLP                        3.3.0
pybind11                    3.0.4
pydantic                    2.12.5
pydantic_core               2.41.5
Pygments                    2.19.2
pyparsing                   3.2.5
pyreadline3                 3.5.4
python-dateutil             2.9.0.post0
python-discovery            1.3.1
pytz                        2025.2
PyYAML                      6.0.3
regex                       2025.11.3
requests                    2.32.5
rich                        14.2.0
safetensors                 0.7.0
scikit-image                0.26.0
scipy                       1.16.3
setuptools                  82.0.1
shellingham                 1.5.4
six                         1.17.0
smart_open                  7.5.0
soupsieve                   2.8.1
spacy                       3.8.11
spacy-legacy                3.0.12
spacy-loggers               1.0.5
spatial_correlation_sampler 0.5.0
srsly                       2.5.2
sympy                       1.14.0
tensorrt                    10.9.0.34
tensorrt_cu12               10.9.0.34
tensorrt_cu12_bindings      10.9.0.34
tensorrt_cu12_libs          10.9.0.34
termcolor                   3.2.0
thinc                       8.3.10
tifffile                    2025.12.12
timm                        1.0.22
torch                       2.7.1+cu128
torch_tensorrt              2.7.0+cu128
torchvision                 0.22.1+cu128
tqdm                        4.67.1
typer-slim                  0.20.0
typing_extensions           4.15.0
typing-inspection           0.4.2
tzdata                      2025.3
urllib3                     2.6.2
VapourSynth                 76
vapoursynth-adaptivegrain   0.5.0
vapoursynth-akarin          1.4.1
vapoursynth-awarp           3.1
vapoursynth-bestsource      18.0
vapoursynth-bilateralgpu    14
vapoursynth-bm3d            10.1
vapoursynth-bwdif           5.1
vapoursynth-cranexpr        0.7.0
vapoursynth-d2vsource       1.4
vapoursynth-dctfilter       3.2
vapoursynth-deblock         8.1
vapoursynth-dedot           3.0
vapoursynth-descale         12
vapoursynth-descratch       4.0
vapoursynth-dghdrtosdr      1.17.post1
vapoursynth-dotkill         3.0
vapoursynth-edgefixer       2.1
vapoursynth-edgemasks       4.1
vapoursynth-eedi3           10.0
vapoursynth-fillborders     3.0
vapoursynth-fmtconv         31
vapoursynth-hysteresis      1.1.3
vapoursynth-iscombed        2.1
vapoursynth-knlmeanscl      1.3
vapoursynth-mvtools         27
vapoursynth-nlm-cuda        4
vapoursynth-nlm-ispc        3
vapoursynth-resize2         0.4.3
vapoursynth-sangnom         43.0
vapoursynth-sneedif         4.3
vapoursynth-subtext         6.0
vapoursynth-timecube        4.0
vapoursynth-vivtc           2.0
vapoursynth-vszip           14.1.0
vapoursynth-wnnm            3
vapoursynth-zit             1.3.3
vapoursynth-znedi3          3.0
vapoursynth-zsmooth         0.15.5
vs_colorfix                 2.0.0
vs-placebo                  2.0.2
vs_temporalfix              2.1.0
vsanimesr                   2.0.0
vsbasicvsrpp                3.0.0
vscodeformer                1.0.1
vsddcolor                   1.0.2
vsdeoldify                  5.8.0
vsdpir                      4.3.0
vsdrba                      1.0.2
vsfemasr                    2.0.0
vsgan                       1.6.4
vsgrlir                     1.1.1
vshinet                     1.0.0
vsjetpack                   1.0.0
vsmfdin                     1.0.0
vsnoise                     1.2.1
vspropainter                1.2.5
vsrealesrgan                5.2.1
vsrife                      5.6.0
vsrvrt                      1.1.3
vsscunet                    2.0.0
vsswinir                    2.0.0
vstools                     3.4.5
vsutil                      0.8.0
wasabi                      1.1.3
weasel                      0.4.3
wheel                       0.46.3
wrapt                       2.0.1
yapf                        0.43.0

=> going to bed now.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
Using your havc_test version the encodibg works.
The speed in fps is shown after about 3m43s.
But you should see at least the frames colorization on the server side.

If you don't see nothing this imply the client is not properly connected to the server, in the last tversionof DiTServer the client connections are logged.

Moreover my torch package version is different from the one that you are using.

On my PC is installed VapoursynthR74_torch_2026.04.21.7z and in this version is missing the plugins folder. My version is still looking for plugins in "vsfilters", but I don't think that this is the problem because the errors in loading the plugins are reported, but you don't see nothing, very strange  Huh

Try to delete the files cache *.pyc in vsdeoldify package, maybe there is some misalignment on complied python code.

Dan

I tested your configuration

PS D:\PProjects\DiTServerRPC> D:\PProjects\DiTServerRPC\.venv\Scripts\python.exe dit_rpc_server.py --load-pipeline --pipeline-config qwen_config_int4.json
2026-05-26 20:55:55,917 [INFO] module_dir             : D:\PProjects\DiTServerRPC
2026-05-26 20:55:55,917 [INFO] dit_colorize_main.py   : found
2026-05-26 20:55:55,918 [INFO] Loading pipeline from config: qwen_config_int4.json
2026-05-26 20:55:55,918 [INFO] Loading pipeline: nunchaku-qwen int4 r32 steps=4
Loading SVDQuant INT4 transformer from: nunchaku-ai/nunchaku-qwen-image-edit-2509/lightning-251115/svdq-int4_r32-qwen-image-edit-2509-lightning-4steps-251115.safetensors
The config attributes {'pooled_projection_dim': 768} were passed to NunchakuQwenImageTransformer2DModel, but are not expected and will be ignored. Please verify your config.json configuration file.
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 99.99it/s]
Loading pipeline components...: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:00<00:00,  7.56it/s]
Optimizing VRAM ...
D:\PProjects\DiTServerRPC\.venv\Lib\site-packages\nunchaku\models\transformers\transformer_qwenimage.py:620: UserWarning: Skipping moving the model to GPU as offload is enabled
  warn("Skipping moving the model to GPU as offload is enabled", UserWarning)
2026-05-26 20:56:15,379 [INFO] Pipeline loaded successfully.
2026-05-26 20:56:15,379 [INFO] HAVC Colorize RPC Server listening on 127.0.0.1:8765
2026-05-26 20:56:15,379 [INFO] Press Ctrl+C to stop.
2026-05-26 20:58:30,030 [INFO] Connection opened  127.0.0.1:53531
2026-05-26 20:58:30,032 [INFO] Connection opened  127.0.0.1:53532
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00,  2.06s/it]
D:\PProjects\DiTServerRPC\.venv\Lib\site-packages\diffusers\image_processor.py:148: RuntimeWarning: invalid value encountered in cast
  images = (images * 255).round().astype("uint8")
2026-05-26 20:58:42,149 [INFO] colorize_frame_shm: 12.10s
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00,  2.02s/it]
2026-05-26 20:58:56,530 [INFO] colorize_frame_pair_shm: 10.87s (5.44s/frame)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00,  2.02s/it]
2026-05-26 20:59:04,978 [INFO] colorize_frame_pair_shm: 8.13s (4.07s/frame)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00,  2.05s/it]
2026-05-26 20:59:13,452 [INFO] colorize_frame_pair_shm: 8.21s (4.10s/frame)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00,  2.03s/it]
2026-05-26 20:59:21,939 [INFO] colorize_frame_pair_shm: 8.16s (4.08s/frame)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00,  2.08s/it]
2026-05-26 21:01:11,130 [INFO] colorize_frame_pair_shm: 9.12s (4.56s/frame)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00,  2.03s/it]
2026-05-26 21:02:31,841 [INFO] colorize_frame_pair_shm: 8.43s (4.21s/frame)
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00,  2.03s/it]
2026-05-26 21:02:48,581 [INFO] colorize_frame_pair_shm: 8.35s (4.17s/frame)
2026-05-26 21:02:59,014 [INFO] Connection 127.0.0.1:53531 closed by the client (ConnectionResetError: [WinError 10054] Connessione in corso interrotta forzatamente dall'host remoto)
2026-05-26 21:02:59,014 [INFO] Connection 127.0.0.1:53532 closed by the client (ConnectionResetError: [WinError 10054] Connessione in corso interrotta forzatamente dall'host remoto)

using this script

# Imports
import sys
import os
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Limit frame cache to 16384MB
core.max_cache_size = 16384
# Import scripts folder
scriptPath = 'D:/Programs/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# loading plugins
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/SourceFilter/DGDecNV/DGDecodeNV_AVX2.dll")
# Import scripts
import vsdeoldify as havc
import validate
# Source: 'D:\PProjects\vs-deoldify_dev\samples\sample5\sample5_bw.mp4'
# clip current meta; color space: YUV420P8, bit depth: 8, resolution: 720x544, fps: 25, color matrix: 470bg, color primaries: Unspecific, color transfer: BT.709, yuv luminance scale: limited, scanorder: progressive, full height: true (Source)
# Loading 'D:\PProjects\vs-deoldify_dev\samples\sample5\sample5_bw.mp4' using DGSource
clip = core.dgdecodenv.DGSource("D:/PProjects/vs-deoldify_dev/samples/sample5/mp4_sample5_bw.dgi") # 25 fps, scanorder: progressive
frame = clip.get_frame(0)
# setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT470_BG)
# 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_BT470_BG), if it is not set.
if validate.primariesIsInvalid(clip):
  clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT470_BG)
# 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
# colorize using CMNet with external DiT (HAVC)
clip = havc.HAVC_cmnet2dit(clip, encode_mode=0, max_memory_frames=10, dit_engine_params={"host": "127.0.0.1", "port": 8765, "model_precision": "int4"})
# adjusting output color from YUV420P8 to YUV420P10 for x265Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10)
# set output frame rate to 25fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# output
clip.set_output()

But I noted that you was using the local version, not the remote version (encode_mode=0

Using the local version you need to decrease the max_memory_frames=2

clip = havc.HAVC_cmnet2dit(clip, encode_mode=1, max_memory_frames=2, dit_engine_params={"host": "127.0.0.1", "port": 8765, "model_precision": "int4"})

Using the local version with  max_memory_frames=10, the client window was plenty of messages like this

[DEBUG] VRAM low (791 MB free) at frame 406: sliding 70% of permanent memory
VRAM critical (0 MB free) at frame 407: rebuilding inference core (frame_count was 10/1000)
[DEBUG] VRAM low (799 MB free) at frame 417: sliding 70% of permanent memory
VRAM critical (0 MB free) at frame 418: rebuilding inference core (frame_count was 10/1000)
[DEBUG] VRAM low (837 MB free) at frame 428: sliding 70% of permanent memory
VRAM critical (0 MB free) at frame 429: rebuilding inference core (frame_count was 10/1000)
[DEBUG] VRAM low (831 MB free) at frame 439: sliding 70% of permanent memory
VRAM critical (0 MB free) at frame 440: rebuilding inference core (frame_count was 10/1000)
........


Please try using the remote version of HAVC_cmnet2dit()

clip = havc.HAVC_cmnet2dit(clip, encode_mode=0, max_memory_frames=10, dit_engine_params={"host": "127.0.0.1", "port": 8765, "model_precision": "int4"})


Thanks,
Dan
Reply
I attached the new (updated) RC7, main changes are:

   1) decreased the client connection timeout from 600sec to 60sec.
   2) removed the parameter encode_mode from HAVC_cmnet2dit(), only remote processing is supported due to the memory limitation of local approach

I suspect that there is something that is blocking the client/server connection on your side, with the new timeout it will be necessary to wait only 1min. before see a connection error, previously it was necessary to wait 10min.  

Dan


Attached Files
.zip   vsdeoldify-5.8.5_RC7.zip (Size: 641,36 KB / Downloads: 1)
Reply
I was able to reproduce your problem.

I installed VapoursynthR76_torch_2026.05.25.7z with R76 (shit!)

With the debugger I discovered that the filter is blocked by this piece of code 
for i in range(0, self.clip_buffer_size):
    frame = clip_sc.get_frame(i)                    <-- blocking code with i > 100
    if frame.props['_SceneChangePrev'] == 1:
      self.ref_num_list.append(start_frame + i)
      self.num_ref_imgs += 1

Inside the function RefImageReader2.get_clip_ref_list() in colormnet2_utils.py

There is nothing of special here, and in R74 (and older versions) this code is working perfectly and run in less than 1 second.
They're probably starting to use Artificial "Dementia" (stochastic code generators that seem to work), that introduced some kind of deadlock.

My suggestion: revert to R74 and stop to update VapourSynth for at least 10 years (when people will probably have forgotten about the existence of API3/API4).

There is nothing that I can do to solve this kind of VapourSynth's bug.

Dan
Reply
clip buffer size > 100 Huh
Probably related to https://github.com/vapoursynth/vapoursyn...66d6e29a12
did a quick test and lowering the thread count to 1 does seem to work here.

But I'm still unclear why instead of 6 now 12 reference frames are run through the server.
Also, I see:
2026-05-27 18:04:14,654 [INFO] Connection opened 127.0.0.1:12840
2026-05-27 18:04:14,656 [INFO] Connection opened 127.0.0.1:12841
why two connections?

-----
the coloring does cause chroma bleeding
[Image: grafik.png]
adding BleedOut helps a bit:
[Image: grafik.png]

----
updated Hybrid_havc_test with a version, that forces 1 thread when HAVC_cmnet2dit is used.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
(3 hours ago)Selur Wrote: clip buffer size > 100  Huh
Probably related to https://github.com/vapoursynth/vapoursyn...66d6e29a12
did a quick test and lowering the thread count to 1 does seem to work here.

But I'm still unclear why instead of 6 now 12 reference frames are run through the server.
Also, I see:
2026-05-27 18:04:14,654 [INFO] Connection opened  127.0.0.1:12840
2026-05-27 18:04:14,656 [INFO] Connection opened  127.0.0.1:12841
why two connections?

The two TCP connections are opened by the client. xmlrpc.client.ServerProxy creates a new TCP connection for each RPC call — in
the client, there are 2 (is_pipeline_loaded(), colorize_frame()). With HTTP/1.1 enabled on the server side, a connection already served can remain open idle
(keep-alive) waiting for a new request, even if the client transport closes it immediately after reading the response.
When the client terminates, all open TCP connections are closed by the operating system.
Each of the two remaining connections (those of is_pipeline_loaded() and colorize_frame()) produces its own ConnectionResetError. 
Hence the two messages for the connection opened/closed (no intentional division here). 

So you are using R76 with thread count = 1 ?, but this will slow-down the encoding. The best filters for VS are written using API3 and it seems absurd to me that the authors want to abandon them, I think it's either a bluff or that they're completely lost, one more reason to stay away from VS versions > R74. 

BleedOuts is VSGAN filter ?, don't knowing the original colors I cannot say if green is worse than brown, maybe in this context yes, but maybe in other context not.

I will test your new version with R74 (R76 is in the trash).

Dan

In the last test version

[Image: attachment.php?aid=3616]

the parameter Mode should be removed, because in the last RC7 (posted here), I removed encode_mode parameter (only remote CMNET2 processing will be supported).

please update the test version.

Thanks,
Dan


Attached Files Thumbnail(s)
   
Reply
Quote:So you are using R76 with thread count = 1 ?, but this will slow-down the encoding.
That depends on the used filters,...

Quote:BleedOuts is VSGAN filter ?,
.pth for VSGAN, .onnx for VSMLRT

Quote: don't knowing the original colors I cannot say if green is worse than brown, maybe in this context yes, but maybe in other context not.
left side is the original colors,... Smile
the color bleeding around the railing&co comes from the coloring and I wonder why. On clean clips there shouldn't really be a reason for color bleeding,...
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
Hello Selur,
  
   could you update the test version with the last RC7 (posted here)
   I removed encode_mode parameter (only remote CMNET2 processing will be supported).

Thanks,
Dan
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)