<feed xmlns='http://www.w3.org/2005/Atom'>
<title>generate-image-sd15-mcp.git/src/mcp_sd15/preprocessors/openpose.py, branch v0.1.0</title>
<subtitle>MCP tool for image generation used stable diffusion 1.5.
</subtitle>
<id>https://git.takashi-2521.com/generate-image-sd15-mcp.git/atom?h=v0.1.0</id>
<link rel='self' href='https://git.takashi-2521.com/generate-image-sd15-mcp.git/atom?h=v0.1.0'/>
<link rel='alternate' type='text/html' href='https://git.takashi-2521.com/generate-image-sd15-mcp.git/'/>
<updated>2026-09-12T09:04:56+00:00</updated>
<entry>
<title>feat: Stable Diffusion 1.x MCPサーバを実装</title>
<updated>2026-09-12T09:04:56+00:00</updated>
<author>
<name>tanaka takashi</name>
<email>isazaka@gmail.com</email>
</author>
<published>2026-09-12T09:04:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.takashi-2521.com/generate-image-sd15-mcp.git/commit/?id=cba15a62829a0fe57a03c8031f981e8f790e2efc'/>
<id>urn:sha1:cba15a62829a0fe57a03c8031f981e8f790e2efc</id>
<content type='text'>
仕様書・設計書に基づき、ローカルCUDA GPU上のStable Diffusion 1.x互換モデルをMCP経由で利用するサーバを新規実装。

実装内容:
- generate_image、generate_guided_image、inpaint_imageの3ツールをMCP SDK v2で公開
- TOMLからcheckpoint、VAE、複数LoRAと重み、ControlNet、生成設定を読み込み
- モデル種別ごとの固定ディレクトリ解決と起動時の設定・ファイル存在検証を追加
- Depth/MiDaS、OpenPose body/full、ControlNet Inpaintの前処理とパイプライン切替を実装
- FP16/CUDA、1枚固定生成、ControlNetオンデマンドロード、単一GPU直列実行を実装
- Base64 PNG/JPEG入力の形式・サイズ検証と任意のdata URI入力に対応
- seed、サイズ、モード、時刻、処理時間をPNG metadataへ記録
- 任意のローカルPNG保存、生成エラー分類、CUDA OOM後のキャッシュ回復を追加
- --configと--versionを備えたstdio CLIエントリポイントを追加

開発・運用:
- Python 3.11およびuvによる依存・lock管理を構成
- config.example.tomlとセットアップ・運用手順をREADMEへ追加
- Ruff、Pyright、pytestの設定を追加
- 設定、パス解決、schema、画像検証、サービスルーティング、排他制御、MCP画像返却をテスト

検証結果:
- pytest: 30 passed
- Ruff lint/format: passed
- Pyright: 0 errors, 0 warnings
- CLI versionおよびMCPクライアント経由のPNG返却を確認
- 実GPU smoke testはCUDA GPUとモデルファイルがないため対象外
</content>
</entry>
</feed>
