Sign In

CompositionFactor (Experimental)

13
134
207
2
Updated: May 24, 2024
toolcomposition
Verified:
SafeTensor
Type
LoRA
Stats
134
207
Reviews
Published
May 24, 2024
Base Model
SD 1.5
Hash
AutoV2
EB81F1981C

This is a very experimental LoRA attempt to improve the composition of the output image.I created this to verify if it is possible.

In other words, the composition is good or bad depending on the model. If you mix many models, the features may be averaged out or you may end up with a boring composition. Therefore, the starting point was to take a model with a good composition and use it to learn a layer that has a large influence over a large area in U-net.

However, when I actually tried it out, I found that there were very large differences depending on the model that was applied. In some cases, the changes that LoRA makes are effective, but in other cases, they have little or no effect or even have the opposite effect. If the model already has a good composition, it will only get in the way. LoRA seems to be less effective because it lacks layers that would be effective in composition. I also tried conceptual manipulation, but the problem was that the model did not properly understand what a "good composition" was. Even if you operate on a conceptual basis, there will be some changes, but the composition will not change significantly. It may be possible to use prompts to produce a specific composition, but in order to produce a generally good composition, preparation is required at the time of model learning (This does not matter to people who operate with i2i or control.net).

これは非常に実験的なLoRAで出力画像の構図の改善を試みるためのものです。それが可能なことなのかを検証するために作成してみました。

どういうものかというと,モデルによって構図の良し悪しというものはあります。多くのモデルを混ぜていると,特徴が平均化されるのか,退屈な構図にしかならなくなることもあります。そこで,構図のよいモデルからU-netでの大きなエリアに影響の大きな階層を持ってきて学習させるといったものが起点でした。

しかし,実際に試してみてわかったのは,適用するモデルによる差が非常に大きいことでした。このLoRAが行う変更が有効な場合もありますが,ほとんど効果がなかったり,逆効果になる場合もあります。すでによい構図を出すモデルの場合は邪魔にしかならないわけです。LoRAでは,構図に効きそうな階層が抜けているので効果が薄そうだというのもあります。また,概念操作も試みましたが「よい構図」とはなにかというものをモデルがちゃんと認識していない点も問題でした。概念ベースで操作してもある程度の変化は出ますが,構図が大きく変わることはあまりありません。特定の構図を出すにはプロンプトで対処できるかもしれませんが,一般的によい構図を出すためには,モデル学習時点での準備が必要です(i2iやcontrol.netで操作する人には関係ありませんが)。

However, it is possible to have some influence by manipulating these hierarchies. I gave up on creating a "good composition", which is the biggest problem, and reconfigured it as LoRA, which adds disturbance to the layer that determines the composition. Using LoRA does not necessarily improve the composition. This is not to create a good composition, but to create a different composition than before. It may seem crazy if you think about it normally, but if you try 1 and it doesn't work, you can try -1.

とはいえ,そういった階層をいじることでなんらかの影響を与えることはできます。最大の問題である「よい構図」を出すことは諦めて,構図を決める階層に外乱を与えるLoRAとして構成し直しました。このLoRAを使っても構図がよくなるとは限りません。よい構図を出すのではなく,これまでとは違った構図が出るようにするためのものです。普通に考えるとキチガイじみていますが,1で試してダメなら,-1を試すといった使い方になります。

Since it affects the composition, it affects the entire picture. Although the effect on the character is suppressed, there is a certain effect on the body shape etc. It is hardly effective for compositions such as close-up shots of characters. In LoRA, the influence on large areas of the picture is too low. This is somewhat effective when the figures are medium-sized or smaller, such as in landscapes. Depending on the model, it may have similar data and the influence may be weakened. Also, it's not just the composition that changes, so many things change.

構図に働きかけるものですので,絵全体に影響します。キャラへの影響は抑えていますが,体型などではそれなりに影響はあります。キャラの大写しなどの構図ではほとんど有効ではありません。LoRAでは絵の大きなエリアに対する影響力が低すぎます。風景など,人物が中程度以下の大きさの場合には多少効果を発揮します。モデルによっては似たデータを持っていて影響が薄くなる可能性もあります。また構図だけを変えるものではありませんので,多くのものが変わります。

In practical terms, changing the seed value is more certain to affect the entire picture than using something like this, so if you want to change the entire composition, it is better to do that. However, for models whose composition does not change much even if the seeds are changed, such a tool may be useful.

実用上は,こういったものを使うよりもシード値を変更するほうが絵全体への影響が確実ですので,構図全体を変えたい場合はそちらのほうがよいでしょう。しかし,シードを変えてもあまり構図が変わらないようなモデルの場合はこのようなツールが役に立つかもしれません。

Original

LoRA: 1.0

LoRA:-1.0

LoRA: 1.3

Currently, as a test version to confirm whether it is effective, disturbance elements are constructed from randomly selected models. I don't really expect it to have any practical effects. Challenges include the need to further reduce the impact on colors and characters. It would be better to restrict the hierarchy a little more thoroughly.

現状では効果があるのかを確認するためのテスト版として,適当に選んだモデルから外乱要素を構成しています。実用になる効果が出ることはあまり期待できません。色味やキャラへの影響をもっと抑える必要があることなどが課題です。もう少し階層の制限を徹底したほうがよさそうです。

LoRA:0.0 other seeds examples

Another model example

Original

LoRA: 0.5

LoRA: 1.0

LoRA: -0.5

LoRA: -1.0

It can be seen that increasing the LoRA strength (for this model) increases the variety of compositions. If you set it to a negative value, the composition becomes monotonous. At the same time, a positive direction tends to make the facial features Asian, while a negative direction tends to make the facial features European, with a positive direction increasing the saturation of colors and a negative direction making them look washed out.

(このモデルに対しては) LoRAの強度を上げると構図の多彩さが増していることがわかる。マイナスにすると単調な構図になっている。同時に,プラス方向だと顔立ちがアジアンになり,マイナス方向だとヨーロピアンになる傾向があり,プラス方向で色の彩度が上がり,マイナス方向で色褪せた感じになっている。