TSSAT
The two-stage style transfer node that rewards patience
- src_img
- style_img
- out_img
TSSAT ("Two-Stage Statistics-Aware Transformation", 2023) is the pack's slow-yet-quality middle ground: slower than CAST or EFDM, faster than Neural Neighbor, with a distinctive mechanism and an unusual knob. Like everything in ComfyUI-StyleTransferPlus, it's non-diffusion arbitrary style transfer - content and style images in, stylized image out.
The "two-stage" in the name is the whole story. Stage one is a patch-based statistics-aware transformation: it slices the content and style into local patches, then matches each content patch's statistics to the most similar style patches - which is how it keeps local structure while importing texture. Stage two runs the result through a trained decoder network that turns the transformed features back into a full image. The patch matching (with stride 1) is what makes it slow.
The knob nobody expects: max_iter
Here's the quirk that makes TSSAT stand out: the node runs the whole pipeline in a loop, feeding its own output back in as the new content. max_iter (default 1) controls how many times. This isn't an EFDM-style strength slider - bumping it up makes the stylization progressively stronger as the result is re-transformed again and again. Start at 1; if the style feels weak, try 2 or 3 and watch the texture accumulate. Each iteration costs real time, so there's a sweet spot somewhere around 2–3 before it just gets noisy.
Inputs and outputs
src_img/style_img- content and style.size- square edge length after resizing (default 512).do_crop- resize-then-center-crop to square instead of squishing.max_iter- the self-reinforcement loop count, default 1.
Output: out_img (IMAGE) → Preview/Save.
Install
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/FuouM/ComfyUI-StyleTransferPlus
or ComfyUI Manager → search ComfyUI-StyleTransferPlus → install → restart.
Models - two files:
ComfyUI/custom_nodes/ComfyUI-StyleTransferPlus/models/tssat/decoder_iter_160000.pth
ComfyUI/custom_nodes/ComfyUI-StyleTransferPlus/models/vgg_normalised.pth
The decoder comes from the TSSAT-model.zip in the TSSAT repo's Model Testing section. The vgg_normalised.pth is the same shared file that CAST and EFDM use - if you've installed those, it's already in your models/ folder and you just need the decoder. Dependencies: torch, torchvision, scikit-image, einops.
Common issues
- Style looks too weak at default settings - that's
max_iter=1being conservative. This node is designed to be re-iterated; raisemax_iterbefore blaming the weights. - Load error - the decoder must sit at
models/tssat/decoder_iter_160000.pthinside the pack folder, andvgg_normalised.pthatmodels/vgg_normalised.pth. - Slow - inherent to the patch matching. Lower
sizefor faster iteration tests, then raise it for the final run.
TSSAT is a "trust the process" node: leave max_iter at its default once, notice the weak result, then dial it up. It's the one in this pack where the second and third passes are the whole game.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| src_img | IMAGE | — | |
| style_img | IMAGE | — | |
| do_crop | BOOLEAN | false | — |
| size | INT | 512 | — |
| max_iter | INT | 1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| out_img | IMAGE | — |