Skip to content

Commit 177e752

Browse files
committed
Bump Python to 3.12
1 parent f72d380 commit 177e752

18 files changed

+60
-61
lines changed

benchmark-openvino.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ set "PYTHON_COMMAND=python"
55

66
call python --version > nul 2>&1
77
if %errorlevel% equ 0 (
8-
echo Python command check :OK
8+
echo Python command check: OK
99
) else (
10-
echo "Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again"
10+
echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again."
1111
pause
1212
exit /b 1
1313

benchmark.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ set "PYTHON_COMMAND=python"
55

66
call python --version > nul 2>&1
77
if %errorlevel% equ 0 (
8-
echo Python command check :OK
8+
echo Python command check: OK
99
) else (
10-
echo "Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again"
10+
echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again."
1111
pause
1212
exit /b 1
1313

install-mac.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PYTHON_COMMAND="python3"
55

66
if ! command -v python3 &>/dev/null; then
77
if ! command -v python &>/dev/null; then
8-
echo "Error: Python not found, please install python 3.8 or higher and try again"
8+
echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again."
99
exit 1
1010
fi
1111
fi

install.bat

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
@echo off
32
setlocal
43
echo Starting FastSD CPU env installation...
@@ -7,9 +6,9 @@ set "PYTHON_COMMAND=python"
76

87
call python --version > nul 2>&1
98
if %errorlevel% equ 0 (
10-
echo Python command check :OK
9+
echo Python command check: OK
1110
) else (
12-
echo "Error: Python command not found,please install Python(Recommended : Python 3.10 or Python 3.11) and try again."
11+
echo "Error: Python command not found, please install Python(Recommended: Python 3.10..3.12) and try again."
1312
pause
1413
exit /b 1
1514

@@ -31,7 +30,7 @@ for /f "tokens=2" %%I in ('%PYTHON_COMMAND% --version 2^>^&1') do (
3130

3231
echo Python version: %python_version%
3332

34-
uv venv --python 3.11.6 "%~dp0env"
33+
uv venv --python 3.12.3 "%~dp0env"
3534
call "%~dp0env\Scripts\activate.bat" && uv pip install torch --index-url https://download.pytorch.org/whl/cpu
3635
call "%~dp0env\Scripts\activate.bat" && uv pip install -r "%~dp0requirements.txt"
3736
echo FastSD CPU env installation completed.

install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PYTHON_COMMAND="python3"
55

66
if ! command -v python3 &>/dev/null; then
77
if ! command -v python &>/dev/null; then
8-
echo "Error: Python not found, please install python 3.8 or higher and try again"
8+
echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again."
99
exit 1
1010
fi
1111
fi
@@ -26,10 +26,10 @@ fi
2626

2727
BASEDIR=$(pwd)
2828

29-
uv venv --python 3.11.6 "$BASEDIR/env"
29+
uv venv --python 3.12.3 "$BASEDIR/env"
3030
# shellcheck disable=SC1091
3131
source "$BASEDIR/env/bin/activate"
32-
uv pip install torch --index-url https://download.pytorch.org/whl/cpu
32+
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
3333
if [[ "$1" == "--disable-gui" ]]; then
3434
#! For termux , we don't need Qt based GUI
3535
packages="$(grep -v "^ *#\|^PyQt5" requirements.txt | grep .)"

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ accelerate==1.6.0
22
diffusers==0.33.0
33
transformers==4.48.0
44
PyQt5
5-
Pillow==9.4.0
5+
Pillow==11.3.0
66
openvino==2025.1.0
77
optimum-intel==1.23.0
88
onnx==1.16.0
99
numpy==1.26.4
1010
onnxruntime==1.17.3
1111
pydantic
12-
typing-extensions==4.10.0
12+
typing-extensions==4.12.2
1313
pyyaml==6.0.1
1414
gradio==5.6.0
1515
peft==0.6.1

src/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243
parser.add_argument(
244244
"--lora",
245245
type=str,
246-
help="LoRA model full path e.g D:\lora_models\CuteCartoon15V-LiberteRedmodModel-Cartoon-CuteCartoonAF.safetensors",
246+
help=r"LoRA model full path e.g D:\lora_models\CuteCartoon15V-LiberteRedmodModel-Cartoon-CuteCartoonAF.safetensors",
247247
default=None,
248248
)
249249
parser.add_argument(

src/backend/openvino/stable_diffusion_engine.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import Union, Optional, Any, List, Dict
88
import numpy as np
99
# openvino
10-
from openvino.runtime import Core
10+
from openvino import Core
1111
# tokenizer
1212
from transformers import CLIPTokenizer
1313
import torch
@@ -1781,37 +1781,37 @@ def print_npu_turbo_art():
17811781
random_number = random.randint(1, 3)
17821782

17831783
if random_number == 1:
1784-
print(" ")
1785-
print(" ___ ___ ___ ___ ___ ___ ")
1786-
print(" /\ \ /\ \ /\ \ /\ \ /\ \ _____ /\ \ ")
1787-
print(" \:\ \ /::\ \ \:\ \ ___ \:\ \ /::\ \ /::\ \ /::\ \ ")
1788-
print(" \:\ \ /:/\:\__\ \:\ \ /\__\ \:\ \ /:/\:\__\ /:/\:\ \ /:/\:\ \ ")
1789-
print(" _____\:\ \ /:/ /:/ / ___ \:\ \ /:/ / ___ \:\ \ /:/ /:/ / /:/ /::\__\ /:/ \:\ \ ")
1790-
print(" /::::::::\__\ /:/_/:/ / /\ \ \:\__\ /:/__/ /\ \ \:\__\ /:/_/:/__/___ /:/_/:/\:|__| /:/__/ \:\__\ ")
1791-
print(" \:\~~\~~\/__/ \:\/:/ / \:\ \ /:/ / /::\ \ \:\ \ /:/ / \:\/:::::/ / \:\/:/ /:/ / \:\ \ /:/ / ")
1792-
print(" \:\ \ \::/__/ \:\ /:/ / /:/\:\ \ \:\ /:/ / \::/~~/~~~~ \::/_/:/ / \:\ /:/ / ")
1793-
print(" \:\ \ \:\ \ \:\/:/ / \/__\:\ \ \:\/:/ / \:\~~\ \:\/:/ / \:\/:/ / ")
1794-
print(" \:\__\ \:\__\ \::/ / \:\__\ \::/ / \:\__\ \::/ / \::/ / ")
1795-
print(" \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ ")
1796-
print(" ")
1784+
print(r" ")
1785+
print(r" ___ ___ ___ ___ ___ ___ ")
1786+
print(r" /\ \ /\ \ /\ \ /\ \ /\ \ _____ /\ \ ")
1787+
print(r" \:\ \ /::\ \ \:\ \ ___ \:\ \ /::\ \ /::\ \ /::\ \ ")
1788+
print(r" \:\ \ /:/\:\__\ \:\ \ /\__\ \:\ \ /:/\:\__\ /:/\:\ \ /:/\:\ \ ")
1789+
print(r" _____\:\ \ /:/ /:/ / ___ \:\ \ /:/ / ___ \:\ \ /:/ /:/ / /:/ /::\__\ /:/ \:\ \ ")
1790+
print(r" /::::::::\__\ /:/_/:/ / /\ \ \:\__\ /:/__/ /\ \ \:\__\ /:/_/:/__/___ /:/_/:/\:|__| /:/__/ \:\__\ ")
1791+
print(r" \:\~~\~~\/__/ \:\/:/ / \:\ \ /:/ / /::\ \ \:\ \ /:/ / \:\/:::::/ / \:\/:/ /:/ / \:\ \ /:/ / ")
1792+
print(r" \:\ \ \::/__/ \:\ /:/ / /:/\:\ \ \:\ /:/ / \::/~~/~~~~ \::/_/:/ / \:\ /:/ / ")
1793+
print(r" \:\ \ \:\ \ \:\/:/ / \/__\:\ \ \:\/:/ / \:\~~\ \:\/:/ / \:\/:/ / ")
1794+
print(r" \:\__\ \:\__\ \::/ / \:\__\ \::/ / \:\__\ \::/ / \::/ / ")
1795+
print(r" \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ ")
1796+
print(r" ")
17971797
elif random_number == 2:
1798-
print(" _ _ ____ _ _ _____ _ _ ____ ____ ___ ")
1799-
print("| \ | | | _ \ | | | | |_ _| | | | | | _ \ | __ ) / _ \ ")
1800-
print("| \| | | |_) | | | | | | | | | | | | |_) | | _ \ | | | |")
1801-
print("| |\ | | __/ | |_| | | | | |_| | | _ < | |_) | | |_| |")
1802-
print("|_| \_| |_| \___/ |_| \___/ |_| \_\ |____/ \___/ ")
1803-
print(" ")
1798+
print(r" _ _ ____ _ _ _____ _ _ ____ ____ ___ ")
1799+
print(r"| \ | | | _ \ | | | | |_ _| | | | | | _ \ | __ ) / _ \ ")
1800+
print(r"| \| | | |_) | | | | | | | | | | | | |_) | | _ \ | | | |")
1801+
print(r"| |\ | | __/ | |_| | | | | |_| | | _ < | |_) | | |_| |")
1802+
print(r"|_| \_| |_| \___/ |_| \___/ |_| \_\ |____/ \___/ ")
1803+
print(r" ")
18041804
else:
1805-
print("")
1806-
print(" ) ( ( ) ")
1807-
print(" ( /( )\ ) * ) )\ ) ( ( /( ")
1808-
print(" )\()) (()/( ( ` ) /( ( (()/( ( )\ )\()) ")
1809-
print("((_)\ /(_)) )\ ( )(_)) )\ /(_)) )((_) ((_)\ ")
1810-
print(" _((_) (_)) _ ((_) (_(_()) _ ((_) (_)) ((_)_ ((_) ")
1811-
print("| \| | | _ \ | | | | |_ _| | | | | | _ \ | _ ) / _ \ ")
1812-
print("| .` | | _/ | |_| | | | | |_| | | / | _ \ | (_) | ")
1813-
print("|_|\_| |_| \___/ |_| \___/ |_|_\ |___/ \___/ ")
1814-
print(" ")
1805+
print(r"")
1806+
print(r" ) ( ( ) ")
1807+
print(r" ( /( )\ ) * ) )\ ) ( ( /( ")
1808+
print(r" )\()) (()/( ( ` ) /( ( (()/( ( )\ )\()) ")
1809+
print(r"((_)\ /(_)) )\ ( )(_)) )\ /(_)) )((_) ((_)\ ")
1810+
print(r" _((_) (_)) _ ((_) (_(_()) _ ((_) (_)) ((_)_ ((_) ")
1811+
print(r"| \| | | _ \ | | | | |_ _| | | | | | _ \ | _ ) / _ \ ")
1812+
print(r"| .` | | _/ | |_| | | | | |_| | | / | _ \ | (_) | ")
1813+
print(r"|_|\_| |_| \___/ |_| \___/ |_|_\ |___/ \___/ ")
1814+
print(r" ")
18151815

18161816

18171817

start-mcpserver.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ set "PYTHON_COMMAND=python"
66

77
call python --version > nul 2>&1
88
if %errorlevel% equ 0 (
9-
echo Python command check :OK
9+
echo Python command check: OK
1010
) else (
11-
echo "Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again"
11+
echo "Error: Python command not found, please install Python (Recommended: Python 3.10..3.12) and try again"
1212
pause
1313
exit /b 1
1414

start-mcpserver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PYTHON_COMMAND="python3"
55

66
if ! command -v python3 &>/dev/null; then
77
if ! command -v python &>/dev/null; then
8-
echo "Error: Python not found, please install python 3.8 or higher and try again"
8+
echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again."
99
exit 1
1010
fi
1111
fi

0 commit comments

Comments
 (0)