Nodes/RES4LYF/ClownGuide AdaIN (HiDream)
ComfyUI Node Runs on cloud

ClownGuide AdaIN (HiDream)

Style transfer by matching feature statistics

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
ClownGuide AdaIN (HiDream)
  • guide
  • mask
  • weights
  • guides
  • guides
weight1.00
weight_schedulerconstant
double_blocks
double_weights
single_blocks20
single_weights0.5
start_step0
end_step15
invert_maskfalse

This is one of RES4LYF's style-transfer guides, built for MMDiT models - HiDream in particular, though the pack's style features cover Flux, Chroma, SD3.5 and more. It uses AdaIN (adaptive instance normalization), a classic style-transfer trick, to push the look of a reference image into whatever you're generating: its color balance, contrast, and overall feel, without copying its content.

The way RES4LYF's guide system works is worth understanding once, because a dozen nodes share it. A "guide" node doesn't render anything by itself. It builds a GUIDES bundle that plugs into the sampler's guides input, and during sampling it reaches inside the model and nudges the denoising toward a reference. Guides chain: each one can take a guides input and pass an enriched guides out, so you can stack an AdaIN style guide on top of a composition guide on top of a mask, and the sampler applies the whole stack. This node is the AdaIN link in that chain.

How it works

AdaIN matches statistics. It takes the mean and variance of your reference (the guide latent) inside the model's transformer blocks and re-normalizes the generation's features to match - so the output inherits the reference's distribution of tone and texture while the prompt still decides the subject. You pick which blocks to apply it in and how hard, which is why there are separate controls for the model's "double" and "single" transformer blocks. The author's own guidance is to try style with the guide off first to confirm the prompt isn't already doing the work.

The inputs and outputs that matter

  • guide (LATENT, optional) - the reference image encoded to latent. This is the style source. Without it, the node has nothing to imitate.
  • weight (FLOAT, default 1) - overall strength of the style push. The first dial to move.
  • single_blocks / single_weights and double_blocks / double_weights (STRING) - which transformer blocks to inject into and how strongly, given as comma-separated lists. Defaults target a single block at weight 0.5; go wider for a stronger, more pervasive style.
  • weight_scheduler (enum, incl. beta57, bong_tangent, constant, …) - how the guide's influence is scheduled across steps.
  • start_step / end_step (INT) - the step window the guide is active in. Style tends to want the earlier steps.
  • mask (MASK, optional) and invert_mask - confine the effect to a region.

Output is a guides (GUIDES) bundle - feed it to the next guide node or straight into the sampler.

How to install it

ComfyUI Manager: search RES4LYF, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/ClownsharkBatwing/RES4LYF/, pip install -r requirements.txt in your venv (portable ComfyUI: embedded python's pip), restart, hard-refresh with F5. Style transfer works best on HiDream or Chroma per the docs, so have one of those loaded. For the nested sampler menu, add rgthree-comfy with "Auto Nest Subdirectories" on.

Common issues

The usual RES4LYF documentation gap bites hardest here - there's little official guidance on which blocks to target, and the honest community answer to "which settings" is still "it depends on the image." Start from the defaults, change one thing, keep a fixed seed.

Two concrete traps. If style seems to do nothing, check that the effect isn't just your prompt - turn the guide off and compare, as the author suggests. And watch the scheduler: bong_tangent applies its own sigma shift and ignores the workflow's, a known RES4LYF gotcha, so if weight_scheduler behaves strangely, try beta57 or constant before assuming the node is broken. AdaIN is the gentler style guide; if it's too weak for what you want, that's your cue to look at the attention-injection or scattersort guides instead.

CategoryRES4LYF/sampler_extensions

Inputs (13)

NameTypeDefaultDescription
weightFLOAT1.00-100–100Set the strength of the guide by multiplying all other weights by this value.
weight_schedulerCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
double_blocksSTRING
double_weightsSTRING
single_blocksSTRING20
single_weightsSTRING0.5
start_stepINT00–10000
end_stepINT15-1–10000
invert_maskBOOLEANfalse
guideoptLATENT
maskoptMASK
weightsoptSIGMAS
guidesoptGUIDES

Outputs (1)

NameTypeDescription
guidesGUIDES