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.

Using Stable Diffision models for Colorization
#81
(09.06.2026, 14:38)Selur Wrote: LSMashSource => better use bs.VideoSource or lsmas.LWLibavSource

bs.VideoSource is still too slow.

I have never had any problems with this setting in Hybrid

[Image: attachment.php?aid=3623]

Dan

(09.06.2026, 15:34)safshe Wrote: I run gui by 

F:\AI_Works\DiTServerRPC>.\.venv\Scripts\activate

(.venv) F:\AI_Works\DiTServerRPC>python GUI\CMNET2_colorize_client_GUI.py

Using this approach the configuration file will be not read (I will update the README). Use this command

F:\AI_Works\DiTServerRPC>.\.venv\Scripts\activate (.venv) F:\AI_Works\DiTServerRPC>cd GUI (.venv) F:\AI_Works\DiTServerRPC>python CMNET2_colorize_client_GUI.py

But as suggested in the README, it is better

Desktop shortcut (optional)

You can create a desktop shortcut to launch the GUI without ever seeing a command prompt:
  1. Right-click on the desktop → New → Shortcut
  2. For the location, enter the full path to the .vbs file:
    D:\PProjects\DiTServerRPC\GUI\run_colorize_client_GUI.vbs

  1. Click Next, give the shortcut a name (e.g. CMNET2 Colorize Client)
  2. Click Finish
    (see example in the picture below)
To change the shortcut's icon:
  1. Right-click the new shortcut → Properties
  2. Click Change Icon...
  3. Browse to any .ico file on your system (or download one you like)
  4. Click OK twice


[Image: attachment.php?aid=3624]

The shortcut launches the GUI silently – the VBScript runs the .cmd wrapper in a hidden window.

Dan


Attached Files Thumbnail(s)
       
Reply
#82
(09.06.2026, 14:06)Dan64 Wrote: Regarding the missing colorization, this is very strange.
Did you check the folder "ref_qwen" ? this folder contains the colored images, while the B&W images are stored in "ref_tht10", please check them.

Dan

Hi Dan,
I'm also wondering where the problem might be. It's possible that one of the models was not installed correctly on my system.
I tested the same videos using the original DitServerRPC workflow and then with the new CMNET2 GUI workflow, and the difference in colorization quality is quite noticeable in some cases.
In particular, I noticed that on several videos the reference colorization seems to become weaker later in the clip, and in one case almost no colorization was applied at all. Because of that, I'm not sure whether the issue is related to my installation, the generated reference frames, or something else in the pipeline.
I uploaded the source video together with the results from both methods in case you would like to compare them.
It is entirely possible that the problem is on my side, so I'm not drawing any conclusions yet. I just wanted to provide the files in case they help identify what is happening.
Thanks for your work on the project.
Best regards

https://www.swisstransfer.com/d/5b9eb00c-b664-42df-8bfe-c7ccbd257dc
Reply
#83
(09.06.2026, 15:57)Dan64 Wrote: Using this approach the configuration file will be not read (I will update the README). Use this command

F:\AI_Works\DiTServerRPC>.\.venv\Scripts\activate (.venv) F:\AI_Works\DiTServerRPC>cd GUI (.venv) F:\AI_Works\DiTServerRPC>python CMNET2_colorize_client_GUI.py

But as suggested in the README, it is better

Still not working. I will explain what I did . Please tell me if I am doing anything wrong.

1. First I Run the "run_server_int4.cmd" on DiTServerRPC folder and got below window

DiT Colorize RPC Server
Backend    : Nunchaku INT4
Config      : F:\AI_Works\DiTServerRPC\config\qwen_nunchaku_int4.json
Listening on: 127.0.0.1:8765
Log file    : F:\AI_Works\DiTServerRPC\dit_server.log
============================================================

2026-06-09 20:16:47,010 [INFO] module_dir            : F:\AI_Works\DiTServerRPC
2026-06-09 20:16:47,010 [INFO] dit_colorize_main.py  : found
2026-06-09 20:16:47,010 [INFO] Loading pipeline from config: F:\AI_Works\DiTServerRPC\config\qwen_nunchaku_int4.json
2026-06-09 20:16:47,010 [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, 50.61it/s]
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 6/6 [00:01<00:00,  5.64it/s]
Optimizing VRAM ...
F:\AI_Works\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-06-09 20:17:13,868 [INFO] Pipeline loaded successfully.
2026-06-09 20:17:13,868 [INFO] HAVC Colorize RPC Server listening on 127.0.0.1:8765
2026-06-09 20:17:13,868 [INFO] Press Ctrl+C to stop.
2026-06-09 20:18:38,056 [INFO] Connection opened  127.0.0.1:5795




2. Then as you suggested, did below code

F:\AI_Works\DiTServerRPC>.\.venv\Scripts\activate

(.venv) F:\AI_Works\DiTServerRPC>cd GUI

(.venv) F:\AI_Works\DiTServerRPC>python CMNET2_colorize_client_GUI.py



Even tried the desktop shortcut method. Still same error
Reply
#84
Hi safshe,

  In the folder GUI should be a file called gui_cmnet2_settings.json.
  Could zip it and attach it in the next post, I need to see your configuration.

Thanks,
Dan
Reply
#85
Hi didris,

  for sure there are problems on your side.
  In the frames colorized with the old version of ditserverrpc there are artifacts (see image below)

  [Image: attachment.php?aid=3625]

  The new colorized frames, don't have artifacts, but are almost in B&W.

   At the following link you can find my results

   https://gofile.io/d/vRABBs

   As you will see there are no artifacts and the colors are more stable.

   I noted that your clip is 60fps this is a waste of frames, you have about 3X more frames to colorize, without any significant advantage.
   Please make you a favor and convert the clip to 25 fps, for this you can use HandBrake

    Please provide you configuration file:  gui_cmnet2_settings.json 
 
    Moreover provide the output of the following commands
    
PS D:\PProjects\DiTServerRPC_dev> .\.venv\Scripts\activate (.venv) PS D:\PProjects\DiTServerRPC_dev> pip list

(.venv) PS D:\PProjects\DiTServerRPC_dev> Get-CimInstance Win32_VideoController | Select-Object Name


Dan


Attached Files Thumbnail(s)
   
Reply
#86
(09.06.2026, 17:06)Dan64 Wrote: Hi safshe,

  In the folder GUI should be a file called gui_cmnet2_settings.json.
  Could zip it and attach it in the next post, I need to see your configuration.

Thanks,
Dan

Hu Dan, here it is

attachment=3626]


Attached Files
.zip   gui_cmnet2_settings.zip (Size: 826 bytes / Downloads: 5)
Reply
#87
Hi, Dan

I changed some settings and the result became much closer to yours.
The issue is that I'm trying to achieve maximum color saturation, since that's the main reason I'm colorizing these videos.
I've attached the file you requested. If you have time to look at it, I'd be interested to know whether the differences I'm seeing are caused by my settings, my installation, or something else in the workflow.

P.S. I noticed that when I increase the colorization/inference steps to 4–6, the model sometimes starts generating non-existent objects or details that were not present in the original footage.


Attached Files
.rar   gui_cmnet2_settings.rar (Size: 762 bytes / Downloads: 7)
Reply
#88
Hi safshe,

  your configuration is Ok.

  Try to run the following command

F:\AI_Works\DiTServerRPC>.\.venv\Scripts\activate (.venv) F:\AI_Works\DiTServerRPC>.\.venv\Lib\site-packages\vapoursynth\vspipe.exe -v

and let me know your output.

Dan
Reply
#89
(09.06.2026, 19:36)Dan64 Wrote: Hi safshe,

  your configuration is Ok.

  Try to run the following command

F:\AI_Works\DiTServerRPC>.\.venv\Scripts\activate (.venv) F:\AI_Works\DiTServerRPC>.\.venv\Lib\site-packages\vapoursynth\vspipe.exe -v

and let me know your output.

Dan

Please see the attached image.


Attached Files Thumbnail(s)
   
Reply
#90
(09.06.2026, 19:32)didris Wrote: I changed some settings and the result became much closer to yours.
The issue is that I'm trying to achieve maximum color saturation, since that's the main reason I'm colorizing these videos.
I've attached the file you requested. If you have time to look at it, I'd be interested to know whether the differences I'm seeing are caused by my settings, my installation, or something else in the workflow.

P.S. I noticed that when I increase the colorization/inference steps to 4–6, the model sometimes starts generating non-existent objects or details that were not present in the original footage.

The problem is that if you ask to Qwen to improve the colors is some case it can add artifacts, for example this prompt: " "Colorize this black and white photo with realistic, vibrant colors while preserving skin tones. Strictly preserve all shapes, edges and background details." can produce images like this

[Image: attachment.php?aid=3629]

or this

[Image: attachment.php?aid=3630]

where the background is totally invented.

My prompt will provide more conservative colors, but will force Qwen to provide more consistent colors. You can try to experiment different prompts, but the risk of obtain artifacts is very high.

If you want to try to improve the quality try these settings:

[Image: attachment.php?aid=3631]

if you have a RTX50 GPU, run the server in fp4 mode because the fp4 quantization is better and should reduce the risk of artifacts.

Dan


Attached Files Thumbnail(s)
           
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)