1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "mcp-sd15"
version = "0.1.0"
description = "MCP server for local Stable Diffusion 1.x image generation"
readme = "README.md"
requires-python = ">=3.11,<3.12"
dependencies = [
"accelerate>=1.1",
"controlnet-aux>=0.0.10",
"diffusers>=0.35",
"mcp>=2,<3",
"numpy>=1.26,<3",
"opencv-python-headless>=4.10",
"peft>=0.13",
"pillow>=10.4",
"safetensors>=0.4",
"torch==2.14.0+cu132",
"torchvision==0.29.0+cu132",
"transformers>=4.45,<5",
]
[project.scripts]
mcp-sd15 = "mcp_sd15.cli:main"
[dependency-groups]
dev = [
"pyright>=1.1.390",
"pytest>=8.3",
"pytest-asyncio>=0.24",
"ruff>=0.8",
]
[tool.uv.sources]
torch = { index = "pytorch-cu132" }
torchvision = { index = "pytorch-cu132" }
[[tool.uv.index]]
name = "pytorch-cu132"
url = "https://download.pytorch.org/whl/cu132"
explicit = true
[tool.hatch.build.targets.wheel]
packages = ["src/mcp_sd15"]
[tool.pytest.ini_options]
addopts = "-ra"
testpaths = ["tests"]
asyncio_mode = "auto"
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM", "RUF"]
[tool.pyright]
pythonVersion = "3.11"
typeCheckingMode = "standard"
include = ["src", "tests"]
venvPath = "."
venv = ".venv"
|