1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-10-23 09:09:01 +03:00

ci: move to python 3.11. (#15030)

* move to python 3.11.

* update setup.py along with others.

* fix(ci): pin GitHub Actions to commit SHAs (#15030) (#15033)

fix(ci): pin actions in workflows flagged on #15030

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>

* up

* fix(ci): pin GitHub Actions to commit SHAs (#15030) (#15036)

fix(ci): pin actions in workflows flagged on #15030

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>

* up

---------

Co-authored-by: hf-security-analysis[bot] <265538906+hf-security-analysis[bot]@users.noreply.github.com>
This commit is contained in:
Sayak Paul
2026-10-14 20:11:45 +05:30
committed by GitHub
parent ea981b8b7d
commit efe46a5b17
17 changed files with 27 additions and 25 deletions

View File

@@ -134,7 +134,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |

View File

@@ -22,6 +22,7 @@ jobs:
commit_sha: ${{ github.sha }}
install_libgl1: true
package: diffusers
python_version: "3.11"
notebook_folder: diffusers_doc
languages: en ko zh ja pt
pre_command: uv pip uninstall transformers huggingface_hub && UV_PRERELEASE=allow uv pip install -U transformers@git+https://github.com/huggingface/transformers.git

View File

@@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.10'
@@ -50,5 +50,6 @@ jobs:
pr_number: ${{ github.event.number }}
install_libgl1: true
package: diffusers
python_version: "3.11"
languages: en ko zh ja pt
pre_command: uv pip uninstall transformers huggingface_hub && UV_PRERELEASE=allow uv pip install -U transformers@git+https://github.com/huggingface/transformers.git

View File

@@ -28,7 +28,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
pip install -e .

View File

@@ -50,7 +50,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
pip install --upgrade pip
@@ -72,7 +72,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
pip install --upgrade pip

View File

@@ -45,7 +45,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
pip install --upgrade pip
@@ -67,7 +67,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
pip install --upgrade pip

View File

@@ -47,7 +47,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
pip install --upgrade pip
@@ -69,7 +69,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
pip install --upgrade pip

View File

@@ -28,7 +28,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
pip install -e .

View File

@@ -21,9 +21,9 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.10"
python-version: "3.11"
- name: Install build dependencies
run: |
@@ -51,7 +51,7 @@ jobs:
python -c "from diffusers import *"
- name: Upload build artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: python-dist
path: dist/
@@ -74,6 +74,6 @@ jobs:
path: dist/
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
with:
verbose: true

View File

@@ -46,7 +46,7 @@ RUN python -c "import torch, torchvision, torchaudio"
# other build) can install over it with `--dependencies` or point `--image` at a custom image.
RUN uv pip install --system --break-system-packages --no-cache-dir \
"huggingface_hub[hf_xet]>=1.32" \
diffusers \
"diffusers>=0.41.0" \
accelerate \
transformers \
"tokenizers>=0.14.0" \

View File

@@ -1,4 +1,4 @@
FROM python:3.10-slim
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1
LABEL maintainer="Hugging Face"
LABEL repository="diffusers"

View File

@@ -1,4 +1,4 @@
FROM python:3.10-slim
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1
LABEL maintainer="Hugging Face"
LABEL repository="diffusers"

View File

@@ -2,7 +2,7 @@ FROM nvidia/cuda:12.9.1-runtime-ubuntu24.04
LABEL maintainer="Hugging Face"
LABEL repository="diffusers"
ARG PYTHON_VERSION=3.10
ARG PYTHON_VERSION=3.11
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update \

View File

@@ -2,7 +2,7 @@ FROM nvidia/cuda:12.1.0-runtime-ubuntu20.04
LABEL maintainer="Hugging Face"
LABEL repository="diffusers"
ARG PYTHON_VERSION=3.10
ARG PYTHON_VERSION=3.11
ENV DEBIAN_FRONTEND=noninteractive
ENV MINIMUM_SUPPORTED_TORCH_VERSION="2.6.0"
ENV MINIMUM_SUPPORTED_TORCHVISION_VERSION="0.21.0"

View File

@@ -2,7 +2,7 @@ FROM nvidia/cuda:12.9.1-runtime-ubuntu24.04
LABEL maintainer="Hugging Face"
LABEL repository="diffusers"
ARG PYTHON_VERSION=3.10
ARG PYTHON_VERSION=3.11
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update \

View File

@@ -119,7 +119,7 @@ _deps = [
"pytest",
"pytest-timeout",
"pytest-xdist",
"python>=3.10.0",
"python>=3.11.0",
"ruff==0.9.10",
"safetensors>=0.8.0",
"sentencepiece>=0.1.91,!=0.1.92",
@@ -267,7 +267,7 @@ install_requires = [
deps["Pillow"],
]
version_range_max = max(sys.version_info[1], 10) + 1
version_range_max = max(sys.version_info[1], 11) + 1
setup(
name="diffusers",
@@ -284,7 +284,7 @@ setup(
packages=find_packages("src"),
package_data={"diffusers": ["py.typed"]},
include_package_data=True,
python_requires=">=3.10.0",
python_requires=">=3.11.0",
install_requires=list(install_requires),
extras_require=extras,
entry_points={"console_scripts": ["diffusers-cli=diffusers.commands.diffusers_cli:main"]},
@@ -298,6 +298,6 @@ setup(
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
]
+ [f"Programming Language :: Python :: 3.{i}" for i in range(8, version_range_max)],
+ [f"Programming Language :: Python :: 3.{i}" for i in range(11, version_range_max)],
cmdclass={"deps_table_update": DepsTableUpdateCommand},
)

View File

@@ -26,7 +26,7 @@ deps = {
"pytest": "pytest",
"pytest-timeout": "pytest-timeout",
"pytest-xdist": "pytest-xdist",
"python": "python>=3.10.0",
"python": "python>=3.11.0",
"ruff": "ruff==0.9.10",
"safetensors": "safetensors>=0.8.0",
"sentencepiece": "sentencepiece>=0.1.91,!=0.1.92",