Run TryOn or TryOff Inference [ComfyUI-Flux-TryOff]
One run node to rule try-on and try-off both
- image_in
- mask_in
- pipe
- garment_in
- garment_image
- tryon_image
The pack's other two run nodes - Run TryOn Inference and Run TryOff Inference - each do one job. This one does both, decided by a single input: whether you feed it a garment. Give it a garment and it puts clothes on; leave that input empty and it takes them off. It's the closest thing this pack has to a single "do the thing" button.
How the switching works
The behavior hinges on garment_in, the one input the dedicated run nodes don't have. From the source: if garment_in is provided (not None), it calls the try-on path - concat the garment image next to the masked person, fill the double-width canvas, crop the pair apart. If it's left empty, it calls the try-off path - no garment, so the model fills that half with a synthesized garment and regenerates the masked clothing region as the person without it. Same side-by-side CatVTON mechanism, one switch.
Everything else is the standard run-node surface you've seen in the other two:
- image_in - the person. mask_in - mask over the current clothing.
- pipe -
MODELfrom the FluxFill pipeline loaders. - width / height (default 576×768), num_steps (default 50), guidance_scale (default 30), seed, prompt (the two-image "[IMAGE1]/[IMAGE2]" structure).
The naming trap
Here's where it bites. The outputs are hardcoded to garment_image and tryon_image - always. Run it in try-off mode and the second output is still labeled "tryon_image," but it's actually your try-off result (the person without clothes). The code returns it in that slot regardless of mode, and the brief/UI just keep the same label. It's cosmetic - the tensor is correct, only the name lies - but if you're building a workflow that routes outputs by name, know that "tryon_image" from this node is only trustworthy when you fed it a garment. The dedicated TryOff Run Node exists precisely to avoid this confusion, with its honestly-named tryoff_image output.
When to use it vs. the dedicated nodes
If you're experimenting - "what does this model do to this photo both ways?" - this node is convenient: one runner, just add or drop a garment. But for a workflow you'll share or reuse, the dedicated nodes are clearer and fail less confusingly. This is also the node that makes it trivial to toggle try-on/try-off with a simple conditional wiring your choice of garment image, if you're into that kind of graph.
Install & troubleshooting
Pack install is the usual: ComfyUI Manager → search "ComfyUI-Flux-TryOff", or git clone https://github.com/asutermo/ComfyUI-Flux-TryOff into custom_nodes, restart. Models auto-download on first run. The mask comes from LayerStyle's SegFormer in the sample workflows - install LayerStyle via Manager and clone the SegFormer model or you'll hit the segformer_b2_clothes error:
cd ComfyUI/models
git clone https://huggingface.co/mattmdjaga/segformer_b2_clothes
And the standing performance disclaimer: the author tested on a 4080 and calls it "quite slow" - a 4090 or better is the real recommendation, and quantizing via the TryOff Quantizer (8-bit is the documented default) is how you keep it running on smaller cards. Try-on and try-off both inherit all of that.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image_in | IMAGE | — | |
| mask_in | MASK | — | |
| pipe | MODEL | — | |
| width | INT | 576128–1024 | — |
| height | INT | 768128–1024 | — |
| num_steps | INT | 501–100 | — |
| guidance_scale | FLOAT | 30.01–100 | — |
| seed | INT | 42 | — |
| prompt | STRING | The pair of images highlights clothing and its styling on a model, high resolution, 4K, 8K; [IMAGE1] Detailed product shot of clothing [IMAGE2] The same clothing is worn by a model in a lifestyle setting. | — |
| garment_inopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| garment_image | IMAGE | — |
| tryon_image | IMAGE | — |