2 hours ago
The preview is not the right way to test this filter, because the underlying task is slow, while the preview expects almost real-time processing.
For example before running this code, using max_memory_frames=10
You need to wait that the server is fully loaded as shown below
After that you can ask for the preview.
Before the preview window will be visible, on client side will be performed the following tasks:
1) the clip is parsed to create the reference image list (on my side, on a clip with 2544 frames this task requires about 80sec)
2) colorize 5 pairs (on my side this activity requires about 74sec)
After that you finally will see the preview window, and on the client window you will se the following message
If you run play you will see the colorized frames, with some long interruption due to the need to ask to the server to colorize other reference frames.
As you can see the preview for this filter is not very useful, you should disable it, or if you want keep it you should force the preview with a limited number of reference frame (for example 2 or 4) and show an overly text that advise the user the the preview is very slow and limited to 2 or 4 reference frames.
The best way to use this filter is just encode the clip and wait for the encode to be completed.
Dan
P.S.
On your hardware I expect that this pipeline should work just fine, but don't expect miracles in the preview (better advise the users of this limitation)
You should remove the double quote
The two messages correspond to two TCP connections 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.
This is not a problem — it's the expected behavior when using the HTTP/1.1 protocol.
Dan
For example before running this code, using max_memory_frames=10
# colorize using CMNet with external DiT (HAVC)
clip = havc.HAVC_cmnet2dit(clip, render_speed="auto", render_vivid=False, sc_thresh=0.035, sc_tht_ssim=0.80, sc_min_int=25, sc_tht_offset=2, sc_min_freq=0, encode_mode=0, max_memory_frames=10, dit_engine_params={"host": "127.0.0.1", "port": 8765, "model_precision": "fp4"}, retry_threshold=0.00)You need to wait that the server is fully loaded as shown below
============================================================
DiT Colorize RPC Server
Precision : fp4
Config : D:\PProjects\DiTServerRPC\qwen_config_fp4.json
Listening on: 127.0.0.1:8765
Log file : D:\PProjects\DiTServerRPC\dit_server.log
============================================================
2026-05-25 18:28:01,828 [INFO] module_dir : D:\PProjects\DiTServerRPC
2026-05-25 18:28:01,828 [INFO] dit_colorize_main.py : found
2026-05-25 18:28:01,828 [INFO] Loading pipeline from config: D:\PProjects\DiTServerRPC\qwen_config_fp4.json
2026-05-25 18:28:01,828 [INFO] Loading pipeline: nunchaku-qwen fp4 r32 steps=4
Loading SVDQuant FP4 transformer from: nunchaku-ai/nunchaku-qwen-image-edit-2509/lightning-251115/svdq-fp4_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, 21.28it/s]
Loading pipeline components...: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:01<00:00, 4.68it/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-25 18:29:32,546 [INFO] Pipeline loaded successfully.
2026-05-25 18:29:32,546 [INFO] HAVC Colorize RPC Server listening on 127.0.0.1:8765
2026-05-25 18:29:32,546 [INFO] Press Ctrl+C to stop.After that you can ask for the preview.
Before the preview window will be visible, on client side will be performed the following tasks:
1) the clip is parsed to create the reference image list (on my side, on a clip with 2544 frames this task requires about 80sec)
2) colorize 5 pairs (on my side this activity requires about 74sec)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00, 2.06s/it]
2026-05-25 18:31:32,458 [INFO] colorize_frame_pair_shm: 38.22s (19.11s/frame)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:04<00:00, 2.13s/it]
2026-05-25 18:31:50,511 [INFO] colorize_frame_pair_shm: 10.44s (5.22s/frame)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:03<00:00, 1.94s/it]
2026-05-25 18:31:58,968 [INFO] colorize_frame_pair_shm: 8.15s (4.08s/frame)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:03<00:00, 1.94s/it]
2026-05-25 18:32:07,565 [INFO] colorize_frame_pair_shm: 8.22s (4.11s/frame)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:03<00:00, 1.94s/it]
2026-05-25 18:32:16,147 [INFO] colorize_frame_pair_shm: 8.28s (4.14s/frame)After that you finally will see the preview window, and on the client window you will se the following message
2026-05-25 18:32:18.198
Start CMNET2 server, listening on : ('127.0.0.1', 55752)If you run play you will see the colorized frames, with some long interruption due to the need to ask to the server to colorize other reference frames.
As you can see the preview for this filter is not very useful, you should disable it, or if you want keep it you should force the preview with a limited number of reference frame (for example 2 or 4) and show an overly text that advise the user the the preview is very slow and limited to 2 or 4 reference frames.
The best way to use this filter is just encode the clip and wait for the encode to be completed.
Dan
P.S.
On your hardware I expect that this pipeline should work just fine, but don't expect miracles in the preview (better advise the users of this limitation)
You should remove the double quote
set LOGFILE=F:\dit_server.log"(11 hours ago)Selur Wrote: Something is still not okay with the communication. Since both the Python and the VapourSynth Viewer process ar at 0& cpu&gpu, I killed the VapourSynthViewer process.
Then I saw:
(isn't one time enough?):02,360 [INFO] Connection 127.0.0.1:7423 closed by the client (ConnectionResetError: [WinError 10054] Eine vorhandene Verbindung wurde vom Remotehost geschlossen)
2026-05-25 09:22:02,360 [INFO] Connection 127.0.0.1:7424 closed by the client (ConnectionResetError: [WinError 10054] Eine vorhandene Verbindung wurde vom Remotehost geschlossen)
The two messages correspond to two TCP connections 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.
This is not a problem — it's the expected behavior when using the HTTP/1.1 protocol.
Dan

