-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CUDA] upgrade opencv in stable diffusion demo (#22470)
### Description (1) Upgrade opencv (2) Add some comments about onnxruntime-gpu installation ### Motivation and Context opencv-python was locked to an older version, which has security vulnerabilities: see #22445 for more info
- Loading branch information
Showing
7 changed files
with
47 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
onnxruntime/python/tools/transformers/models/stable_diffusion/requirements-rocm.txt
This file was deleted.
Oops, something went wrong.
10 changes: 5 additions & 5 deletions
10
.../stable_diffusion/requirements-cuda12.txt → ...sion/requirements/cuda11/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
-r requirements.txt | ||
-r ../requirements.txt | ||
|
||
# For CUDA 12.*, you will need build onnxruntime-gpu from source and install the wheel. See README.md for detail. | ||
# See https://onnxruntime.ai/docs/install/#python-installs for installation. The latest one in pypi is for cuda 12. | ||
# onnxruntime-gpu>=1.16.2 | ||
|
||
py3nvml | ||
|
||
# The version of cuda-python shall be compatible with installed CUDA version. | ||
# For demo of TensorRT excution provider and TensortRT. | ||
cuda-python>=12.1.0 | ||
cuda-python==11.8.0 | ||
|
||
# For windows, cuda-python need the following | ||
pywin32; platform_system == "Windows" | ||
|
||
# For windows, run `conda install -c conda-forge nvtx` instead | ||
nvtx; platform_system != "Windows" | ||
|
||
# Please install PyTorch 2.1 or above for 12.1 using one of the following commands: | ||
# pip3 install torch --index-url https://download.pytorch.org/whl/cu121 | ||
# Please install PyTorch >=2.1 and <2.4 for CUDA 11.8 like the following: | ||
# pip install torch==2.3.1 --index-url https://download.pytorch.org/whl/cu118 | ||
|
||
# Run the following command to install some extra packages for onnx graph optimization for TensorRT manually. | ||
# pip3 install --upgrade polygraphy onnx-graphsurgeon --extra-index-url https://pypi.ngc.nvidia.com |
11 changes: 5 additions & 6 deletions
11
.../stable_diffusion/requirements-cuda11.txt → ...sion/requirements/cuda12/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
-r requirements.txt | ||
-r ../requirements.txt | ||
|
||
# Official onnxruntime-gpu 1.16.1 is built with CUDA 11.8. | ||
onnxruntime-gpu>=1.16.2 | ||
onnxruntime-gpu>=1.19.2 | ||
|
||
py3nvml | ||
|
||
# The version of cuda-python shall be compatible with installed CUDA version. | ||
# For demo of TensorRT excution provider and TensortRT. | ||
cuda-python==11.8.0 | ||
cuda-python>=12.1.0 | ||
|
||
# For windows, cuda-python need the following | ||
pywin32; platform_system == "Windows" | ||
|
||
# For windows, run `conda install -c conda-forge nvtx` instead | ||
nvtx; platform_system != "Windows" | ||
|
||
# Please install PyTorch 2.1 or above for CUDA 11.8 using one of the following commands: | ||
# pip3 install torch --index-url https://download.pytorch.org/whl/cu118 | ||
# Please install PyTorch 2.4 or above using one of the following commands: | ||
# pip3 install torch --index-url https://download.pytorch.org/whl/cu124 | ||
|
||
# Run the following command to install some extra packages for onnx graph optimization for TensorRT manually. | ||
# pip3 install --upgrade polygraphy onnx-graphsurgeon --extra-index-url https://pypi.ngc.nvidia.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...time/python/tools/transformers/models/stable_diffusion/requirements/rocm/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-r ../requirements.txt | ||
# Install onnxruntime-rocm that is built from source (https://onnxruntime.ai/docs/build/eps.html#amd-rocm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters