ComfyUI > Nodes > StyleAligned for ComfyUI

ComfyUI Extension: StyleAligned for ComfyUI

Repo Name

style_aligned_comfy

Author
brianfitzgerald (Account age: 4240 days)
Nodes
View all nodes(3)
Latest Updated
2024-05-30
Github Stars
0.27K

How to Install StyleAligned for ComfyUI

Install this extension via the ComfyUI Manager by searching for StyleAligned for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter StyleAligned for ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

StyleAligned for ComfyUI Description

StyleAligned for ComfyUI enables consistent styling across image batches by using the first image as a style reference, ensuring uniformity in the appearance of all subsequent images in the batch.

StyleAligned for ComfyUI Introduction

The style_aligned_comfy extension is a powerful tool designed for AI artists using ComfyUI. It implements the StyleAligned technique, which allows you to align the style of generated images with a reference image or across a batch of images. This extension can help you achieve consistent artistic styles in your AI-generated artwork, making it easier to maintain a cohesive look and feel across multiple images. Whether you're creating a series of artworks or just want to experiment with different styles, style_aligned_comfy provides the tools you need to enhance your creative process.

How StyleAligned for ComfyUI Works

At its core, style_aligned_comfy works by manipulating the latent space of images during the generation process. The latent space is a high-dimensional space where each point represents a potential image. By referencing an existing latent (a representation of an image in this space), the extension can align the style of new images with the reference image.

Basic Principles

  1. Latent Space: Think of the latent space as a vast landscape where each point corresponds to a unique image. The extension navigates this landscape to find points that match the desired style.
  2. Style Reference: By using a reference image, the extension identifies the latent representation of that image and uses it as a guide to style new images.
  3. Batch Alignment: Instead of aligning each image individually, the extension can also align the style of an entire batch of images, ensuring they all share a consistent style.

StyleAligned for ComfyUI Features

StyleAligned Reference Sampler

This feature allows you to use an existing image as a style reference. It replaces the standard KSampler and requires performing DDIM inversion to retrieve the latent representation of the reference image. An example workflow for this process is provided here.

Reference Sampler

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: Determines which components of self-attention are normalized. Defaults to q+k. Set to q+k+v for more extreme sharing, which may affect quality.
  • share_norm: Controls normalization sharing across the batch. Defaults to both. Options include group or layer for more specific normalization.
  • scale: Adjusts the intensity of the style-alignment effect. Defaults to 1.

StyleAligned Batch Align

This feature aligns the style of an entire batch of images with the first image generated in the batch. This ensures that all images in the batch share a consistent style.

Batch Align

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: Determines which components of self-attention are normalized. Defaults to q+k. Set to q+k+v for more extreme sharing, which may affect quality.
  • share_norm: Controls normalization sharing across the batch. Defaults to both. Options include group or layer for more specific normalization.
  • scale: Adjusts the intensity of the style-alignment effect. Defaults to 1.
  • batch_size, noise_seed, control_after_generate, cfg: Identical to the standard KSampler parameters.

Troubleshooting StyleAligned for ComfyUI

Here are some common issues you might encounter while using style_aligned_comfy and how to solve them:

Common Issues and Solutions

  1. Images Not Aligning with Reference Style:
  • Ensure you have performed DDIM inversion correctly to retrieve the latent representation of the reference image.
  • Check the scale parameter to ensure it is set appropriately for the desired effect.
  1. Quality Issues with Extreme Sharing:
  • If using q+k+v for share_attn, try reverting to q+k to see if it improves quality.
  • Adjust the share_norm parameter to group or layer to see if it enhances the results.
  1. Batch Alignment Not Consistent:
  • Verify that the first image in the batch is generated correctly and serves as a good style reference.
  • Ensure all batch parameters (batch_size, noise_seed, etc.) are set correctly.

Frequently Asked Questions

  • Do I need any additional models or dependencies?
  • No, style_aligned_comfy does not require any additional models or dependencies.
  • Can I use this extension with any base model?
  • Yes, you can patch any base model with the parameters provided.

Learn More about StyleAligned for ComfyUI

To further enhance your experience with style_aligned_comfy, here are some additional resources:

  • StyleAligned Official Documentation
  • Example workflows included in the resources/ directory of the extension.
  • Community forums and discussion groups where you can ask questions and share your experiences. By exploring these resources, you can gain a deeper understanding of how to use style_aligned_comfy to its full potential and connect with other AI artists who are also using this powerful tool.

StyleAligned for ComfyUI Related Nodes

RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.