Nodes/comfyui-koukoutu/抠抠图-标准印花提取功能
ComfyUI Node

抠抠图-标准印花提取功能

Pull the print off a t-shirt without touching Photoshop

By zhenzi0322·Created 12 months ago·Updated 3 months ago· 4
抠抠图-标准印花提取功能
  • image
  • image
  • message
api_key
extract_type服装
resolution1k
size0:0
skip_errortrue

If you do print-on-demand or apparel design, you know the tedious manual job at the centre of it: someone hands you a photo of a shirt with a design on it, and you have to isolate that design into a clean, usable print file. That's exactly what KoukoutuImageExtract (抠抠图-标准印花提取功能) automates. Give it a garment photo, tell it what kind of pattern it's looking for, and it extracts the print/pattern as its own image - no pen tool, no selection marathon.

This is the node the whole comfyui-koukoutu pack is really built around. The pack is an API wrapper around Koukoutu, a Chinese cloud image-processing service, so the extraction happens on their servers: you upload, it processes, you get the result back. Nothing runs locally, you pay with credits, and the display names are all in the 抠抠图 (cutout) family - this is e-commerce tooling dressed as ComfyUI nodes. That also means your garment photos are leaving your machine, which is worth knowing before you batch a client's catalog through it.

How it works

Async, like most of this pack. The node saves your image as a temp PNG, submits a task to the async endpoint with the model key image-extract, then polls once a second with a progress bar until it's done, then downloads the result. Server errors retry up to five times; the whole job gives up after five minutes.

Inputs that matter

  • image - the photo with the print in it.
  • api_key - required, from koukoutu.com/user/dev, with credits.
  • extract_type - required. A freeform string describing what you're extracting; the README's examples are 服装 (clothing), 鞋包 (shoes/bags), 配饰 (accessories). The model uses this to know what kind of region to hunt for, so be specific rather than leaving it at 服装.
  • resolution - 1k or 4k, default 1k. 4k is sharper for print files but the tooltip is honest: it takes longer (and costs more).
  • size - output aspect ratio from 19 presets, default 0:0 meaning "keep original dimensions". The full list runs 1:1, 1:2, 2:1, 2:3, 3:2, 3:4, 3:5, 3:7, 4:3, 5:3, 6:7, 7:3, 7:6, 9:16, 16:9, 26:38, 27:50, 50:27 - handy if you already know the print file's target format.
  • skip_error - on by default.

Outputs

image (the extracted print) plus message ("成功" on success). Same fallback as the rest of the pack: with skip_error on, an error returns your original image and the error text on message, so an unchanged output means check the message, not the pixels.

Install

Installs with the whole pack, so you get all nine nodes in one go. ComfyUI Manager → search "koukoutu", or:

cd ComfyUI/custom_nodes
git clone https://github.com/zhenzi0322/comfyui-koukoutu
pip install -r requirements.txt

Restart ComfyUI and it's under image/koukoutu. No model files, dependencies are just requests/Pillow/numpy/torch. It's an API node that sends images and a key off-box by design, so install from the official repo only.

Troubleshooting

The 40x codes again do the talking: 401 bad key, 403/409 no credits, 406/413 file over 15MB (resolution 4k on a huge photo can trip this), 407 source under 70px, 422 bad params - which often means an extract_type the backend doesn't recognise. If the extraction comes back but the print is noisy or has artifacts, that's the model, not you: try the V2 extractor node in the same pack before hand-editing.

Categoryimage/koukoutu

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
api_keySTRING
extract_typeSTRING服装
resolutionoptCOMBO1k输出分辨率,4k 更清晰但耗时更长
sizeoptCOMBO0:0输出比例,0:0 表示按原图尺寸
skip_erroroptBOOLEANtrue

Outputs (2)

NameTypeDescription
imageIMAGE
messageSTRING