Nodes/RES4LYF/ClownGuide_StyleNorm_Advanced_HiDream
ComfyUI Node Runs on cloud

ClownGuide_StyleNorm_Advanced_HiDream

Scattersort with per-component targeting

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
ClownGuide_StyleNorm_Advanced_HiDream
  • guide
  • mask
  • weights
  • guides
  • guides
weight1.00
weight_schedulerconstant
double_blocksall
double_weights1.0
single_blocksall
single_weights1.0
modescattersort
noise_modesmart
ff_1false
ff_1_silufalse
ff_3false
ff_13false
ff_2false
moe_gatefalse
topk_weightfalse
moe_ff_1false
moe_ff_1_silufalse
moe_ff_3false
moe_ff_13false
moe_ff_2false
moe_sumfalse
moe_outfalse
double_img_iofalse
double_img_norm0false
double_img_attnfalse
double_img_attn_gatedfalse
double_imgfalse
double_img_norm1false
double_img_ff_ifalse
double_txt_iofalse
double_txt_norm0false
double_txt_attnfalse
double_txt_attn_gatedfalse
double_txtfalse
double_txt_norm1false
double_txt_ff_tfalse
single_img_iofalse
single_img_norm0false
single_img_attnfalse
single_img_attn_gatedfalse
single_imgfalse
single_img_norm1false
single_img_ff_ifalse
attn_img_q_normfalse
attn_img_k_normfalse
attn_img_v_normfalse
attn_txt_q_normfalse
attn_txt_k_normfalse
attn_txt_v_normfalse
attn_img_doublefalse
attn_txt_doublefalse
attn_img_singlefalse
proj_outfalse
start_step0
end_step15
invert_maskfalse

This is the deep-control version of RES4LYF's style transfer for HiDream. Where the basic AdaIN and scattersort guides give you a handful of dials, StyleNorm Advanced opens up the model's internals - dozens of toggles for exactly which parts of each transformer block the style operation touches. It's a lot. Most people should treat it as "expert mode" and only come here when the simpler guides can't reach a specific layer they need.

The core operation is scattersort (the default) or AdaIN. Scattersort is the author's own style mode, built to transfer a reference's look while keeping source color and lighting from bleeding into the result. What "Advanced" adds is granularity: instead of applying the style normalization across whole blocks, you can enable it on individual sub-components - feed-forward layers, mixture-of-experts gates, image and text attention paths, per-projection norms, and so on. That's a scalpel for people who know HiDream's architecture and want to shape where the style lands.

How it works

Same guide framework as the rest of the pack: it builds a GUIDES bundle for the sampler's guides input and steers denoising toward your reference latent. The difference is the sheer number of boolean switches, each turning the style normalization on for one specific piece of the network. There's also a noise_mode (smart by default, plus direct, update, recon, bonanza) that changes how the styled signal is reconciled with the ongoing denoise. You still set an overall weight, weight_scheduler, and step window on top.

The inputs and outputs that matter

You will not flip most of the toggles. The load-bearing controls:

  • guide (LATENT, optional) - the style reference.
  • mode (enum: scattersort, AdaIN; default scattersort) - the style operation. Scattersort for fidelity-preserving transfer, AdaIN for plain statistic matching.
  • weight (FLOAT, default 1) - overall strength.
  • noise_mode (enum, default smart) - how the style is blended into sampling; smart is the sane default.
  • double_blocks / single_blocks (STRING, default all) - which blocks participate.
  • The long list of ff_*, moe_*, double_img_*, single_img_*, attn_*, proj_out booleans - per-component targeting, all off by default. Enable deliberately.
  • weight_scheduler, start_step / end_step, mask - the shared controls.

Output is a guides (GUIDES) bundle for 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. This node is HiDream-specific; have a HiDream checkpoint loaded, since style transfer works best on HiDream or Chroma per the docs. Nested sampler menu: rgthree-comfy with "Auto Nest Subdirectories" on.

Common issues

The trap is the toggle wall. With this many per-component switches and near-zero official documentation on what each one does to the image, it's very easy to enable a combination that produces artifacts or just noise, then have no idea which switch did it. The discipline is boring and mandatory: start from the defaults (which is essentially plain scattersort across all blocks), enable one component group at a time, fixed seed, and note what changed. If you find yourself flipping switches at random, stop and go back to the basic scattersort or AdaIN guide - for most style transfer, those are enough, and this node's extra reach is only worth it when you're chasing a specific, identifiable failure in where the style is landing.

Two more. noise_mode is not cosmetic - bonanza and recon behave very differently from smart, so change it only when you understand why. And the pack-wide scheduler caveat holds: bong_tangent ignores the workflow's shift, so if weight_scheduler acts up, try beta57 or constant.

CategoryRES4LYF/sampler_extensions

Inputs (60)

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_blocksSTRINGall
double_weightsSTRING1.0
single_blocksSTRINGall
single_weightsSTRING1.0
modeCOMBOscattersort2 options: scattersort, AdaIN
noise_modeCOMBOsmart5 options: direct, update, smart, recon, bonanza
ff_1BOOLEANfalse
ff_1_siluBOOLEANfalse
ff_3BOOLEANfalse
ff_13BOOLEANfalse
ff_2BOOLEANfalse
moe_gateBOOLEANfalse
topk_weightBOOLEANfalse
moe_ff_1BOOLEANfalse
moe_ff_1_siluBOOLEANfalse
moe_ff_3BOOLEANfalse
moe_ff_13BOOLEANfalse
moe_ff_2BOOLEANfalse
moe_sumBOOLEANfalse
moe_outBOOLEANfalse
double_img_ioBOOLEANfalse
double_img_norm0BOOLEANfalse
double_img_attnBOOLEANfalse
double_img_attn_gatedBOOLEANfalse
double_imgBOOLEANfalse
double_img_norm1BOOLEANfalse
double_img_ff_iBOOLEANfalse
double_txt_ioBOOLEANfalse
double_txt_norm0BOOLEANfalse
double_txt_attnBOOLEANfalse
double_txt_attn_gatedBOOLEANfalse
double_txtBOOLEANfalse
double_txt_norm1BOOLEANfalse
double_txt_ff_tBOOLEANfalse
single_img_ioBOOLEANfalse
single_img_norm0BOOLEANfalse
single_img_attnBOOLEANfalse
single_img_attn_gatedBOOLEANfalse
single_imgBOOLEANfalse
single_img_norm1BOOLEANfalse
single_img_ff_iBOOLEANfalse
attn_img_q_normBOOLEANfalse
attn_img_k_normBOOLEANfalse
attn_img_v_normBOOLEANfalse
attn_txt_q_normBOOLEANfalse
attn_txt_k_normBOOLEANfalse
attn_txt_v_normBOOLEANfalse
attn_img_doubleBOOLEANfalse
attn_txt_doubleBOOLEANfalse
attn_img_singleBOOLEANfalse
proj_outBOOLEANfalse
start_stepINT00–10000
end_stepINT15-1–10000
invert_maskBOOLEANfalse
guideoptLATENT
maskoptMASK
weightsoptSIGMAS
guidesoptGUIDES

Outputs (1)

NameTypeDescription
guidesGUIDES