Nodes/RES4LYF/VAEStyleTransferLatent
ComfyUI Node Runs on cloud

VAEStyleTransferLatent

The style transfer node that works across almost every model family

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
VAEStyleTransferLatent
  • latent
  • style_ref
  • vae
  • latent
methodAdaIN

Most style-transfer tools are tied to one architecture - Flux Redux is Flux-only, IP-Adapters are per-family. VAEStyleTransferLatent isn't, and the reason is the mechanism: instead of injecting through a model-specific conditioning pathway, it operates directly on VAE latents, matching statistics between your content and a style reference. Because it doesn't care what generated either latent, it works everywhere RES4LYF's README lists for style transfer - HiDream, Flux, Chroma, AuraFlow, SD1.5, SDXL, SD3.5, Stable Cascade, LTXV, and Wan.

This is also, functionally, the technique behind the pack author's own "universal style transfer" showcase - a post credited across the same span of architectures, built on the same underlying idea of transferring style at the latent level rather than through any one model's conditioning system.

How it works

Two classic neural style-transfer methods, both operating on the statistics of your latent's channels rather than on pixels or text conditioning:

  • AdaIN (Adaptive Instance Normalization) matches the mean and variance of your content latent's channels to the style reference's - lighter, faster, a reasonable first try.
  • WCT (Whitened Color Transform) does a heavier, full-covariance version of the same idea - generally a stronger, more literal transfer, at more compute cost.

Because both work on latent statistics rather than model internals, this node genuinely doesn't need to know what architecture produced either latent - only that both were encoded through the same VAE.

The inputs and outputs that matter

  • method (AdaIN default, or WCT) - the one setting you'll actually pick between. Start with AdaIN; switch to WCT if the effect feels too subtle or you want a stronger transfer.
  • latent (LATENT) - your content, the image you're applying a style to.
  • style_ref (LATENT) - your style reference, encoded through the same VAE you're passing into this node.
  • vae (VAE) - needed for the transfer math itself.
  • Output: latent - feed straight into your normal decode step.

How to install it

Via ComfyUI Manager: search RES4LYF, install, restart.

Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
cd RES4LYF
pip install -r requirements.txt

Portable installs: use the embedded Python's pip.exe. No extra model downloads for this node itself - it works with whatever VAE and content/style latents you already have.

Common issues & troubleshooting

Garbage output. Almost always a mismatched VAE - style_ref needs to be encoded through the same VAE you're feeding into this node. Encoding your style reference with, say, an SDXL VAE while sampling a Wan latent will produce statistics that don't correspond to anything meaningful.

Style barely shows up. Try WCT before assuming the node isn't working - AdaIN's effect is genuinely subtler by design, and some content/style pairs need the stronger method to show a visible difference.

Style overwhelms the content entirely. More often a mismatched or oddly-scaled style_ref than a setting to fix - check that your reference was encoded normally through the same VAE, at a sane resolution, before assuming you need to back off the method itself (there's no strength slider here to dial down; the fix is almost always in the reference, not the node).

Reaching for this on Flux and wondering if StyleModelApplyStyle would be better. For Flux specifically, StyleModelApplyStyle (built for Flux Redux) gives you a strength dial and is the more common choice there. This node earns its place on everything else, or when you specifically want a cross-architecture technique that behaves the same regardless of model.

CategoryRES4LYF/vae

Inputs (4)

NameTypeDefaultDescription
methodCOMBOAdaIN2 options: AdaIN, WCT
latentLATENT
style_refLATENT
vaeVAE

Outputs (1)

NameTypeDescription
latentLATENT