mcpField
I
image-editing

image-editing

github.com/awesome-genmediaクリエイティブ・メディア4439 回インストール32 週間前に更新
リポジトリ

image-editing について

image-editingは、each::senseを通じて自然言語で既存画像を編集するスキルです。依頼に応じて編集モデルを選び、オブジェクト変更、スタイルや色の調整、インペインティング、キャンバス拡張を行い、参考画像や連続編集にも対応します。

主な機能

  1. 01テキスト指示による画像編集
  2. 02オブジェクトの削除や追加
  3. 03スタイル変換と色調整
  4. 04インペインティングとアウトペインティング
  5. 05参考画像と連続編集への対応

活用シーン

  1. 01写真から不要な要素を削除
  2. 02画像にスタイルや色調を適用
  3. 03オブジェクトの置換やキャンバス拡張

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/awesome-genmedia/skills --skill image-editing

インストール後、Claude Code で/image-editingを入力して読み込まれたか確認します。

詳細

画像編集

each::sense を使って、自然言語の指示で既存の画像を編集します。each::sense は、リクエストに最適なモデルを自動的に選択するインテリジェントな AI エージェントです。

クイックスタート

each::labs API キーが必要です。eachlabs.ai で取得してください。

curl を使用する
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Change the sky to a dramatic orange and purple sunset. Keep the foreground untouched."},
              {"type": "image_url", "image_url": {"url": "https://example.com/landscape-photo.jpg"}}
            ]
          }
    ],
    "stream": false
  }'
Python を使用する(OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_EACHLABS_API_KEY",
    base_url="https://eachsense-agent.core.eachlabs.run/v1"
)

response = client.chat.completions.create(
    model="eachsense/beta",
    messages=[{"role": "user", "content": "Change the sky to a dramatic orange and purple sunset. Keep the foreground untouched."}],
    # Images are included in the message content array above
)

print(response.choices[0].message.content)
参照画像を使用する
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Apply the color grading and mood from the reference image to the target photo"},
              {"type": "image_url", "image_url": {"url": "https://example.com/target-photo.jpg"}},
              {"type": "image_url", "image_url": {"url": "https://example.com/style-reference.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

画像は OpenAI のマルチモーダルコンテンツ形式を使ってメッセージ内に送信されます。1 回のリクエストで送信できる画像は最大 4 枚です。

ストリーミング

リアルタイムの SSE レスポンスを受け取るには "stream": true を、1 つのレスポンスで結果全体を受け取るには "stream": false を設定します。ストリーミングは UI で進捗を表示する場合に便利です。スクリプトや自動化には、ストリーミングを使わない方法がよりシンプルです。

利用可能なモデル

モデル機能最適な用途
flux-2-edit自然言語による画像編集一般的な編集、スタイル変更、オブジェクトの変更
flux-fill-proインペインティングとアウトペインティングマスク領域の塗りつぶし、キャンバスの拡張
eachlabs-bg-remover-v1背景の削除被写体の切り抜き、透明な背景
topaz-upscale-image解像度の向上編集後のアップスケーリング、ディテールの復元
kling-face-swap顔の置き換え画像間での顔の入れ替え

each::sense は、指示に基づいて適切な編集モデルを自動的に選択します。変更したい内容を平易な英語で説明してください。

編集機能

カテゴリできること指示の例
オブジェクトの削除不要な要素を削除する「背景に立っている人物を削除してください」
オブジェクトの追加新しい要素を追加する「ベンチの隣に座っているゴールデンレトリバーを追加してください」
スタイル変換アートスタイルを変更する「この写真をスタジオジブリ風のイラストに変換してください」
カラーグレーディング色や雰囲気を調整する「オレンジ系の色調で、暖かみのあるビンテージフィルム風にしてください」
インペインティング領域を塗りつぶす、または置き換える「古い車を新しい Tesla に置き換えてください」
アウトペインティングキャンバスを拡張する「画像を左に広げて、ビーチをもっと見せてください」
レタッチ気になる部分を整える「肌のシミをなめらかにし、目を明るくしてください」
季節の変更時期や季節を変更する「夏の風景を雪の降る冬に変えてください」
照明照明条件を変更する「長い影ができるゴールデンアワーの照明に変更してください」

プロンプトのヒント

残すものを具体的に指定する

意図しない変更を防ぐため、変更せずに残すものを必ず指定してください。

"Change the wall color to teal blue. Keep the furniture, people, and floor exactly as they are."
特定の領域を指定する

空間を表す言葉を使って、特定の領域を指定してください。

"In the top-right corner, add a flock of birds flying in V-formation"
"Replace the object on the left side of the table with a vase of sunflowers"
会話を使って編集を連続して行う

複数ターンのメッセージを使って、編集を順番に適用してください。

{
  "messages": [
    {"role": "user", "content": "Remove the car from the driveway"},
    {"role": "assistant", "content": "..."},
    {"role": "user", "content": [
              {"type": "text", "text": "Now change the house color to light blue"},
              {"type": "image_url", "image_url": {"url": "https://example.com/house.jpg"}},
              {"type": "image_url", "image_url": {"url": "https://example.com/landscape-with-powerlines.jpg"}}
            ]
          }
    ],
    "stream": false
  }'
スタイル変換
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Transform this city street photo into a Van Gogh Starry Night style painting. Keep the composition and building shapes, but apply swirling brushstrokes and vibrant blues and yellows."},
              {"type": "image_url", "image_url": {"url": "https://example.com/city-street.jpg"}}
            ]
          }
    ],
    "stream": false
  }'
インペインティング(オブジェクトの置き換え)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Replace the wooden dining table with a sleek modern glass table. Keep the chairs, plates, and everything else on the table exactly the same."},
              {"type": "image_url", "image_url": {"url": "https://example.com/dining-room.jpg"}}
            ]
          }
    ],
    "stream": false
  }'
アウトペインティング(キャンバスの拡張)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Extend this portrait photo into a full 16:9 landscape by expanding the background on both sides. Continue the indoor environment naturally with consistent lighting and style."},
              {"type": "image_url", "image_url": {"url": "https://example.com/portrait-crop.jpg"}}
            ]
          }
    ],
    "stream": false
  }'
色と雰囲気の変更
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "messages": [{"role": "user", "content": [
              {"type": "text", "text": "Convert this daytime photo to a moody nighttime scene. Add soft neon reflections on wet pavement, streetlight glow, and a slight blue color grade. Keep all buildings and structures intact."},
              {"type": "image_url", "image_url": {"url": "https://example.com/daytime-street.jpg"}}
            ]
          }
    ],
    "stream": false
  }'

バッチ編集のワークフロー

# Apply the same edit across multiple product photos
IMAGES=(
  "https://example.com/product-1.jpg"
  "https://example.com/product-2.jpg"
  "https://example.com/product-3.jpg"
)

for IMG in "${IMAGES[@]}"; do
  curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
    -H "Content-Type: application/json" \
    -H "X-API-Key: $EACHLABS_API_KEY" \
    -d "{
      \"messages\": [{\"role\": \"user\", \"content\": \"Remove the background and replace with a clean white studio backdrop. Add a soft drop shadow beneath the product.\"}],
      \"image_urls\": [\"$IMG\"],
      \"stream\": false
    }"
  echo "---"
done

よくある問題

  • 指示が曖昧:「もっと良くして」では、予測できない結果になります。何を変更するのか、具体的に伝えてください。
  • 変更しないものを指定し忘れる:意図しない編集を避けるため、変えずに残すものを必ず指定してください。
  • 指示が矛盾している:「車を削除して、車を赤くしてください」は矛盾しています。
  • ピクセル単位で完璧なマスクを期待する:自然言語で領域を説明してください。モデルは文脈に応じて領域を解釈します。
  • 一度に編集しすぎる:複雑な編集は、会話のターンを分けて順番に行うほうが効果的です。

関連スキル

ドキュメント

コメント