Nodes/ComfyUI-CatvtonFluxWrapper/Sample Catvton Flux
ComfyUI Node

Sample Catvton Flux

The node that actually puts the garment on the person

By lujiazho·Created 2 years ago·Updated 2 years ago· 94
Sample Catvton Flux
  • CatvtonFluxModel
  • image
  • mask
  • garment
  • TryonResult
  • GarmentResult
prompt
steps30
guidance_scale30.00
seed0
width768
height1024
keep_in_GPUfalse

This is where the actual work happens. LoadCatvtonFlux or LoadCatvtonFluxLoRA just get you a model; this node is the one that takes a person photo, a garment photo, and a mask, and generates the person wearing that garment. It's the reason the whole pack exists, and it's the node people are actually searching for when they land on this page.

How it works

The mechanism is the classic CatVTON trick, adapted onto Flux Fill: the garment image and the person image effectively share one canvas, the mask marks only the clothing region on the person's side, and Flux Fill's inpainting attention pulls texture and pattern across from the garment into the masked region during denoising - the same "unmasked region is fixed context, masked region gets regenerated" mechanic that powers ordinary inpainting, just applied to a garment photo instead of a blank fill. That's also why you get two images back instead of one: the model is working across both halves of that shared canvas, and the second output is essentially a receipt that it read the garment correctly.

Inputs and outputs that matter

Most of the required fields are the usual sampler knobs, but three are the actual content:

  • image - the person you're dressing.
  • mask - the region to replace, i.e. the clothing area on that person. Get this from the pack's SAM2-based example workflow (auto-segmented) or paint it by hand using the "Draw" example workflow. Mask quality drives result quality here more than almost any other setting - a loose or inaccurate mask means warped edges and garment bleed, same as it would for any other masked-inpainting job.
  • garment - the reference clothing photo you want transferred onto the person.

The rest: prompt (a text nudge, keep it short - this is a garment-transfer task, not a from-scratch generation), steps (default 30, standard denoising step count), seed, width/height (default 768×1024, a portrait fashion-shot aspect that matches typical outfit photography - no strong reason to go bigger given the VRAM situation below), and keep_in_GPU (default off). That last one decides whether the model stays resident in VRAM between runs or gets released after each one; given how VRAM-hungry the full pipeline already is, off-by-default is the sane choice - flip it on only if you're running several try-ons back to back and actually have headroom to spare.

One that deserves its own callout: guidance_scale defaults to 30, not the 3.5 you'd expect from ordinary Flux Dev. That's not a typo and don't "fix" it down - Fill-family models run guidance much hotter than base Flux, and this matches Black Forest Labs' own Fill dev example code. Leave it alone unless you have a specific reason not to.

Outputs are two IMAGEs: TryonResult, the actual image you want - the person now wearing the garment - and GarmentResult, a companion crop that mirrors the garment side of the same generation. Use the second one as a quick sanity check: if the garment in GarmentResult already looks wrong (wrong color, warped pattern), the problem is upstream of the try-on itself and no amount of resampling TryonResult will fix it.

Installing it

Same pack, same install - ComfyUI Manager search for ComfyUI-CatvtonFluxWrapper, or git clone into custom_nodes and restart. This node itself needs nothing extra beyond whatever LoadCatvtonFlux or LoadCatvtonFluxLoRA already required to get you a CatvtonFluxModel to plug in.

Where people get burned

VRAM. Same story as the loader nodes - the full pipeline has been reported OOMing on 24GB cards. If you're hitting that here rather than at load time, don't bump width/height past the defaults trying to "fix" quality; if anything go smaller, and check whether you're on the heavy LoadCatvtonFlux path when the LoRA path would fit.

A bad mask masquerading as a bad model. If results look warped at the garment edges or the pattern doesn't transfer cleanly, check the mask before you touch any sampler setting - this is standard inpainting wisdom and it applies here just as much as anywhere else masks show up.

keep_in_GPU left on during a long batch. Fine for one or two runs, but if you're churning through many garments in a session and VRAM gets tight, turn it off between batches rather than fighting for headroom the whole time.

CategoryCatvtonFluxWrapper

Inputs (11)

NameTypeDefaultDescription
CatvtonFluxModelCatvtonFluxModel
promptSTRING
imageIMAGE
maskMASK
garmentIMAGE
stepsINT30
guidance_scaleFLOAT30.00
seedINT00–18446744073709550000
widthINT768
heightINT1024
keep_in_GPUBOOLEANfalse

Outputs (2)

NameTypeDescription
TryonResultIMAGE
GarmentResultIMAGE