From 652d6b5e387df2d6fb6495eb28c3052f8ed1b646 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Tue, 9 Sep 2025 11:29:21 +0100 Subject: [PATCH 1/2] Don't build videodecoder by default --- .github/scripts/setup-env.sh | 2 -- packaging/pre_build_script.sh | 3 +-- setup.py | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/scripts/setup-env.sh b/.github/scripts/setup-env.sh index e1c5855f31c..1dfe1af4f37 100755 --- a/.github/scripts/setup-env.sh +++ b/.github/scripts/setup-env.sh @@ -23,7 +23,6 @@ case $(uname) in esac echo '::group::Create build environment' -# See https://github.com/pytorch/vision/issues/7296 for ffmpeg conda create \ --name ci \ --quiet --yes \ @@ -31,7 +30,6 @@ conda create \ ninja cmake \ libpng \ libwebp \ - 'ffmpeg<4.3' conda activate ci conda install --quiet --yes libjpeg-turbo -c pytorch pip install --progress-bar=off --upgrade setuptools==72.1.0 diff --git a/packaging/pre_build_script.sh b/packaging/pre_build_script.sh index fcacf4bf8a4..b9046aa81c5 100644 --- a/packaging/pre_build_script.sh +++ b/packaging/pre_build_script.sh @@ -17,7 +17,6 @@ if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then # Installing webp also installs a non-turbo jpeg, so we uninstall jpeg stuff # before re-installing them conda uninstall libjpeg-turbo libjpeg -y - conda install -y ffmpeg=4.2 -c pytorch conda install -y libjpeg-turbo -c pytorch # Copy binaries to be included in the wheel distribution @@ -30,7 +29,7 @@ else if [[ "$ARCH" == "aarch64" ]]; then conda install libpng -y - conda install -y ffmpeg=4.2 libjpeg-turbo -c pytorch-nightly + conda install -y libjpeg-turbo -c pytorch-nightly fi conda install libwebp -y diff --git a/setup.py b/setup.py index 829b9c2f910..1345e3294f1 100644 --- a/setup.py +++ b/setup.py @@ -28,9 +28,9 @@ # video decoding backends in torchvision. I'm renaming this to "gpu video # decoder" where possible, keeping user facing names (like the env var below) to # the old scheme for BC. -USE_GPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_VIDEO_CODEC", "1") == "1" +USE_GPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_VIDEO_CODEC", "0") == "1" # Same here: "use ffmpeg" was used to denote "use cpu video decoder". -USE_CPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_FFMPEG", "1") == "1" +USE_CPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_FFMPEG", "0") == "1" TORCHVISION_INCLUDE = os.environ.get("TORCHVISION_INCLUDE", "") TORCHVISION_LIBRARY = os.environ.get("TORCHVISION_LIBRARY", "") From e8df2bdbfed9e8e448a6f56811fb48678d3b024d Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Tue, 9 Sep 2025 11:33:28 +0100 Subject: [PATCH 2/2] EUFNLFEJA --- .github/scripts/setup-env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/setup-env.sh b/.github/scripts/setup-env.sh index 1dfe1af4f37..64b4aa7fa90 100755 --- a/.github/scripts/setup-env.sh +++ b/.github/scripts/setup-env.sh @@ -29,7 +29,7 @@ conda create \ python="${PYTHON_VERSION}" pip \ ninja cmake \ libpng \ - libwebp \ + libwebp conda activate ci conda install --quiet --yes libjpeg-turbo -c pytorch pip install --progress-bar=off --upgrade setuptools==72.1.0