mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-22 20:30:25 +08:00
switch to hatchling
This commit is contained in:
parent
b6d3f1fb08
commit
c74cf3866f
@ -6,7 +6,7 @@ readme = "README.md" # Optional: if you have a README
|
|||||||
authors = [
|
authors = [
|
||||||
{ name = "Contributors_of_ComfyUI" },
|
{ name = "Contributors_of_ComfyUI" },
|
||||||
]
|
]
|
||||||
requires-python = ">=3.10,<3.14"
|
requires-python = ">=3.10"
|
||||||
license = { text = "Specify License Here" } # Optional: Add your license
|
license = { text = "Specify License Here" } # Optional: Add your license
|
||||||
classifiers = [# Optional: Standard PyPI classifiers
|
classifiers = [# Optional: Standard PyPI classifiers
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
@ -32,7 +32,7 @@ dependencies = [
|
|||||||
"peft>=0.10.0",
|
"peft>=0.10.0",
|
||||||
"torchinfo",
|
"torchinfo",
|
||||||
"safetensors>=0.4.2",
|
"safetensors>=0.4.2",
|
||||||
"bitsandbytes",
|
"bitsandbytes; platform_system != 'Darwin'",
|
||||||
"aiohttp>=3.11.8",
|
"aiohttp>=3.11.8",
|
||||||
"yarl>=1.9.4",
|
"yarl>=1.9.4",
|
||||||
"accelerate>=0.25.0",
|
"accelerate>=0.25.0",
|
||||||
@ -98,11 +98,12 @@ dependencies = [
|
|||||||
"av",
|
"av",
|
||||||
"typer",
|
"typer",
|
||||||
"ijson",
|
"ijson",
|
||||||
|
"scikit-learn>=1.4.1"
|
||||||
]
|
]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools>=61.0", "wheel", "pip"]
|
requires = ["hatchling"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
where = ["."]
|
where = ["."]
|
||||||
@ -111,21 +112,21 @@ namespaces = false
|
|||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
cpu = [
|
cpu = [
|
||||||
"torch>=2.3.0",
|
"torch",
|
||||||
"torchvision>=0.15.0",
|
"torchvision",
|
||||||
"torchaudio>=2.3.0",
|
"torchaudio",
|
||||||
]
|
]
|
||||||
|
|
||||||
cuda = [
|
cuda = [
|
||||||
"torch>=2.3.0",
|
"torch",
|
||||||
"torchvision>=0.15.0",
|
"torchvision",
|
||||||
"torchaudio>=2.3.0",
|
"torchaudio",
|
||||||
]
|
]
|
||||||
|
|
||||||
rocm = [
|
rocm = [
|
||||||
"torch>=2.3.0",
|
"torch",
|
||||||
"torchvision>=0.18.0",
|
"torchvision",
|
||||||
"torchaudio>=2.3.0",
|
"torchaudio",
|
||||||
]
|
]
|
||||||
|
|
||||||
dev = [
|
dev = [
|
||||||
@ -146,11 +147,9 @@ dev = [
|
|||||||
|
|
||||||
triton = [
|
triton = [
|
||||||
"triton ; sys_platform == 'Linux'",
|
"triton ; sys_platform == 'Linux'",
|
||||||
# Using direct URL references with markers for Windows + Python versions
|
|
||||||
'triton @ https://github.com/woct0rdho/triton-windows/releases/download/v3.2.0-windows.post9/triton-3.2.0-cp312-cp312-win_amd64.whl ; sys_platform == "Windows" and python_version == "3.12"',
|
'triton @ https://github.com/woct0rdho/triton-windows/releases/download/v3.2.0-windows.post9/triton-3.2.0-cp312-cp312-win_amd64.whl ; sys_platform == "Windows" and python_version == "3.12"',
|
||||||
'triton @ https://github.com/woct0rdho/triton-windows/releases/download/v3.2.0-windows.post9/triton-3.2.0-cp311-cp311-win_amd64.whl ; sys_platform == "Windows" and python_version == "3.11"',
|
'triton @ https://github.com/woct0rdho/triton-windows/releases/download/v3.2.0-windows.post9/triton-3.2.0-cp311-cp311-win_amd64.whl ; sys_platform == "Windows" and python_version == "3.11"',
|
||||||
'triton @ https://github.com/woct0rdho/triton-windows/releases/download/v3.2.0-windows.post9/triton-3.2.0-cp310-cp310-win_amd64.whl ; sys_platform == "Windows" and python_version == "3.10"',
|
'triton @ https://github.com/woct0rdho/triton-windows/releases/download/v3.2.0-windows.post9/triton-3.2.0-cp310-cp310-win_amd64.whl ; sys_platform == "Windows" and python_version == "3.10"',
|
||||||
# Note: No Python 3.13 wheel provided in requirements-triton.txt for v3.2.0 post9 link
|
|
||||||
]
|
]
|
||||||
|
|
||||||
withtorch = ["comfyui[cuda]"] # Depends on the 'cuda' extra
|
withtorch = ["comfyui[cuda]"] # Depends on the 'cuda' extra
|
||||||
@ -168,7 +167,7 @@ Repository = "https://github.com/comfyanonymous/ComfyUI" # Example
|
|||||||
|
|
||||||
[tool.uv]
|
[tool.uv]
|
||||||
conflicts = [
|
conflicts = [
|
||||||
[ { extra = "cpu" }, { extra = "cuda" }, { extra = "rocm" } ],
|
[{ extra = "cpu" }, { extra = "cuda" }, { extra = "rocm" }],
|
||||||
]
|
]
|
||||||
|
|
||||||
[[tool.uv.index]]
|
[[tool.uv.index]]
|
||||||
@ -177,32 +176,35 @@ url = "https://download.pytorch.org/whl/cpu"
|
|||||||
explicit = true
|
explicit = true
|
||||||
|
|
||||||
[[tool.uv.index]]
|
[[tool.uv.index]]
|
||||||
name = "pytorch-cu124"
|
name = "pytorch-cu126"
|
||||||
url = "https://download.pytorch.org/whl/cu124"
|
url = "https://download.pytorch.org/whl/cu126"
|
||||||
explicit = true
|
explicit = true
|
||||||
|
|
||||||
[[tool.uv.index]]
|
[[tool.uv.index]]
|
||||||
name = "pytorch-rocm" # Added ROCm index
|
name = "pytorch-rocm"
|
||||||
url = "https://download.pytorch.org/whl/rocm6.2" # Using ROCm 6.2 index from examples
|
url = "https://download.pytorch.org/whl/rocm6.3"
|
||||||
explicit = true
|
explicit = true
|
||||||
|
|
||||||
[tool.uv.sources]
|
[tool.uv.sources]
|
||||||
torch = [
|
torch = [
|
||||||
{ index = "pytorch-cpu", extra = "cpu" },
|
{ index = "pytorch-cpu", extra = "cpu" },
|
||||||
{ index = "pytorch-cu124", extra = "cuda", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
|
{ index = "pytorch-cu126", extra = "cuda", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
|
||||||
{ index = "pytorch-rocm", extra = "rocm", marker = "sys_platform == 'linux'" }, # ROCm only on Linux
|
{ index = "pytorch-rocm", extra = "rocm", marker = "sys_platform == 'linux'" },
|
||||||
]
|
]
|
||||||
torchvision = [
|
torchvision = [
|
||||||
{ index = "pytorch-cpu", extra = "cpu" },
|
{ index = "pytorch-cpu", extra = "cpu" },
|
||||||
{ index = "pytorch-cu124", extra = "cuda", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
|
{ index = "pytorch-cu126", extra = "cuda", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
|
||||||
{ index = "pytorch-rocm", extra = "rocm", marker = "sys_platform == 'linux'" }, # ROCm only on Linux
|
{ index = "pytorch-rocm", extra = "rocm", marker = "sys_platform == 'linux'" },
|
||||||
]
|
]
|
||||||
torchaudio = [
|
torchaudio = [
|
||||||
{ index = "pytorch-cpu", extra = "cpu" },
|
{ index = "pytorch-cpu", extra = "cpu" },
|
||||||
{ index = "pytorch-cu124", extra = "cuda", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
|
{ index = "pytorch-cu126", extra = "cuda", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
|
||||||
{ index = "pytorch-rocm", extra = "rocm", marker = "sys_platform == 'linux'" }, # ROCm only on Linux
|
{ index = "pytorch-rocm", extra = "rocm", marker = "sys_platform == 'linux'" },
|
||||||
|
]
|
||||||
|
comfyui-frontend-package = [
|
||||||
|
# { git = "https://github.com/appmana/appmana-comfyui-frontend", subdirectory = "comfyui_frontend_package" },
|
||||||
|
{ workspace = true }
|
||||||
]
|
]
|
||||||
comfyui-frontend-package = { git = "https://github.com/appmana/appmana-comfyui-frontend", subdirectory = "comfyui_frontend_package" }
|
|
||||||
|
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
@ -213,4 +215,10 @@ lint.select = [
|
|||||||
"W", # pycodestyle Warnings
|
"W", # pycodestyle Warnings
|
||||||
"F", # Pyflakes
|
"F", # Pyflakes
|
||||||
]
|
]
|
||||||
exclude = ["*.ipynb"]
|
exclude = ["*.ipynb"]
|
||||||
|
|
||||||
|
[tool.hatch.metadata]
|
||||||
|
allow-direct-references = true
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.wheel]
|
||||||
|
packages = ["comfy/", "comfy_extras/"]
|
||||||
Loading…
Reference in New Issue
Block a user