AI同款服装替换
Put the product on the model, no photoshoot required
- cloths_image
- model_image
- output
AI同款服装替换, "AI same-style garment replacement," is the node that makes the pack's clothing pipeline feel like cheating. You give it two pictures - a photo of a garment on its own, and a photo of a model in something else - and it swaps the model into your garment while keeping the person, the pose, and the lighting. The "same款" (same-style) part is the point: this is try-on as a service, for when your catalog has the flat product shot but not the model wearing it.
It's also the simplest node in the whole series. Look at the inputs: cloths_image, model_image, seed. That's it. No style presets, no prompt field, no resolution dial. The source sends both images to Mojie's dressV2ing_diffusion model and comes back with the composite. There's a small piece of real engineering under the hood worth knowing: the node reads your model photo's aspect ratio and rounds it to the closest of ten standard ratios (21:9 down to 9:16) before the call, so the swap keeps your framing instead of whatever the backend defaults to. That's the author quietly solving the "why is my output the wrong shape" problem for you.
How to use it
Wire model_image (the person) and cloths_image (the product) into their slots, pick a seed, run. Output is output, a single IMAGE - preview it, save it, or chain it downstream. In the pack's intended flow, this node pairs with ModelGenNode (generate a model for the garment) and MoterPoseNode (change that model's pose), and the author ships the whole thing pre-wired in workflow/服装模特生成(合集).json - drag that in and you'll see the intended architecture at a glance.
Installing it
Identical to every node in the pack, because they're one repo:
cd ComfyUI/custom_nodes
git clone https://github.com/MoJIeAIGC/comfyui-MJAPI-party.git
or search "mojieapi_party" in ComfyUI Manager. Then register at mojieaigc.com, paste your key into config.ini, restart. No model files. The requirements.txt is small; opencv-python is the heaviest new dependency.
Where it gets tricky
- You get what the model gives. With no prompt and no controls, if the fabric folds come out wrong you can't nudge it - rerun with a different
seedand hope, or composite the result with a local editor. - Watch the balance. Dress-swap diffusion is one of the pricier hosted operations in the pack, and it burns credits per call. The 403 red-error image is the pack's way of telling you the balance ran dry.
- The aspect-ratio rounding is a feature, mostly. A model photo in a weird non-standard ratio gets snapped to the nearest preset; if the output crops feel slightly off, that's why. Re-frame your model image to a standard ratio on the way in and it'll behave.
- This is the "model is not on your machine" pattern, plain and simple - the KB's API-nodes essay covers the tradeoff exhaustively. For a small shop without a studio, hosted try-on beats renting a GPU for a local diffusion pipeline; just know your garment photos leave the machine.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| cloths_image | IMAGE | — | |
| model_image | IMAGE | — | |
| seed | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | IMAGE | — |