Nodes/ComfyUI-KLingAI-API/Virtual Try On
ComfyUI Node

Virtual Try On

Put a garment on a person with two photos and one KLing API call

By KlingAIResearch·Created 2 years ago·Updated 10 months ago· 174
Virtual Try On
  • client
  • human_image
  • cloth_image
  • image
model_name

This is one of the more single-purpose nodes in the KLingAI-API pack, and also one of the more genuinely useful ones: give it a photo of a person and a photo of a garment, and it hands back the person wearing that garment. It's built on Kolors, Kuaishou's own text-to-image model, specifically their virtual try-on feature - the README calls it "Kolors Virtual Try-On." If you've ever wanted product-mockup-style e-commerce shots without a photoshoot, or you're prototyping a fashion workflow and don't want to fight a local inpainting setup to get convincing garment fit, this is the fast path.

How it works

Like every node in this pack, there's no local inference - the node ships your two images to KLing's servers, where the Kolors try-on model does the actual garment transfer (fitting the cloth's shape, drape, and texture onto the person's pose) and hands back a composited result. You're not doing masking or manual alignment; the model figures out where the garment goes and how it should hang given the person's pose in the source photo.

The inputs and outputs that matter

This one's refreshingly simple - no tuning knobs, no optional fields at all:

  • model_name - kolors-virtual-try-on-v1 or kolors-virtual-try-on-v1-5. Go with v1-5 unless you have a specific reason not to; it's the newer of the two.
  • human_image - the person. A clear, front-facing, reasonably well-lit photo gives the model the best pose to work with.
  • cloth_image - the garment, ideally shot flat or on a mannequin/hanger rather than already worn by someone else - the model does better isolating the garment when it isn't tangled up with another person's body.

The single output is image - the composited result, ready for a Preview/Save Image node or further editing.

Installing it

Through ComfyUI Manager: search ComfyUI-KLingAI-API and install. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/KwaiVGI/ComfyUI-KLingAI-API
cd ComfyUI-KLingAI-API && pip install -r requirements.txt

Nothing downloads locally - Kolors runs entirely on KLing's side. What you actually need is a KLing AI API key wired through a Client node upstream, since client is a required input here just like every other generation node in the pack. Get the access_key/secret_key pair from KLing's developer console; the README's tip about keeping the key out of shared workflow files by putting it in config.ini instead applies here too.

Common issues

Because there's no negative_prompt or fidelity slider to fight with, the main failure mode isn't a bad setting - it's a bad input photo. Heavily cropped or angled human photos confuse the pose estimation the model needs to fit the garment correctly, and garment photos with a lot of background clutter or a second person already wearing the item tend to produce warped results. Beyond that, the usual API-node problems apply: an unauthenticated or wrong-region Client (KLing splits accounts into global and china - mismatch the area setting and every call in the graph fails, not just this one), or simply running out of balance on your KLing account, since each call is billed there, not against anything on comfy.icu. If the node returns cleanly but the output looks off, it's worth trying a straighter-on human photo before assuming the node is broken - this model, like most virtual try-on systems, is noticeably more reliable on simple, front-on poses than on anything dynamic.

CategoryKLingAI

Inputs (4)

NameTypeDefaultDescription
clientKLING_AI_API_CLIENT
model_nameCOMBO2 options: kolors-virtual-try-on-v1, kolors-virtual-try-on-v1-5
human_imageIMAGE
cloth_imageIMAGE

Outputs (1)

NameTypeDescription
imageIMAGE