Creating consistent style images with ComfyUI

One of the challenges of prompt-based image generation is maintaining style consistency. The StyleAligned technique can be used to generate images with a consistent style.

By adding two KSampler nodes with the identical settings in ComfyUI and applying the StyleAligned Batch Align node to only one of them, you can compare how they produce different results from the same seed value.

ComfyUI workflow
ComfyUI workflow

In this workflow, the DynaVision XL model was used and multiple images were created in batch using the Batch Prompt Schedule node.

Batch prompting
Batch prompting

Comparison setup
Comparison setup

The differences are pretty obvious when comparing the generated images. The images generated using StyleAligned are much more consistent in colour, composition, and style.

Diff
Diff

Diff
Diff

And for photorealistic images, the differences can be seen in the composition and background.

Diff
Diff

Style Aligned Image Generation via Shared Attention: Link

StyleAligned for ComfyUI: GitHub repository

ComfyUI workflow file: comyfui-style-aligned-workflow.json

Tutorial video: Link