[project] name = "ComfyUI-Diffusers" version = "0.1.0" description = "This repository is a custom node in ComfyUI. This is a program that allows you to use Huggingface Diffusers module with ComfyUI. Additionally, Stream Diffusion is also available." authors = [ { name = "Limitex", email = "76650151+Limitex@users.noreply.github.com" }, ] readme = "README.md" requires-python = ">=3.10,<3.15" dependencies = [ "dependency-injector (>=4.48.2,<5.0.0)", "diffusers[torch] (>=0.24.0,<0.36.0)", "torch (>=2.6.0,<3.0.0)", "torchaudio (>=2.6.0,<3.0.0)", "torchvision (>=0.21.0,<0.25.0)", "transformers (>=4.48.3,<4.49.0)", "omegaconf (>=2.3.0,<3.0.0)", "safetensors (>=0.4.0,<0.5.0)", "requests (>=2.32.0,<3.0.0)", "python-dotenv (>=1.2.1,<2.0.0)", "xformers (>=0.0.29.post3,<0.0.30)", "streamdiffusion[tensorrt] @ git+https://github.com/cumulo-autumn/StreamDiffusion.git@b623251dc055e1fd858d53509aa43e09dfc5cdc0", "tensorrt (>=10.12.0,<10.13.0)", "polygraphy (>=0.47.1,<0.48.0)", "onnx-graphsurgeon (>=0.3.27,<0.4.0)", "numpy (>=1.26.4,<2.0.0)", "huggingface-hub (>=0.25.2,<0.26.0)", ] [tool.poetry] packages = [{ include = "src" }] [[tool.poetry.source]] name = "pytorch-cu124" url = "https://download.pytorch.org/whl/cu124" priority = "explicit" [[tool.poetry.source]] name = "nvidia" url = "https://pypi.nvidia.com" priority = "supplemental" [[tool.poetry.source]] name = "ngc" url = "https://pypi.ngc.nvidia.com" priority = "supplemental" [tool.poetry.dependencies] torch = { version = ">=2.6.0,<3.0.0", source = "pytorch-cu124" } torchaudio = { version = ">=2.6.0,<3.0.0", source = "pytorch-cu124" } torchvision = { version = ">=0.21.0,<0.25.0", source = "pytorch-cu124" } xformers = { version = ">=0.0.29.post3,<0.0.30", source = "pytorch-cu124" } tensorrt = { version = ">=10.12.0,<10.13.0", source = "nvidia" } polygraphy = { version = ">=0.47.1,<0.48.0", source = "ngc" } onnx-graphsurgeon = { version = ">=0.3.27,<0.4.0", source = "ngc" } [tool.pytest.ini_options] testpaths = ["tests"] python_files = ["test_*.py", "*_test.py"] python_classes = ["Test*"] python_functions = ["test_*"] addopts = [ "--strict-markers", "--strict-config", "--cov=src", "--cov-branch", "--cov-report=term-missing:skip-covered", "--cov-report=html", "--cov-report=xml", "--cov-fail-under=80", "-v", "-ra", ] markers = [ "unit: Unit tests", "integration: Integration tests", "slow: Slow tests", ] filterwarnings = ["error", "ignore::UserWarning", "ignore::DeprecationWarning"] [tool.coverage.run] source = ["src"] omit = [ "*/tests/*", "*/test_*.py", "*/__init__.py", "src/di/*", # DI container doesn't need test coverage ] branch = true parallel = true [tool.coverage.report] precision = 2 show_missing = true skip_covered = false exclude_lines = [ "pragma: no cover", "def __repr__", "def __str__", "raise AssertionError", "raise NotImplementedError", "if __name__ == .__main__.:", "if TYPE_CHECKING:", "if typing.TYPE_CHECKING:", "@abstractmethod", "@abc.abstractmethod", "@overload", "class .*\\bProtocol\\):", "pass", ] [tool.coverage.html] directory = "htmlcov" [tool.coverage.xml] output = "coverage.xml" [tool.bandit] exclude_dirs = ["tests", "venv", ".venv", ".tox", "build", "dist"] tests = [ "B201", "B301", "B302", "B303", "B304", "B305", "B306", "B307", "B308", "B309", "B310", "B311", "B312", "B313", "B314", "B315", "B316", "B317", "B318", "B319", "B320", "B321", "B323", "B324", "B325", ] skips = ["B101", "B601"] # Allow assert in tests & shell=True if needed [tool.bandit.assert_used] skips = ["*/test_*.py", "*/*_test.py"] [tool.importlinter] root_package = "src" [[tool.importlinter.contracts]] name = "Clean Architecture Layers" type = "layers" layers = [ "src.nodes", # Presentation Layer (ComfyUI Nodes) "src.ui", # Presentation Layer (Handlers) "src.service", # Application Layer (Use Cases) "src.domain", # Domain Layer (Entities & Interfaces) ] containers = ["src"] [[tool.importlinter.contracts]] name = "Domain Layer Independence" type = "forbidden" source_modules = ["src.domain"] forbidden_modules = [ "src.service", "src.ui", "src.nodes", "src.infra", "src.di", ] [[tool.importlinter.contracts]] name = "Application Layer Independence" type = "forbidden" source_modules = ["src.service"] forbidden_modules = ["src.ui", "src.nodes", "src.infra", "src.di"] [[tool.importlinter.contracts]] name = "Infrastructure depends only on Domain" type = "forbidden" source_modules = ["src.infra"] forbidden_modules = ["src.service", "src.ui", "src.nodes", "src.di"] [[tool.importlinter.contracts]] name = "Presentation Layer can use Application & Domain" type = "forbidden" source_modules = ["src.ui", "src.nodes"] forbidden_modules = ["src.infra"] [tool.commitizen] name = "cz_conventional_commits" version = "0.1.0" tag_format = "v$version" version_files = ["pyproject.toml:version"] update_changelog_on_bump = true changelog_file = "CHANGELOG.md" [build-system] requires = ["poetry-core>=2.0.0,<3.0.0"] build-backend = "poetry.core.masonry.api" [dependency-groups] dev = [ "ruff (>=0.14.2,<0.15.0)", "mypy (>=1.18.2,<2.0.0)", "types-requests (>=2.32.4.20250913,<3.0.0.0)", "pytest (>=8.4.2,<9.0.0)", "pytest-cov (>=7.0.0,<8.0.0)", "pytest-asyncio (>=1.2.0,<2.0.0)", "pytest-mock (>=3.15.1,<4.0.0)", "pytest-xdist (>=3.8.0,<4.0.0)", "bandit[toml] (>=1.8.6,<2.0.0)", "import-linter (>=2.5.2,<3.0.0)", "pre-commit (>=4.3.0,<5.0.0)", "commitizen (>=4.9.1,<5.0.0)", ]