界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

stable-diffusion-inpainting

stable-diffusion-inpainting

【效率与协作】Stable Diffusion Inpainting | AI Image Inpainting. Edit and fill parts of images using masks and text prompts. Triggers: sd inpainting, inpaint, image editing, mask fill, stable diffusion inpaint

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: stable-diffusion-inpainting description: "Stable Diffusion Inpainting | AI Image Inpainting. Edit and fill parts of images using masks and text prompts. Triggers: sd inpainting, inpaint, image editing, mask fill, stable diffusion inpaint" allowed-tools: Bash(curl *), WebFetch

Stable Diffusion Inpainting

Edit and fill parts of images using masks and text prompts with Stable Diffusion. Specify areas to regenerate with a black-and-white mask and guide the generation with a text prompt.

Quick Start

Requires an each::labs API key. Get one at eachlabs.ai.

curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "stable-diffusion-inpainting",
    "version": "0.0.1",
    "input": {
      "prompt": "a beautiful garden with colorful flowers and butterflies",
      "image": "https://example.com/backyard.jpg",
      "mask": "https://example.com/mask.jpg",
      "guidance_scale": 7.5,
      "num_inference_steps": 50
    }
  }'

Parameters

ParameterTypeDefaultDescription
disable_safety_checkerbooleanfalseDisable safety checker for generated images
guidance_scalenumber7.5Scale for classifier-free guidance
heightinteger512Output image height
imagestring-Initial image to generate variations of. Will be resized to height x width
maskstring-Black and white mask image. White areas are inpainted
negative_promptstring-Specify things to not see in the output
num_inference_stepsinteger50Number of denoising steps
num_outputsinteger1Number of images to generate
promptstringa vision of paradise. unreal engineInput prompt
schedulerstringDPMSolverMultistepScheduler. enum: DDIM, K_EULER, DPMSolverMultistep, K_EULER_ANCESTRAL, PNDM, KLMS
seedinteger-Random seed. Leave blank to randomize
widthinteger512Output image width

Examples

Object removal and replacement:

curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "stable-diffusion-inpainting",
    "version": "0.0.1",
    "input": {
      "prompt": "a clean wooden desk with a laptop and a cup of coffee, office background",
      "image": "https://example.com/messy-desk.jpg",
      "mask": "https://example.com/desk-mask.jpg",
      "negative_prompt": "blurry, low quality, distorted",
      "guidance_scale": 8,
      "num_inference_steps": 50,
      "scheduler": "K_EULER"
    }
  }'

Multiple inpainting outputs:

curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "stable-diffusion-inpainting",
    "version": "0.0.1",
    "input": {
      "prompt": "a cute orange tabby cat sitting on a windowsill",
      "image": "https://example.com/window.jpg",
      "mask": "https://example.com/windowsill-mask.jpg",
      "num_outputs": 3,
      "guidance_scale": 7.5,
      "num_inference_steps": 40,
      "seed": 42
    }
  }'

Related Models

Documentation

我的收藏