見出し画像

【画像生成AI】 どれだけイラストを描き直す? denoise と scheduler の意味を知る

はじめに

こんにちは、きまま / Easygoing です。

今日は、イラストを描き直す image to image について見ていきます。

An anime-style illustration featuring a young man with red hair and blue eyes, wearing a tactical outfit with a high collar and a utility vest. He is depicted with a slight smile, looking over his shoulder against a dark, starry night sky with glowing circular lights in the background.

text to image と image to image

画像生成は、大きく分けて次の2つがあります。

  • text to image:文章からイラストを生成

  • image to image:画像からイラストを生成

text to image は、描きたいものを文章(プロンプト)で打ち込んでイラストを生成します。

An anime-style illustration of a young man with vibrant red hair and striking blue eyes, wearing a sleek, dark tactical outfit with a high collar and black harness straps. The background features a warm, glowing ambiance with scattered golden bokeh lights, creating a dramatic and dynamic atmosphere.

それに対して、image to image は 画像を入力してイラストを修正 する方法で、denoise という強度を調節することで、イラストを軽く修正したり、あるいは大きく描き変えたりするなど、さまざまな使い方をすることができます。

ワークフローの紹介!

今回は、text to image と image to image の両方を行うワークフローを使ってみます。

このワークフローでは、バリエーションの豊かな SDXL で原画を描いて、質感の高い Flux.1 で仕上げを行います。

A flowchart illustrating the image-to-image generation process, showing two main steps: first, creating an original anime-style illustration using the SDXL model, followed by refining the image with the Flux.1 model to enhance texture and clarity. The chart uses arrows to depict the sequential workflow from SDXL to Flux.1, as described in the Article.
A screenshot of a ComfyUI workflow for image-to-image generation, displaying a node-based interface with interconnected modules for SDXL and Flux.1 models. The workflow includes nodes for input image loading, SDXL model processing, Flux.1 refinement, and output generation, with parameters like denoise strength visible. This setup illustrates the blog's described process for creating and refining anime-style illustrations.

使用モデル

軽量版はこちら

実際のイラスト

それでは、実際のイラストを見てみます。

SDXL(原画)

An anime-style illustration generated by the SDXL model, depicting a young man with red hair and blue eyes in a tactical outfit with a high collar. The image has a slightly rough texture with noticeable noise, particularly in the dark background with starry lights, showcasing SDXL's output before refinement, as discussed in the article.
SDXL 1024 x 1024

SDXL は、きれいな アニメイラスト を 多彩な構図 で出力することができます。

ただし、最新のモデルと比べるとノイズ除去の効率が今ひとつなので、質感がやや劣り、完成したイラストに少し ノイズ が残って しまいます。

Flux.1(仕上げ)

An anime-style illustration refined by the Flux.1 model, showing a young man with vibrant red hair and blue eyes in a sleek tactical outfit. Compared to the SDXL original, the image has enhanced clarity, smoother textures, and reduced noise, with a vivid starry background and glowing bokeh lights, demonstrating Flux.1's image-to-image refinement capabilities as described in the article.
Flux.1 1448 x 1448

先ほどの SDXL の原画に対して、Flux.1 を使って image to image の処理を行いました。

image to image を行うことで 全体の質感が上がり、ノイズが少ない クリアーなイラストが完成しました。

denoise は、ノイズを加える!

image to image では、画像を再描画する強さを決める denoise というパラメータを設定します。

denoise は日本語にすると「ノイズ除去」と訳されますが、実際は ノイズを加える 処理に当たります。

denoise を 0.5 に設定すると、イラストの半分を描き変えることを意味しますが、実際はどのようなことを行っているのでしょうか?

text to image の場合

text to imageでは、イラストを完全に新しく作るので denoise を 1.0 に設定します。

例として、denoise を 1.0 に設定して karras スケジューラーで 10 step の画像生成を行うと、ノイズは次のように除去されていきます。

A line graph illustrating the noise reduction process of the karras scheduler in text-to-image generation with denoise set to 1.0 over 10 steps. The x-axis represents the steps, and the y-axis shows sigma (noise level), with a steep initial drop followed by a gradual decrease, as explained in the blog's discussion on noise control.

ノイズは 最初に急激に減少  して、後半はなだらか に減っていきます。

Image to Image の場合

次に Image to Image で denoise を 0.5 に設定した場合を見てみます。

結果は先ほどのグラフの右側に寄せて、色付きで表示してみます。

A line graph comparing noise reduction in text-to-image (denoise 1.0) and image-to-image (denoise 0.5) generation using the karras scheduler. The x-axis shows steps, and the y-axis represents sigma (noise level). The image-to-image curve starts at a lower noise level, resembling the latter half of the text-to-image curve, as discussed in the blog's explanation of denoise effects.

denoise を 0.5 に設定したグラフは、先ほどの denoise が 1.0 のグラフの 右側部分 に似ています。

denoise はノイズ全体のレベルを一様に下げるのではなく、ノイズの分布の後半部分 を使うことになるのです。

image to image は scheduler で大きく変わる!

前回の記事では、denoise が 1.0 のときの scheduler の違いを比較しました。

denoise 1.0, 10 steps

A table listing sigma values for 10-step image generation in ComfyUI, comparing multiple schedulers (e.g., karras, beta) with denoise set to 1.0. Each row corresponds to a step, and columns display sigma (noise level) for each scheduler, illustrating their noise reduction patterns as discussed in the blog.
A line graph comparing sigma (noise level) values across multiple schedulers (e.g., karras, beta) for 10-step image generation with denoise set to 1.0. The x-axis represents steps, and the y-axis shows sigma values, with each scheduler plotted in distinct colors to highlight their noise reduction differences, as discussed in the blog.

denoise が 1.0 のときは、全ての scheduler が 同じノイズの最大値 からスタートしていました。

denoise 0.5, 5 steps

それに対して、denoise を 0.5 に設定した場合は 開始時点のノイズの量 が scheduler によって大きく違ってきます。

A table showing sigma values for 5-step image-to-image generation in ComfyUI with denoise set to 0.5, comparing schedulers like karras and beta. Each row represents a step, and columns list sigma (noise level) values, highlighting how different schedulers start with varying noise levels, as explained in the article.
A line graph comparing sigma (noise level) values for 5-step image-to-image generation with denoise set to 0.5, using schedulers like karras and beta in ComfyUI. The x-axis shows steps, and the y-axis represents sigma values, with each scheduler plotted in distinct colors to illustrate varying starting noise levels and their impact on image refinement, as discussed in the article.

ノイズの量が変わると、イラストを描き換える強さ も変わります。

image to image の場合は、text to image よりも scheduler の違い がずっと強く現れてくるのです。

どの scheduler を使えばいい?

それでは、image to image ではどの scheduler を使えばよいのでしょうか?

前回は、text to image で次の 2つの scheduler をオススメしました。

  • SD1.5 / SDXL で高速生成 → karras

  • 新世代モデルでディティールを上げる → beta

image to image でも、基本的な考え方は同じです。

イラストを速く安定して生成したい場合は karras、新世代モデルを使って大きく描き換えたいときは beta scheduler が良いと思います。

image to image は scheduler による変化 が大きく、また モデルごとの相性 もあるので、慣れてきたら denoise と scheduler をいろいろ変えて、最適な組み合わせを探してみるのが良いでしょう。

まとめ:denoise はノイズを足す!

  • denoise は描き換える強さ

  • denoise はノイズを足す

  • scheduler で大きく変わる

画像生成 AI は、ノイズからイラストを生成します。

画像生成 AI が登場して以降、ノイズを制御するために 多くの優れた方法 が考案されてきました。

An anime-style illustration of a young man with vibrant red hair and a blue eye, wearing an eyepatch over the other eye. He is dressed in a dark tactical jacket with a high collar and a harness with a small dagger attached. The background features a warm, glowing ambiance with soft bokeh lights, creating a striking and adventurous mood.

scheduler や denoise は設定が難しく感じますが、どのように変わるか を予想できれば調整がしやすくなります。

設定がうまく合ったときのイラストの変化はとても面白く、これからも画像の生成を楽しみながらベストな設定を探していきたいと思います。

最後までお読みいただき、ありがとうございます!


更新履歴

2025.6.17

ワークフローをアップデートしました


English Article



いいなと思ったら応援しよう!