Using Color Match with ComfyUI  「色味を統一する」

11/08/2025

AI ComfyUI WAN



in English

There is a custom node called "Color Match" that can match the colors of different images.

This is useful when generating AI videos over a WAN, so we will introduce how to use it.


1. Basic usage

The Color Match node is included in KJNodes. If you want to use it with ComfyUI, please install KJNodes.

kijai/ComfyUI-KJNodes: Various custom nodes for ComfyUI

kijai/ComfyUI-KJNodes: Various custom nodes for ComfyUI

Various custom nodes for ComfyUI. Contribute to kijai/ComfyUI-KJNodes development by creating an account on GitHub.


First, let's take a look at what it is.

The Color Match node connects two images and outputs one image, as shown below.


The Color Match node processes the color of the image_target image to match the color of the image_ref.

Here are the results of doing this:


The image turned out to be quite whitish.

Changing the method and strength of the Color Match node will change the results. For example, if you set the strength to 0.25, you will get the image on the left below. The image on the right is the original image.

 


2. How to use it for video generation

When you generate a video, the color at the start of the video may differ from the color at the end of the video.

In particular, when generating a looping video using I2V, there are often color differences between the start and end. I've heard that the color changes are caused by the faster LoRA. Below is an example.


Aside from the fact that it's a bit creepy, the color at the end of the loop is quite different from the beginning, making it very obvious where the loop ends.


Incidentally, looping videos can be created by applying FLF2V (I2V, which prepares images for the start and end frames). All you need to do is use the same image for both the start and end frames.

I have written an article in the past on how to use FLF2V, so please refer to it.

WAN Video Start image to End image with ComfyUI "I2V using two images"

WAN Video Start image to End image with ComfyUI "I2V using two images"

in English WAN Video's Image to Video (I2V) can also generate videos by specifying the start and end images. By being able to determine the ...


Now, let's add a Color Match node to the video creation workflow we used earlier.


As shown in the image, it is inserted before the final output. By connecting the image used in FLF2V to ref_image, each generated frame will be as close to that color as possible until the end.

The video actually generated is shown on the left, and the video on the right is without Color Match.

 


In this way, it is difficult to see where the loop ends.

However, as you can see from the video, the one that uses the Color Match node has a transition where the color changes and then returns to the original color halfway through the video. If you don't loop it, the video that doesn't use the Color Match node has a smoother transition in color.

This may be improved by adjusting the node settings.



日本語解説(in Japanese)

異なる画像の色味を合わせることができる「Color Match」というカスタムノードがあります。

WANなどでAI動画生成をする場合に有用なので、使い方を紹介します。


1.基本的な使い方

Color Match ノードは KJNodes に含まれています。ComfyUI で使用する場合は KJNodes を導入してください。

kijai/ComfyUI-KJNodes: Various custom nodes for ComfyUI

kijai/ComfyUI-KJNodes: Various custom nodes for ComfyUI

Various custom nodes for ComfyUI. Contribute to kijai/ComfyUI-KJNodes development by creating an account on GitHub.


まずはどんなものなのか見てみましょう。

Color Match ノードは以下のように、二つの画像を接続し、一つの画像を出力します。


Color Match ノードは image_target の画像の色味を image_ref に寄せる処理をします。

これを実行した結果がこちらです。


大分白っぽい画像になりました。

Color Match ノードの method や strength を変えると、結果が変わります。例えば strength を0.25にすると以下の左画像のようになります。右は元の画像です。



2.動画生成での使い方

動画生成をすると、動画開始時の色味と動画終了時の色味が変わる場合があります。

特にI2Vでループ動画を生成すると、開始時と終了時の色差ができる場合が多いようです。色の変化は高速化LoRAが影響しているとの話も聞きます。以下がその例です。


若干不気味な動画になっていることは置いておいて、ループの最後の色が最初と大分違うため、ループの切れる位置が目立ちます。


ちなみにループ動画はFLF2V(開始フレームと終了フレームの画像を用意するI2V)の応用で作ることができます。開始・終了フレームの画像をどちらも同じ画像にすればいいだけです。

FLF2Vのやり方は過去に記事にしていますので、参照ください。

WAN Video Start image to End image with ComfyUI  「画像を2枚使ってI2Vする」

WAN Video Start image to End image with ComfyUI  「画像を2枚使ってI2Vする」

in English WAN Video's Image to Video (I2V) can also generate videos by specifying the start and end images. By being able to determine the ...


それでは先ほどの動画を作るワークフローに Color Match ノードを追加します。


画像のように、最後の出力の手前に挟みます。ref_image にFLF2Vで使う画像を接続することで、生成される各フレームを最後までその色味に近づけるようにしています。

実際に生成された動画が左になります。右は Color Match 無しの動画です。


このようにループの切れ目は分かりにくくなりました。

しかし動画をみればお分かりのとおり、Color Match ノードを使用したほうは動画の途中で色が変化し、また元に戻る変遷をたどっています。もしループをしない場合は、Color Match ノードを使用しない動画のほうが色味の変遷は滑らかです。

この辺はノードの設定を調整すればマシになるかもしれません。


Ko-fi

Major Contents

Contact us

名前

メール *

メッセージ *

QooQ