diff --git a/__init__.py b/__init__.py new file mode 100644 index 000000000..fed5ec43b --- /dev/null +++ b/__init__.py @@ -0,0 +1,7 @@ +""" +ComfyUI - The most powerful and modular diffusion model GUI, API and backend. +""" + +from comfyui_version import __version__ + +__all__ = ["__version__"] \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5361562a0..c2c9921c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,24 +1,87 @@ [build-system] -requires = ["setuptools>=42", "wheel"] +requires = ["setuptools>=61.0.0", "wheel", "uv"] build-backend = "setuptools.build_meta" [project] -name = "ComfyUI" +name = "comfyui" version = "0.3.30" description = "The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface." readme = "README.md" license = { file = "LICENSE" } requires-python = ">=3.9" +authors = [ + { name = "ComfyUI Team", email = "contact@comfy.org" } +] +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Operating System :: OS Independent", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Multimedia :: Graphics", +] + +dependencies = [ + "comfyui-frontend-package==1.18.5", + "comfyui-workflow-templates==0.1.3", + "torch>=2.0.0", + "torchsde", + "torchvision", + "torchaudio", + "numpy>=1.25.0", + "einops", + "transformers>=4.28.1", + "tokenizers>=0.13.3", + "sentencepiece", + "safetensors>=0.4.2", + "aiohttp>=3.11.8", + "yarl>=1.18.0", + "pyyaml", + "Pillow", + "scipy", + "tqdm", + "psutil", + "opencv-python>=4.8.0", + "flash-attn>=2.3.0", +] + +[project.optional-dependencies] +gpu = [ + "nvidia-cuda-runtime-cu12>=12.0.0", + "nvidia-cuda-nvrtc-cu12>=12.0.0", + "nvidia-cudnn-cu12>=8.9.0", + "nvidia-cublas-cu12>=12.0.0", + "nvidia-cufft-cu12>=11.0.0", + "nvidia-curand-cu12>=10.3.0", + "nvidia-cusolver-cu12>=11.4.0", + "nvidia-cusparse-cu12>=12.1.0", + "nvidia-nccl-cu12>=2.18.0", + "nvidia-nvtx-cu12>=12.0.0", +] +advanced = [ + "kornia>=0.7.1", + "spandrel", + "soundfile", + "av>=14.2.0", + "pydantic~=2.0", +] +dev = [ + "pytest>=7.0.0", + "black>=23.0.0", + "isort>=5.12.0", + "ruff>=0.0.272", +] [project.urls] homepage = "https://www.comfy.org/" repository = "https://github.com/comfyanonymous/ComfyUI" documentation = "https://docs.comfy.org/" +changelog = "https://github.com/comfyanonymous/ComfyUI/releases" -[project.optional-dependencies] -advanced = [ - # Include dependencies from requirements_advanced.txt here -] +[project.scripts] +comfyui = "comfyui.cli:main" [tool.ruff] lint.select = [ @@ -33,27 +96,38 @@ lint.select = [ ] exclude = ["*.ipynb"] +[tool.setuptools] +packages = ["comfyui"] +package-dir = {"comfyui" = "."} +include-package-data = true + +[tool.setuptools.package-data] +comfyui = [ + "models/**/*", + "output/**/*", + "temp/**/*", + "input/**/*", + "custom_nodes/**/*", + "*.py", + "api_server/**/*", + "app/**/*", + "comfy/**/*", + "comfy_extras/**/*", + "comfy_execution/**/*", + "utils/**/*", +] + [tool.uv] -# UV-specific configurations (updated May 2025) +# UV-specific configurations python = "3.11" system = false verbosity = 1 threads = "auto" -no-binary = [] -only-binary = [] +lockfile = "UV-req-lock.txt" [tool.uv.dependencies] -# Core dependencies with modern 2025 versions +# Core dependencies redirected to main project dependencies torch = { version = ">=2.3.0", source = "pytorch" } -torchvision = { version = ">=0.18.0", source = "pytorch" } -numpy = ">=2.0.0" -pillow = ">=10.0.0" -aiohttp = ">=3.9.0" -rich = ">=13.6.0" -tqdm = ">=4.66.0" -transformers = ">=4.38.0" -diffusers = ">=0.25.0" -safetensors = ">=0.4.0" [tool.uv.sources] pytorch = { url = "https://download.pytorch.org/whl/cu121" }