Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.12 #6539

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions installer/install.bat.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set err_msg=An error has occurred and the script could not continue.
echo This script will install InvokeAI and its dependencies.
echo.
echo BEFORE YOU START PLEASE MAKE SURE TO DO THE FOLLOWING
echo 1. Install python 3.10 or 3.11. Python version 3.9 is no longer supported.
echo 1. Install python 3.10-3.12. Python version 3.9 is no longer supported.
echo 2. Double-click on the file WinLongPathsEnabled.reg in order to
echo enable long path support on your system.
echo 3. Install the Visual C++ core libraries.
Expand All @@ -44,7 +44,7 @@ echo ***** Checking and Updating Python *****

call python --version >.tmp1 2>.tmp2
if %errorlevel% == 1 (
set err_msg=Please install Python 3.10-11. See %INSTRUCTIONS% for details.
set err_msg=Please install Python 3.10.12. See %INSTRUCTIONS% for details.
goto err_exit
)

Expand Down
4 changes: 2 additions & 2 deletions installer/install.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ cd $scriptdir
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }

MINIMUM_PYTHON_VERSION=3.10.0
MAXIMUM_PYTHON_VERSION=3.11.100
MAXIMUM_PYTHON_VERSION=3.12.100
PYTHON=""
for candidate in python3.11 python3.10 python3 python ; do
for candidate in python3.12 python3.11 python3.10 python3 python ; do
if ppath=`which $candidate`; then
# when using `pyenv`, the executable for an inactive Python version will exist but will not be operational
# we check that this found executable can actually run
Expand Down
2 changes: 1 addition & 1 deletion installer/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from tempfile import TemporaryDirectory
from typing import Optional, Tuple

SUPPORTED_PYTHON = ">=3.10.0,<=3.11.100"
SUPPORTED_PYTHON = ">=3.10.0,<=3.12.100"
INSTALLER_REQS = ["rich", "semver", "requests", "plumbum", "prompt-toolkit"]
BOOTSTRAP_VENV_PREFIX = "invokeai-installer-tmp"
DOCS_URL = "https://invoke-ai.github.io/InvokeAI/"
Expand Down
4 changes: 2 additions & 2 deletions installer/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Preparations:
python --version

If all is well, it will print "Python 3.X.X", where the version number
is at least 3.10.*, and not higher than 3.11.*.
is at least 3.10.*, and not higher than 3.12.*.

If this works, check the version of the Python package manager, pip:

pip --version

You should get a message that indicates that the pip package
installer was derived from Python 3.10 or 3.11. For example:
installer was derived from Python 3.10, 3.11 or 3.12. For example:
"pip 22.0.1 from /usr/bin/pip (python 3.10)"

Long Paths on Windows:
Expand Down
60 changes: 30 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[build-system]
requires = ["setuptools~=65.5", "pip~=22.3", "wheel"]
#requires = ["setuptools~=65.5", "pip~=22.3", "wheel"]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "InvokeAI"
description = "An implementation of Stable Diffusion which provides various new features and options to aid the image generation process"
requires-python = ">=3.10, <3.12"
requires-python = ">=3.10, <3.13"
readme = { content-type = "text/markdown", file = "README.md" }
keywords = ["stable-diffusion", "AI"]
dynamic = ["version"]
Expand All @@ -31,63 +32,62 @@ classifiers = [
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Image Processing',
]

dependencies = [
# Core generation dependencies, pinned for reproducible builds.
"accelerate==0.30.1",
"clip_anytorch==2.6.0", # replacing "clip @ https://github.com/openai/CLIP/archive/eaa22acb90a5876642d0507623e859909230a52d.zip",
"accelerate==0.31.0",
"clip_anytorch==2.6.0",
"compel==2.0.2",
"controlnet-aux==0.0.7",
"diffusers[torch]==0.27.2",
"invisible-watermark==0.2.0", # needed to install SDXL base and refiner using their repo_ids
"mediapipe==0.10.7", # needed for "mediapipeface" controlnet model
"numpy==1.26.4", # >1.24.0 is needed to use the 'strict' argument to np.testing.assert_array_equal()
"onnx==1.15.0",
"onnxruntime==1.16.3",
"opencv-python==4.9.0.80",
"pytorch-lightning==2.1.3",
"invisible-watermark==0.2.0",
"mediapipe==0.10.13",
"numpy==1.26.4",
"onnx==1.16.1",
"onnxruntime==1.18.0",
"opencv-python==4.10.0.84",
"pytorch-lightning==2.3.0",
"safetensors==0.4.3",
"timm==0.6.13", # needed to override timm latest in controlnet_aux, see https://github.com/isl-org/ZoeDepth/issues/26
"torch==2.2.2",
"torchmetrics==0.11.4",
"timm==0.6.13",
"torch==2.3.1",
"torchmetrics==1.4.0.post0",
"torchsde==0.2.6",
"torchvision==0.17.2",
"transformers==4.41.1",

"torchvision==0.18.1",
"transformers==4.41.2",
# Core application dependencies, pinned for reproducible builds.
"fastapi-events==0.11.0",
"fastapi-events==0.11.1",
"fastapi==0.111.0",
"huggingface-hub==0.23.1",
"pydantic-settings==2.2.1",
"pydantic==2.7.2",
"python-socketio==5.11.1",
"uvicorn[standard]==0.28.0",

"huggingface-hub==0.23.4",
"pydantic-settings==2.3.3",
"pydantic==2.7.4",
"python-socketio==5.11.3",
"uvicorn[standard]==0.30.1",
# Auxiliary dependencies, pinned only if necessary.
"albumentations",
"blake3",
"click",
"datasets",
"Deprecated",
"dnspython~=2.4.0",
"dnspython~=2.4.2",
"dynamicprompts",
"easing-functions",
"einops",
"facexlib",
"matplotlib", # needed for plotting of Penner easing functions
"matplotlib",
"npyscreen",
"omegaconf",
"picklescan",
"pillow",
"prompt-toolkit",
"pympler~=1.0.1",
"pypatchmatch",
'pyperclip',
"pyperclip",
"pyreadline3",
"python-multipart",
"requests~=2.28.2",
"rich~=13.3",
"rich~=13.7.1",
"scikit-image~=0.21.0",
"semver~=3.0.1",
"semver~=3.0.2",
"send2trash",
"test-tube~=0.7.5",
"windows-curses; sys_platform=='win32'",
Expand All @@ -96,7 +96,7 @@ dependencies = [
[project.optional-dependencies]
"xformers" = [
# Core generation dependencies, pinned for reproducible builds.
"xformers==0.0.25post1; sys_platform!='darwin'",
"xformers==0.0.26post1; sys_platform!='darwin'",
# Auxiliary dependencies, pinned only if necessary.
"triton; sys_platform=='linux'",
]
Expand Down
Loading