In-Context LoRA
一貫性のあるマルチパネル画像と、複数のパネルをまとめて説明するキャプションを付けたデータセットでLoRAを作ることで、この特性を安定して引き出す
e.g.
portrait-photography.safetensors
font-design.safetensors
prompt[MOVIE-SHOTS] Set in the early 2010s, this inspiring tale of growth follows <Anna>, a 30-something woman whose life takes an unexpected turn in the world of fashion. [SCENE-1] captures <Anna> from outside the restaurant window as she works, her appearance unkempt with disheveled hair, clearly unconcerned with her looks, [SCENE-2] leading to a life-changing moment when an elderly man in a sleek suit, dining as a customer, approaches her with an invitation to join a fashion brand, [SCENE-3] portraying <Anna> as the same man mentors her on dressing with sophistication, gradually transforming her style and confidence, [SCENE-4] concluding with <Anna> in Paris, commanding the backstage of a fashion show, confidently giving direction to models and junior staff, fully embodying her new role.
サンプルをテンプレートとして、こんなシナリオに書き直してくれってChatGPTに投げると作ってくれる

Visual Identity Transferを使えば、ロゴとして漢字を書いたText画像渡して表示できるかなと試したけど惜しいけど安定しない感じになった…

こんな感じでいいのかな…?

i2iだと安定するんだ…

t2iでの失敗例
LoRAはあくまでFluxの力を安定させてるだけなので、プロンプトが結構大事な気がする

上と同じくinpaintingだけど、プロンプトをちゃんと修正した右側は綺麗に転送できてる
左の画像プロンプトの和訳一対の画像は、シンプルなロゴとその実際の使用例を強調しています。[IMAGE1] 白い背景に黒い文字。[IMAGE2] このロゴは、女性の頬に黒と白のタトゥーとして適用されています。
右の画像プロンプトの和訳一対の画像は、シンプルなロゴとその実際の使用例を強調しています。[IMAGE1] 黒い背景に青い縁取りがされた赤い文字。[IMAGE2] このロゴは、女性の黒いTシャツの胸部分にプリントとして適用されています。
プロンプト力が足りなかったか…

崩れてた理由がわかった、「画像をマスクに変換」をredにしてたので赤い文字が背景として読み込まれてしまっていた…
だめだグリーンバック化してもやっぱり崩れる…一度出力した画像にインペイントの方がいいのかもしれん…

このworkflow見たことあったけれどようやく理解できた

inpaintingと同じだけど、右半分全部マスクで埋めてるだけか
右半分を画像の代わりにempty imageと同じサイズのマスクに変更
モデルをノーマルのflux.1-devに変更して、プロンプトも全身描くように変更
確かにちょっと崩れちゃうな
冷静に考えると「元画像を横に2倍に拡大」→「拡大した先をマスクしてインペイント」なのでFillなどのインペイントモデルでないとうまく動作しない可能性が思いついた…なので任意のモデル使いたい時は
公式Wikiのインペイントモデルの能力をマージするとかがいるのかも

と仮説を立てましたがFillモデルだと普通にノイズのままだったのでi2iに比べるとt2iで文字レベルの細かいものは難しい、と考えるほうがいいかも(サメの絵文字🦈一文字とかならなんとかなる)
もしくはうまく出なければそのときにitiに切り替えるか…(最初のt2iはアタリと割り切る)
関連