ClownStyle_Block_UNet
Style transfer control at the ResBlock level for classic U-Net models
- mask
- blocks
- blocks
The whole-block counterpart to ClownStyle_Attn_UNet, for the same classic U-Net models (SD1.5, SDXL, Stable Cascade) - but instead of only reaching into the attention math, this one gives you the whole block a U-Net stage is built from. It chains into ClownStyle_UNet's blocks input the same way the rest of the ClownStyle_* family does.
How it works
A classic U-Net stage is simpler than an MMDiT transformer block - it's a residual block plus (usually) a spatial transformer bolted on, not two symmetric attention/feedforward sublayers. That's why this node only exposes three taps instead of the MMDiT version's nine: resample is the down/upsampling convolution step within a stage, res is the ResBlock itself (the residual convolution path that also mixes in the timestep/conditioning embedding), and spatial is the SpatialTransformer submodule - the attention block bolted onto the ResBlock. That spatial tap is the coarse version of what ClownStyle_SpatialBlock_UNet and ClownStyle_TransformerBlock_UNet let you dig into with much more precision if you need it.
The inputs and outputs that matter
mode- the style-matching algorithm (scattersort,AdaIN,WCT, and the rest - same list asClownStyle_UNet).block_type(input/middle/output, or combinations) - which U-Net stage(s) to target. Unlike the attention-level node, there's noapply_tohere - this operates on the block as a whole, not on self- versus cross-attention specifically.block_list(default"all") /block_weights(default"1.0") - target and weight specific block indices.resample,res,spatial- three floats, all default 0.spatialis the one most relevant if what you actually want is attention-driven style matching without going all the way down toClownStyle_Attn_UNet;resandresampleaffect the more purely convolutional parts of the stage.mask+invert_maskrestrict spatially;tile_h/tile_wapply only totiled_modes.blocks(optional in/out) chains with the rest of the family, feeding intoClownStyle_UNet.
How to install it
Via ComfyUI Manager, search "RES4LYF". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF/
cd RES4LYF
pip install -r requirements.txt
then restart.
Common issues & troubleshooting
If you want attention-specific control, this isn't granular enough - go to ClownStyle_Attn_UNet or ClownStyle_TransformerBlock_UNet. spatial here turns the whole spatial-transformer submodule up or down as one unit; it doesn't distinguish self- from cross-attention or isolate the feedforward layer the way the more targeted nodes do.
Three floats at zero means nothing's happening - that's the default state, not a bug. Turn on spatial first if your goal is style bleed through attention; try res if you're chasing something closer to color/texture statistics on the convolutional path.
This is a smaller, simpler node than its MMDiT counterpart on purpose. Classic U-Net stages just don't have as many distinct internal sublayers as a DiT block does - three taps is the real structure, not a stripped-down version of something bigger.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | scattersort | 10 options: none, scattersort_dir, scattersort_dir2, scattersort, tiled_scattersort, AdaIN, +4 |
| block_type | COMBO | input | 7 options: input, middle, output, input,middle, input,output, middle,output, +1 |
| block_list | STRING | all | — |
| block_weights | STRING | 1.0 | — |
| resample | FLOAT | 0.00-100–100 | Strength of effect on layer; skips extra calculation if set to 0.0. Skips interpolation if set to 1.0. |
| res | FLOAT | 0.00-100–100 | Strength of effect on layer; skips extra calculation if set to 0.0. Skips interpolation if set to 1.0. |
| spatial | FLOAT | 0.00-100–100 | Strength of effect on layer; skips extra calculation if set to 0.0. Skips interpolation if set to 1.0. |
| tile_h | INT | 12816–10000 | Tile size for tiled modes. Lower values will transfer composition more effectively. Dimensions of image must be divisible by this value. |
| tile_w | INT | 12816–10000 | Tile size for tiled modes. Lower values will transfer composition more effectively. Dimensions of image must be divisible by this value. |
| invert_mask | BOOLEAN | false | — |
| maskopt | MASK | — | |
| blocksopt | BLOCKS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| blocks | BLOCKS | — |