Skip to content

Commit 0da1458

Browse files
bugfix: include pyproject.toml in demoDiffusion (#4707)
Signed-off-by: Asfiya Baig <asfiyab@nvidia.com>
1 parent bdafad3 commit 0da1458

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed

demo/Diffusion/pyproject.toml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
[project]
2+
name = "tensorrt-diffusion"
3+
version = "0.1.0"
4+
description = "TensorRT-accelerated implementations of Stable Diffusion and other diffusion models"
5+
readme = "README.md"
6+
requires-python = ">=3.10,<3.13"
7+
8+
# Core dependencies shared across all pipeline families
9+
dependencies = [
10+
"apex==0.9.10dev",
11+
"accelerate==1.2.1",
12+
"colored==2.3.1",
13+
"controlnet-aux==0.0.6",
14+
"cuda-python==13.0.2",
15+
"ftfy==6.3.1",
16+
"matplotlib==3.10.7",
17+
"nvtx==0.2.13",
18+
"opencv-python-headless==4.8.0.74",
19+
"scipy==1.15.3",
20+
"transformers==4.52.4",
21+
"onnx==1.19.0",
22+
"onnxscript==0.5.4",
23+
"onnx-graphsurgeon==0.5.2",
24+
"peft==0.17.0",
25+
"polygraphy==0.49.22",
26+
"sentencepiece==0.2.1",
27+
"numpy==1.26.4",
28+
"nvidia-modelopt[torch,onnx]==0.40.0",
29+
]
30+
31+
[project.optional-dependencies]
32+
# Stable Diffusion family (Stability AI)
33+
# Pipelines: SD 1.4, SDXL, SD3, SD3.5, SVD (Stable Video Diffusion), Stable Cascade
34+
sd = [
35+
"diffusers==0.35.2",
36+
"imageio-ffmpeg",
37+
]
38+
39+
# Flux family (Black Forest Labs)
40+
# Pipelines: Flux.1-dev, Flux.1-schnell, Flux.1-Canny, Flux.1-Depth, Flux.1-Kontext
41+
# NOTE: Diffusers upgrade requires Dynamo export support
42+
flux = [
43+
"diffusers @ git+https://github.com/huggingface/diffusers.git@7298bdd8177c16eadb74f6166327f5984fd8c69d",
44+
"flux @ git+https://github.com/black-forest-labs/flux.git",
45+
]
46+
47+
# Cosmos family (NVIDIA)
48+
# Pipelines: Cosmos-Predict2 Text2Image (2B, 14B), Cosmos-Predict2 Video2World (2B, 14B), Wan2.2
49+
cosmos = [
50+
"diffusers==0.35.2",
51+
"imageio-ffmpeg",
52+
"flux @ git+https://github.com/black-forest-labs/flux.git",
53+
]
54+
55+
# Install all families
56+
all = [
57+
"tensorrt-diffusion[sd]",
58+
"tensorrt-diffusion[flux]",
59+
"tensorrt-diffusion[cosmos]",
60+
]
61+
62+
# Development dependencies
63+
dev = [
64+
"pytest",
65+
"pytest-cov",
66+
"black",
67+
"ruff",
68+
]
69+
70+
71+
[build-system]
72+
requires = ["poetry-core>=1.3.0"]
73+
build-backend = "poetry.core.masonry.api"
74+
75+
[tool.poetry]
76+
# Tell Poetry where the actual Python package is located
77+
packages = [{include = "demo_diffusion"}]
78+
79+
[tool.uv]
80+
# Use PyPI as the main index
81+
index-url = "https://pypi.org/simple"
82+
83+
# Add NVIDIA's PyPI index for nvidia-modelopt and related packages
84+
[[tool.uv.index]]
85+
name = "nvidia"
86+
url = "https://pypi.nvidia.com"
87+
explicit = true
88+
89+
[tool.uv.sources]
90+
# Explicitly fetch these packages from NVIDIA's index
91+
nvidia-modelopt = { index = "nvidia" }
92+
onnx-graphsurgeon = { index = "nvidia" }
93+
polygraphy = { index = "nvidia" }
94+
95+
[tool.ruff]
96+
line-length = 120
97+
target-version = "py310"
98+
99+
[tool.ruff.lint]
100+
select = ["E", "F", "W", "I"]
101+
ignore = ["E501"] # Line too long (handled by formatter)
102+
103+
[tool.pytest.ini_options]
104+
testpaths = ["tests"]
105+
python_files = ["test_*.py"]
106+
python_functions = ["test_*"]
107+
108+
[tool.black]
109+
line-length = 120
110+
target-version = ["py310", "py311", "py312"]

0 commit comments

Comments
 (0)