Nodes Browser
ComfyDeploy: How StyleAligned for ComfyUI works in ComfyUI?
What is StyleAligned for ComfyUI?
Implementation of the [a/StyleAligned](https://style-aligned-gen.github.io/) paper for ComfyUI. This node allows you to apply a consistent style to all images in a batch; by default it will use the first image in the batch as the style reference, forcing all other images to be consistent with it.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
StyleAligned for ComfyUI
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
StyleAligned for ComfyUI
Implementation of the StyleAligned technique for ComfyUI.
This implementation is split into two different nodes, and does not require any additional models or dependencies.
StyleAligned Reference Sampler
This node replaces the KSampler, and lets you reference an existing latent as a style reference. In order to retrieve the latent, you will need to perform DDIM inversion; an example workflow for this is provided here.
Above, a reference image, and a batch of images generated using the prompt 'a robot' and the reference image shown as style input.
Parameters
model
: The base model to patch.share_attn
: Which components of self-attention are normalized. Defaults toq+k
. Set toq+k+v
for more extreme sharing, at the cost of quality in some cases.share_norm
: Whether to share normalization across the batch. Defaults toboth
. Set togroup
orlayer
to only share group or layer normalization, respectively.scale
: The scale at which to apply the style-alignment effect. Defaults to1
.
StyleAligned Batch Align
Instead of referencing a single latent, this node aligns the style of the entire batch with the first image generated in the batch, effectively causing all images in the batch to be generated with the same style.
A batch of generations with the same parameters and the Batch Align node applied (left) and disabled (right).
Parameters
model
: The base model to patch.share_attn
: Which components of self-attention are normalized. Defaults toq+k
. Set toq+k+v
for more extreme sharing, at the cost of quality in some cases.share_norm
: Whether to share normalization across the batch. Defaults toboth
. Set togroup
orlayer
to only share group or layer normalization, respectively.scale
: The scale at which to apply the style-alignment effect. Defaults to1
.batch_size
,noise_seed
,control_after_generate
,cfg
: Identical to the standardKSampler
parameters.
Installation
Simply download or git clone this repository in ComfyUI/custom_nodes/
. Example workflows are included in resources/
.