<feed xmlns='http://www.w3.org/2005/Atom'>
<title>generate-image-sd15-mcp.git/script/benchmark_generate_image.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-12T14:20:37+00:00</updated>
<entry>
<title>test: MCP画像生成ベンチマークを追加</title>
<updated>2026-09-12T14:20:37+00:00</updated>
<author>
<name>tanaka takashi</name>
<email>isazaka@gmail.com</email>
</author>
<published>2026-09-12T14:20:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.takashi-2521.com/generate-image-sd15-mcp.git/commit/?id=49d672ef4f605fddddc4040b650aed76cbf27b2a'/>
<id>urn:sha1:49d672ef4f605fddddc4040b650aed76cbf27b2a</id>
<content type='text'>
実モデルを使用し、in-process MCP clientからgenerate_imageを再現可能に比較するbenchmark_generate_image.pyを追加。MCP schemaを変更せず、ベンチマーク内部だけでseedを固定し、2種類の評価シーンを同条件で生成できるようにした。

config、checkpoint、LoRA、VAE、scheduler、steps、CFGに加え、モデルロード時間、生成時間、prompt token数、PyTorch allocatorのallocated/reserved peakをJSONへ記録する。白背景率、外周白率、外周色分散、edge strengthも算出し、生成PNGと計測結果を指定先へ保存する。

CLIP tokenizerの最大長を生成前に検証し、token切り捨てによる比較条件の欠落を防止。READMEへ実行例と、CUDA初回warm-upを含む1枚目ではなく2枚目の定常生成時間を比較に使う注意事項を追加した。

実GPU検証としてRTX 5050、CUDA 13.2環境で18 configをvalidationし、MCP経由で36枚を生成。Ruff、Pyright、pytest（61 passed）、git diff --checkの成功を確認済み。モデル、config、prompt、生成画像、計測JSONを含むdata/配下は.gitignore対象のためコミットには含めない。
</content>
</entry>
</feed>
