CatVTON Wrapper
Put a garment photo on a person photo, no training needed
- image
- mask
- refer_image
- image
CatVTONWrapper does one job: take a photo of a person, mask out the clothing you want to replace, hand it a photo of the garment you want instead, and get back the person wearing that garment. That's virtual try-on - the thing every clothing e-commerce site wants and most AI pipelines get wrong by either warping the garment weirdly or losing the person's identity. This is a ComfyUI wrapper around the original CatVTON research model, with one fix baked in by the wrapper author: it handles input images with mismatched aspect ratios without the cropping glitches the original had.
How it works
Under the hood this is masked inpainting with a twist: instead of a text prompt telling the diffusion model what to paint into the masked region, you feed it a reference image of the garment. The model was trained specifically to copy clothing structure and texture from that reference into the masked area of the person photo, which is why it needs way fewer parameters and a much lighter setup than heavier try-on rigs like IDM-VTON that lean on DensePose and pose warping. You're trading some flexibility for speed and a smaller footprint - it's a purpose-built tool, not a general editor.
The inputs and outputs that matter
You'll touch four things on a normal run:
image- the person photo.mask- the region on that photo to repaint (the clothing area). You need to produce this yourself - segment the clothing with something like SAM, or paint it by hand.refer_image- the garment photo you want the person to end up wearing.mask_grow(default 25) - expands or shrinks the mask before generation. If the try-on result keeps clothing style artifacts from the original garment at the edges, or the new garment gets clipped, this is the knob to nudge.
Below that sit the usual diffusion controls: seed, steps (default 40), and cfg (default 2.5 - notably low compared to a typical SDXL generation, so don't "fix" it upward on instinct). There's also mixed_precision (fp32 / fp16 / bf16, default fp16) - leave it on fp16 unless you're chasing a precision bug, since it's the difference between fitting on a modest card and not. The single output is image - the composited result, ready to preview or feed into an upscaler.
How to install it
Easiest path: ComfyUI Manager → search "ComfyUI_CatVTON_Wrapper" → install → restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_CatVTON_Wrapper.git
Then install the pack's own dependencies - and do this from inside python_embeded, not your system Python, or the imports will silently fail:
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt
The part people skip: the model weights aren't auto-downloaded. Grab them from the BaiduNetdisk or Google Drive link in the README and drop them into ComfyUI/models/CatVTON. Skip this and the node will error out looking for files that don't exist. The author recommends 6GB+ VRAM to run it comfortably.
Common issues & troubleshooting
Node loads but errors on first run - almost always the model files aren't in ComfyUI/models/CatVTON yet, or they landed in the wrong subfolder. Re-check the drive link's folder structure against what the node expects.
Dependencies "install" but the node still won't import - you ran pip against your system Python instead of the embedded one bundled with your ComfyUI install. This is the single most common CatVTON install complaint out there: locate the actual python.exe under your ComfyUI folder and run pip through that, not whatever python resolves to in your terminal.
The garment style comes out wrong - that's what mask_grow is for. Push it up if the old garment is bleeding through at the edges, down if the new one is getting cropped.
One honest expectation-setter: CatVTON is a 2024-era dedicated try-on model, and it's a lighter, faster tool than the DensePose-heavy alternatives - but by 2025 a lot of the community's virtual try-on traffic moved to prompting general instruction-edit models (Qwen-Image-Edit, Flux Kontext/Fill) directly, no separate model download or mask required. If you already have one of those in your stack, it's worth comparing before you commit to standing up a whole separate CatVTON pipeline. If you want a dedicated, lightweight, mask-driven try-on node without pulling in a big general editor, this is still a reasonable one to reach for.
Also worth a glance before commercial use: the wrapper defers licensing to the original CatVTON project, so check that repo's license terms rather than assuming this pack's MIT-style permissiveness carries over - academic virtual try-on models often ship under more restrictive research licenses.
Inputs (8)
| 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 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |