Nodes/comfyui-MJAPI-party/AI服装提取
ComfyUI Node

AI服装提取

Extract a garment onto a clean white or gray background

By MoJIeAIGC·Created about a year ago·Updated 17 days ago· 50
AI服装提取
  • image
  • output
resolution2K
style_type白底图
size1:1
seed0

Every marketplace listing needs the garment on a plain background, and getting there normally means either a professional flat-lay shoot or a matting tool plus cleanup. This node collapses that into one call: give it a photo of a piece of clothing and it extracts the garment and lays it on a clean white or gray background - the "AI服装提取" (AI clothing extraction) node from the pack's clothing series. It's the boring, high-volume job done by a model that's been aimed at exactly that boring, high-volume job.

How it works

The image is base64'd and sent to the gateway under the model id mojie_get_dressing, along with your chosen background style and output framing. The server separates garment from person or hanger, cleans up the shape, and composites it onto the flat background. Where a generic background remover leaves you a rough alpha, this is a purpose-built pipeline that also tends to fix the garment's silhouette and edges for listing use - that's the value-add over a generic matting node (the cut-out category gets its own treatment in the KB's background-removal essay).

The inputs that matter

  • image (IMAGE) - the source photo. Best results come from the garment on a person or hanger, decently lit, not heavily folded.
  • style_type (enum, default 白底图) - 白底图 = white background, 灰底图 = gray background. Pick to match the marketplace you're listing on (some platforms prefer gray to avoid pure-white clipping).
  • resolution (1K / 2K) - note this one tops out at 2K, not 4K. Fine for listings.
  • size (1:1, 3:4, 4:3) - output aspect.
  • seed (INT) - reproducibility.

One output, output (IMAGE).

Installing it

Part of comfyui-MJAPI-party. ComfyUI Manager → search "mojieapi_party" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/MoJIeAIGC/comfyui-MJAPI-party.git

Register at mojieaigc.com and put your key in config.ini (leave BASE_URL = https://www.mojieaigc.com/v1/completions alone):

[API]
KEY = your_api_key
BASE_URL = https://www.mojieaigc.com/v1/completions

Restart. No model downloads.

Common issues

  • Fabric details get simplified. Extraction models smooth out folds and sometimes lose delicate texture (lace, sheer fabric). If the garment's detail matters, feed a higher-res source and re-check the result rather than trusting the first pass.
  • The garment keeps a halo of its old background. Usually a lighting-mismatch problem in the source. Re-shoot with even lighting; a harshly shadowed photo is exactly what makes the edge cleaning fail.
  • It's one garment per call. This is a single-item node; batch your batch yourself. And like every node in the pack, each run is metered - for a hundred-item catalog that adds up, so it's worth testing on a handful first to make sure the output is what the client wants.
  • Error image with text - the pack's standard failure display (key, balance, timeout).
Category🎨MJapiparty/Product&tool

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
resolutionCOMBO2K2 options: 1K, 2K
style_typeCOMBO白底图2 options: 白底图, 灰底图
sizeCOMBO1:13 options: 1:1, 3:4, 4:3
seedINT0

Outputs (1)

NameTypeDescription
outputIMAGE