Nodes/comfyui-koukoutu/抠抠图-扩图功能
ComfyUI Node

抠抠图-扩图功能

Turn a square product shot into a banner, no inpaint model required

By zhenzi0322·Created 12 months ago·Updated 3 months ago· 4
抠抠图-扩图功能
  • image
  • image
  • message
api_key
left0
right0
top365
bottom0
skip_errortrue

KoukoutuOutpaint (抠抠图-扩图功能) extends the edges of an image - the AI "invent the missing context" trick - without you running a single inpaint model. You give it a photo, tell it how many pixels to add on each side, and the Koukoutu cloud model grows the canvas and fills in plausible continuation. The KB's inpainting essay calls out outpaint as a distinctly fiddly local job (masks, tiling, seam blending); this node is the "just make it bigger on the right side" version for people who'd rather not babysit any of that.

The genuinely nice bit is the per-direction control. A lot of hosted and local tools only do symmetric or preset expansions; here you set left, right, top and bottom independently, in pixels, up to 1000 each. That's the difference between "grow this evenly" and "I need the image 400px wider on the right so it fits a web banner slot" - which is exactly the product-catalog use case this pack lives for.

How it works

Async, like most of the pack: upload the image, submit a task (model key image-outpaint) where the four margins are packed into a left,right,top,bottom string, poll once a second with a progress bar, download the result. Server 5xx retries up to five times; five-minute cap.

Inputs that matter

  • image - the photo to expand.
  • api_key - required; koukoutu.com/user/dev with credits.
  • left / right / top / bottom - INT, 0–1000 pixels. Note the shipped default is top: 365 and everything else 0, which smells like it was tuned for one specific product workflow - don't take it as a sensible general default. Set all four to what you actually need. 365px up means the model is inventing a whole strip of sky/ceiling; start small (50–200px) and check the result before committing to a big expansion.
  • skip_error - on by default.

Outputs

image (the expanded canvas) plus message. Standard fallback: with skip_error on, an error returns your original image unchanged with the error text on message.

Install

Ships with the whole pack, so one install gets you all nine nodes:

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

Or search "koukoutu" in ComfyUI Manager, then restart. Light dependencies, no models, no VRAM. Standard API-wrapper caveats apply: paid credits, your images leave the machine, install from the official repo.

Troubleshooting

The usual 40x family: 401 bad key, 403/409 no credits, 406/413 file over 15MB, 407 source too small, 422 bad params, 429 rate limit. The practical failure mode to watch is seams - if the expanded region doesn't match the original's lighting, that's the model doing a weak job of continuation on a big margin, and the fix is a smaller margin rather than a setting. Also, expanding a low-res source doesn't add detail; the filler is generation, not magic, so feed it the largest sensible source.

Categoryimage/koukoutu

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
api_keySTRING
leftoptINT00–1000左侧扩图边距(像素)
rightoptINT00–1000右侧扩图边距(像素)
topoptINT3650–1000上方扩图边距(像素)
bottomoptINT00–1000下方扩图边距(像素)
skip_erroroptBOOLEANtrue

Outputs (2)

NameTypeDescription
imageIMAGE
messageSTRING