Nodes/RES4LYF/ClownStyle_MMDiT
ComfyUI Node Runs on cloud

ClownStyle_MMDiT

Reference-image style transfer for Flux, SD3.5, HiDream and Chroma

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
ClownStyle_MMDiT
  • positive
  • negative
  • guide
  • mask
  • blocks
  • guides
  • guides
modescattersort
proj_in0.00
proj_out0.00
tile_h128
tile_w128
invert_maskfalse

This is one of the good ones. ClownStyle_MMDiT is RES4LYF's style-transfer node for MMDiT-architecture models - Flux, SD3.5, HiDream, Chroma, AuraFlow. You give it a reference image (as a latent guide) and it steers your generation toward that image's style - its palette, texture, rendering - without an IP-Adapter, a control model, or a style LoRA. The default mode, scattersort, is ClownsharkBatwing's own invention, written specifically to stop style transfer from dragging the reference's colors and lighting onto the wrong subject.

Style transfer is a headline feature of the pack, and the README is bullish about it: best results on HiDream or Chroma, and the trick of "run it with the guide off first" to confirm your prompt isn't secretly doing the work. It's the kind of feature people install RES4LYF for without realizing the sampler stuff came attached. This node has been ranking near the top of search for its name, which tracks - it's genuinely one of the more compelling things in the pack.

How it works

It builds a GUIDES object that plugs into a RES4LYF sampler. Under the hood the different modes are different ways of transplanting statistics from the reference latent into your generation: AdaIN and WCT/WCT2 are classic style-transfer math (matching channel means/covariances), while scattersort and its tiled/directional variants are the author's approach. You can mask which regions receive the style and tile the operation for large images.

The inputs and outputs that matter

  • mode (default scattersort) - the transfer method. scattersort is the recommended starting point; tiled_scattersort, AdaIN, WCT/WCT2 and injection are alternatives worth trying if scattersort over- or under-shoots.
  • guide (optional LATENT) - your style reference, encoded to a latent. This is the actual style source.
  • mask (optional MASK) plus invert_mask - restrict the style to part of the image.
  • tile_h / tile_w (default 128) - tile size for the tiled modes.
  • proj_in / proj_out - projection strengths for tuning how hard the style is pushed in and pulled out.

Optional positive/negative, blocks and guides let it slot into a larger guide chain. Output is guides (GUIDES), which you feed to the sampler.

How to install it

Part of RES4LYF. ComfyUI Manager: search RES4LYF, install, restart. Or:

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

Portable builds use the embedded pip. Restart, hard-refresh (F5).

Common issues

The big one the README itself warns about: make sure the style is doing the work, not the prompt. Describe the subject plainly and let the guide carry the aesthetic - if you also prompt "oil painting," you can't tell whether the node did anything. Run once with the guide off to check. Second, model choice matters a lot: the author says Flux Dev is weak on style knowledge (you'll want a style LoRA with it), while HiDream and Chroma understand style out of the box - so a disappointing result may be the base model, not your settings. Third, this is the MMDiT node - it's for that architecture family. Non-MMDiT models have their own path in the pack, so pointing this at the wrong architecture won't behave. And if scattersort bleeds color where you don't want it, that's exactly what a mask (or a different mode) is for.

CategoryRES4LYF/sampler_extensions

Inputs (12)

NameTypeDefaultDescription
modeCOMBOscattersort10 options: none, scattersort_dir, scattersort_dir2, scattersort, tiled_scattersort, AdaIN, +4
proj_inFLOAT0.00-100–100Strength of effect on layer; skips extra calculation if set to 0.0. Skips interpolation if set to 1.0.
proj_outFLOAT0.00-100–100Strength of effect on layer; skips extra calculation if set to 0.0. Skips interpolation if set to 1.0.
tile_hINT12816–10000Tile size for tiled modes. Lower values will transfer composition more effectively. Dimensions of image must be divisible by this value.
tile_wINT12816–10000Tile size for tiled modes. Lower values will transfer composition more effectively. Dimensions of image must be divisible by this value.
invert_maskBOOLEANfalse
positiveoptCONDITIONING
negativeoptCONDITIONING
guideoptLATENT
maskoptMASK
blocksoptBLOCKS
guidesoptGUIDES

Outputs (1)

NameTypeDescription
guidesGUIDES