1.1.420 Image-wise ControlNet and StyleAlign (Hertz et al.) #2295
Replies: 13 comments 16 replies
-
@catboxanon @huchenlei @ljleb @anyone-who-know-how-to-make-it-work |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hey, a notebook was added on the main github page for sd 1.4, like 20 minutes after this controlnet update. And so would probably work for 1.5 too. |
Beta Was this translation helpful? Give feedback.
-
Pinging @comfyanonymous here since they claim StyleAlign is not implemented correctly. Maybe they can provide more useful info. |
Beta Was this translation helpful? Give feedback.
-
update 12/6: now also tested dynamic-prompts permutations (see also the updated sanity check) |
Beta Was this translation helpful? Give feedback.
-
https://huggingface.co/spaces/fffiloni/video2openpose2 |
Beta Was this translation helpful? Give feedback.
-
What is the style being aligned to? |
Beta Was this translation helpful? Give feedback.
-
I can't make it work with Reference Adain the others Reference Only or Reference Adain + Attn work fine. Anytimes I select Reference Adain with Batch Option and Style Align On I get this error message, does anyone know what error is this ? |
Beta Was this translation helpful? Give feedback.
-
I could not replicate results of Sanity Check (with dynamic-prompts)? what did you add in controlnet? Do I need to enable any controlnet or just the stylealign checkbok is fine? |
Beta Was this translation helpful? Give feedback.
-
is there any problem in negative prompt length larger than 75 when enable StyleAlign? for example in negative prompt box:
|
Beta Was this translation helpful? Give feedback.
-
Hello, Do you have plan to implement this method with additional way, such as the way like IP-Adapter? StyleAlign can do so-called "Style Transfer" method, because in their example it says StyleAlign can be used in generating images with a style from "reference image". The example also shows the method that uses both reference image and depth map to generate same style images with different text prompt. I think this can be implemented not only by aligning other images with first image during the batch, but some kind of separated type in controlnet unit. |
Beta Was this translation helpful? Give feedback.
-
sd1.5 based model is ok. |
Beta Was this translation helpful? Give feedback.
-
Great.It's marvelous. |
Beta Was this translation helpful? Give feedback.
-
Since
sd-webui-controlnet
1.1.420, users will be able to use image-wise controlnets. And, based on image-wise controlnets, the "StyleAlign" is avaliable.Style Aligned Image Generation via Shared Attention
Amir Hertz* 1 Andrey Voynov* 1 Shlomi Fruchter† 1 Daniel Cohen-Or† 1,2
1 Google Research 2 Tel Aviv University
Previously, all ControlNet units will be applied to all images in your batch. Now, if you use “each ControlNet unit for each image in a batch”, you will have each ControlNet unit for each image in your batch.
For example, if your batch size is 4, then your
And you can use “[StyleAlign] Align image style in the batch” to align the style of all images in a batch (via shared attention reference).
(If the number of batch size does not match ControlNet unit count, the remainder of the division will be used)
Sanity Check (with CN)
Some example images used in the Sanity Check:
The model is
realisticVisionV51_v51VAE
: https://civitai.com/models/4201?modelVersionId=130072Prompt
Positive:
best quality, very detailed, high resolution, 4k, 8k, 35 mm, a handsome man, looking at viewer, street
Negative:
text, watermark, low quality, medium quality, blurry, censored, deformed, mutated, anime, toon, render, 3d, ilustration, moles, dark skin spots
Parameters:
4x Openpose CN (control_v11p_sd15_openpose):
All default parameters.
Note that here we use openpose (rather than openpose_full) without face landmarks to avoid the style influence of face appearance.
Also, if you do not have 4 controlnet units, go to settings->controlnet->ControlNet unit number to have any number of units.
Check "Each ControlNet unit for each image in a batch"
Generate, you will get this
The 4 images are generated by these 4 poses
You can see this is what "Each ControlNet unit for each image in a batch".
Then check "[StyleAlign] Align image style in the batch."
Generate again, you will get the "StyleAlign" for the 4 images in a same batch:
Sanity Check (with dynamic-prompts)
You need to install https://github.com/adieyal/sd-dynamic-prompts to use prompt permutation.
The grammar is {A|B|C|D} like "a toy {train|bicycle|car|boat}. macro photo. 3d game asset"
The model is
realisticVisionV51_v51VAE
: https://civitai.com/models/4201?modelVersionId=130072Positive:
a toy {train|bicycle|car|boat}. macro photo. 3d game asset
negative:
low quality, lowres, ugly, bad
parameters:
dynamic-prompts:
then if you click generate and generate without using "StyleAlign", the result is
then check "StyleAlign"
then the style will be aligned
FAQ
Q: Does this influence speed?
A: Yes, if you use "StyleAlign", attention context is longer. Generating will be slower. But in my tests not too slow.
Q: Can I use t2ia-style/reference/ip-adapters together with StyleAlign?
A: Yes. But this behavior is still under experiment and may be changed in any future versions. (Not yet very sure what behavior should be the correct behavior because now attention will have formulations both in-batch and globally. It should already work out of box but not extensively tested.)
Q: XL? SSD? Turbo? LCM?
A: yes, yes, yes, and yes. (w/ webui 1.7.0)
Beta Was this translation helpful? Give feedback.
All reactions