CatVTON Node
CatVTON Node does the whole try-on
- image
- mask
- refer_image
- image
Virtual try-on has a reputation for being fiddly - pose estimators, DensePose, six models and a prayer. This node is the opposite. It's a single diffusion node that takes a person photo, a garment photo, and a mask of the region to swap, and hands you back the person wearing the garment. That's it. It's the heavy-lifting core of shadowcz007's comfyui-try-on pack (from the Mixlab family), and honestly the reason the pack exists.
The name is a hint: it wraps CatVTON, a 2024 try-on method, but don't let the "wrapper" reputation scare you. The pack ships its own copy of the CatVTON pipeline, and the scariest part of the original - detectron2 / DensePose install hell - is dead code here. No detectron2, no API, no key, no text prompt.
How it works
Under the hood it loads an SD1.5 inpainting UNet, the classic sd-vae-ft-mse VAE, and a CatVTON attention checkpoint. The clever bit: instead of conditioning on a text prompt, it swaps the UNet's cross-attention for "skip" attention and concatenates the garment's latents next to the masked person's latents, so the reference image is the conditioning. Then it DDIM-samples at low CFG and returns the composite. Everything gets padded to a consistent 768×1024 portrait internally, so your input resolution barely matters.
The inputs that matter
image- your person photo.mask- the region that gets redrawn. White = replace. This is where the pack's other two nodes (Fashion Cloth Mask / Fashion Cloth Mask 2) come in, or any mask you draw yourself.refer_image- the garment, ideally flat and straight-on against a plain background. The model copies its texture into the mask region.mask_grow(default 25) - dilates the mask so the new garment has room to sit naturally instead of hugging a tight crop. Negative values shrink it.steps(40),cfg(2.5),seed- the usual diffusion dials. CatVTON genuinely likes a low CFG; don't crank it.mixed_precision-fp16is the default and the right call on most cards. Drop tobf16(newer GPUs) orfp32if you hit NaNs or artifacts.attn_ckpt_version-mix/vitonhd/dresscode, matching which training the attention weights came from.mixis the general-purpose one; leave it there unless you know the checkpoint you downloaded is a specific variant.device-autoorcpu.cputechnically works; bring a book.
Output: a single image - the person wearing your garment.
Installing it
ComfyUI Manager - search comfyui-try-on - or:
cd ComfyUI/custom_nodes
git clone https://github.com/shadowcz007/comfyui-try-on
then restart. Two gotchas that will bite you:
- There is no
requirements.txtin this pack. Manager installs the code and nothing else. You needtransformers,diffusers,accelerate, andscipyin ComfyUI's Python yourself if they aren't already. - The README's model story is thin. It points at a Baidu Netdisk link (extraction code
MAI0) for the CatVTON weights → put them inComfyUI/models/catvton/. But the node also expects astable-diffusion-inpainting/folder and ansd-vae-ft-mse/folder in the same directory - the README never mentions either. Grab them from Hugging Face (runwayml/stable-diffusion-inpaintingandstabilityai/sd-vae-ft-mse, diffusers format).
If models/catvton doesn't exist at all, the node tries to snapshot_download its path as a HuggingFace repo id - you get a baffling "repo not found" style error. That's your "model not in the right place" signal.
Common issues
- Garment looks soft or logos pixelate. That's CatVTON's known weakness, not your setup. Upscaling the result makes garment texture worse, so people tend to run a FaceDetailer-style pass after instead.
- The output redraws the whole person → your mask is wrong, see the two Fashion Cloth Mask articles.
- NaN / OOM in fp16 → switch
mixed_precisiontobf16orfp32. SD1.5-based, so it fits on most consumer GPUs at fp16.
The whole pack is built around this node - worth the setup for anyone doing product or fashion shots.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| refer_image | IMAGE | — | |
| mask_grow | INT | 25-999–999 | — |
| mixed_precision | COMBO | fp16 | 3 options: fp32, fp16, bf16 |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 401–10000 | — |
| cfg | FLOAT | 2.50–14 | — |
| attn_ckpt_version | COMBO | 3 options: mix, vitonhd, dresscode | |
| device | COMBO | 2 options: auto, cpu |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |