diff --git a/Readme.md b/Readme.md index 17e4afe..e62c98b 100644 --- a/Readme.md +++ b/Readme.md @@ -442,7 +442,7 @@ To install FastSD CPU on Windows run the following steps : ![FastSD CPU running on Mac](https://raw.githubusercontent.com/rupeshs/fastsdcpu/main/docs/images/fastsdcpu-mac-gui.jpg) -:exclamation:**Ensure that you have Python 3.9 or 3.10 or 3.11 version installed.** +:exclamation:**Ensure that you have Python 3.9 or 3.10 or 3.11 or 3.12 version installed.** Run the following commands to install FastSD CPU on Mac : diff --git a/benchmark-openvino.bat b/benchmark-openvino.bat index c42dd4b..62f2105 100644 --- a/benchmark-openvino.bat +++ b/benchmark-openvino.bat @@ -5,9 +5,9 @@ set "PYTHON_COMMAND=python" call python --version > nul 2>&1 if %errorlevel% equ 0 ( - echo Python command check :OK + echo Python command check: OK ) else ( - echo "Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." pause exit /b 1 diff --git a/benchmark.bat b/benchmark.bat index 97e8d9d..db3b3dc 100644 --- a/benchmark.bat +++ b/benchmark.bat @@ -5,9 +5,9 @@ set "PYTHON_COMMAND=python" call python --version > nul 2>&1 if %errorlevel% equ 0 ( - echo Python command check :OK + echo Python command check: OK ) else ( - echo "Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." pause exit /b 1 diff --git a/install-mac.sh b/install-mac.sh index 4e8c3c7..581dce7 100644 --- a/install-mac.sh +++ b/install-mac.sh @@ -5,7 +5,7 @@ PYTHON_COMMAND="python3" if ! command -v python3 &>/dev/null; then if ! command -v python &>/dev/null; then - echo "Error: Python not found, please install python 3.8 or higher and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." exit 1 fi fi @@ -26,7 +26,7 @@ fi BASEDIR=$(pwd) -uv venv --python 3.11.6 "$BASEDIR/env" +uv venv --python 3.12.3 "$BASEDIR/env" # shellcheck disable=SC1091 source "$BASEDIR/env/bin/activate" uv pip install torch==2.8.0 diff --git a/install.bat b/install.bat index 4441fb7..b8c4ef4 100644 --- a/install.bat +++ b/install.bat @@ -1,4 +1,3 @@ - @echo off setlocal echo Starting FastSD CPU env installation... @@ -7,9 +6,9 @@ set "PYTHON_COMMAND=python" call python --version > nul 2>&1 if %errorlevel% equ 0 ( - echo Python command check :OK + echo Python command check: OK ) else ( - echo "Error: Python command not found,please install Python(Recommended : Python 3.10 or Python 3.11) and try again." + echo "Error: Python command not found, please install Python(Recommended: Python 3.10..3.12) and try again." pause exit /b 1 @@ -31,7 +30,7 @@ for /f "tokens=2" %%I in ('%PYTHON_COMMAND% --version 2^>^&1') do ( echo Python version: %python_version% -uv venv --python 3.11.6 "%~dp0env" +uv venv --python 3.12.3 "%~dp0env" call "%~dp0env\Scripts\activate.bat" && uv pip install torch==2.8.0 --index-url https://download.pytorch.org/whl/cpu call "%~dp0env\Scripts\activate.bat" && uv pip install -r "%~dp0requirements.txt" echo FastSD CPU env installation completed. diff --git a/install.sh b/install.sh index a4991d1..e6df190 100644 --- a/install.sh +++ b/install.sh @@ -5,7 +5,7 @@ PYTHON_COMMAND="python3" if ! command -v python3 &>/dev/null; then if ! command -v python &>/dev/null; then - echo "Error: Python not found, please install python 3.8 or higher and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." exit 1 fi fi @@ -26,10 +26,10 @@ fi BASEDIR=$(pwd) -uv venv --python 3.11.6 "$BASEDIR/env" +uv venv --python 3.12.3 "$BASEDIR/env" # shellcheck disable=SC1091 source "$BASEDIR/env/bin/activate" -uv pip install torch==2.8.0 --index-url https://download.pytorch.org/whl/cpu +uv pip install torch==2.8.0 torchvision --index-url https://download.pytorch.org/whl/cpu if [[ "$1" == "--disable-gui" ]]; then #! For termux , we don't need Qt based GUI packages="$(grep -v "^ *#\|^PyQt5" requirements.txt | grep .)" diff --git a/requirements.txt b/requirements.txt index 30c37b1..9e220d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,14 +2,14 @@ accelerate==1.6.0 diffusers==0.33.0 transformers==4.48.0 PyQt5 -Pillow==9.4.0 +Pillow==11.3.0 openvino==2025.1.0 optimum-intel==1.23.0 onnx==1.16.0 numpy==1.26.4 onnxruntime==1.17.3 pydantic -typing-extensions==4.10.0 +typing-extensions==4.12.2 pyyaml==6.0.1 gradio==5.6.0 peft==0.6.1 diff --git a/src/app.py b/src/app.py index 1d66e08..948ff20 100644 --- a/src/app.py +++ b/src/app.py @@ -243,7 +243,7 @@ parser.add_argument( "--lora", type=str, - help="LoRA model full path e.g D:\lora_models\CuteCartoon15V-LiberteRedmodModel-Cartoon-CuteCartoonAF.safetensors", + help=r"LoRA model full path e.g D:\lora_models\CuteCartoon15V-LiberteRedmodModel-Cartoon-CuteCartoonAF.safetensors", default=None, ) parser.add_argument( diff --git a/src/backend/openvino/stable_diffusion_engine.py b/src/backend/openvino/stable_diffusion_engine.py index 3546db2..e291131 100644 --- a/src/backend/openvino/stable_diffusion_engine.py +++ b/src/backend/openvino/stable_diffusion_engine.py @@ -7,7 +7,7 @@ from typing import Union, Optional, Any, List, Dict import numpy as np # openvino -from openvino.runtime import Core +from openvino import Core # tokenizer from transformers import CLIPTokenizer import torch @@ -1781,37 +1781,37 @@ def print_npu_turbo_art(): random_number = random.randint(1, 3) if random_number == 1: - print(" ") - print(" ___ ___ ___ ___ ___ ___ ") - print(" /\ \ /\ \ /\ \ /\ \ /\ \ _____ /\ \ ") - print(" \:\ \ /::\ \ \:\ \ ___ \:\ \ /::\ \ /::\ \ /::\ \ ") - print(" \:\ \ /:/\:\__\ \:\ \ /\__\ \:\ \ /:/\:\__\ /:/\:\ \ /:/\:\ \ ") - print(" _____\:\ \ /:/ /:/ / ___ \:\ \ /:/ / ___ \:\ \ /:/ /:/ / /:/ /::\__\ /:/ \:\ \ ") - print(" /::::::::\__\ /:/_/:/ / /\ \ \:\__\ /:/__/ /\ \ \:\__\ /:/_/:/__/___ /:/_/:/\:|__| /:/__/ \:\__\ ") - print(" \:\~~\~~\/__/ \:\/:/ / \:\ \ /:/ / /::\ \ \:\ \ /:/ / \:\/:::::/ / \:\/:/ /:/ / \:\ \ /:/ / ") - print(" \:\ \ \::/__/ \:\ /:/ / /:/\:\ \ \:\ /:/ / \::/~~/~~~~ \::/_/:/ / \:\ /:/ / ") - print(" \:\ \ \:\ \ \:\/:/ / \/__\:\ \ \:\/:/ / \:\~~\ \:\/:/ / \:\/:/ / ") - print(" \:\__\ \:\__\ \::/ / \:\__\ \::/ / \:\__\ \::/ / \::/ / ") - print(" \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ ") - print(" ") + print(r" ") + print(r" ___ ___ ___ ___ ___ ___ ") + print(r" /\ \ /\ \ /\ \ /\ \ /\ \ _____ /\ \ ") + print(r" \:\ \ /::\ \ \:\ \ ___ \:\ \ /::\ \ /::\ \ /::\ \ ") + print(r" \:\ \ /:/\:\__\ \:\ \ /\__\ \:\ \ /:/\:\__\ /:/\:\ \ /:/\:\ \ ") + print(r" _____\:\ \ /:/ /:/ / ___ \:\ \ /:/ / ___ \:\ \ /:/ /:/ / /:/ /::\__\ /:/ \:\ \ ") + print(r" /::::::::\__\ /:/_/:/ / /\ \ \:\__\ /:/__/ /\ \ \:\__\ /:/_/:/__/___ /:/_/:/\:|__| /:/__/ \:\__\ ") + print(r" \:\~~\~~\/__/ \:\/:/ / \:\ \ /:/ / /::\ \ \:\ \ /:/ / \:\/:::::/ / \:\/:/ /:/ / \:\ \ /:/ / ") + print(r" \:\ \ \::/__/ \:\ /:/ / /:/\:\ \ \:\ /:/ / \::/~~/~~~~ \::/_/:/ / \:\ /:/ / ") + print(r" \:\ \ \:\ \ \:\/:/ / \/__\:\ \ \:\/:/ / \:\~~\ \:\/:/ / \:\/:/ / ") + print(r" \:\__\ \:\__\ \::/ / \:\__\ \::/ / \:\__\ \::/ / \::/ / ") + print(r" \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ \/__/ ") + print(r" ") elif random_number == 2: - print(" _ _ ____ _ _ _____ _ _ ____ ____ ___ ") - print("| \ | | | _ \ | | | | |_ _| | | | | | _ \ | __ ) / _ \ ") - print("| \| | | |_) | | | | | | | | | | | | |_) | | _ \ | | | |") - print("| |\ | | __/ | |_| | | | | |_| | | _ < | |_) | | |_| |") - print("|_| \_| |_| \___/ |_| \___/ |_| \_\ |____/ \___/ ") - print(" ") + print(r" _ _ ____ _ _ _____ _ _ ____ ____ ___ ") + print(r"| \ | | | _ \ | | | | |_ _| | | | | | _ \ | __ ) / _ \ ") + print(r"| \| | | |_) | | | | | | | | | | | | |_) | | _ \ | | | |") + print(r"| |\ | | __/ | |_| | | | | |_| | | _ < | |_) | | |_| |") + print(r"|_| \_| |_| \___/ |_| \___/ |_| \_\ |____/ \___/ ") + print(r" ") else: - print("") - print(" ) ( ( ) ") - print(" ( /( )\ ) * ) )\ ) ( ( /( ") - print(" )\()) (()/( ( ` ) /( ( (()/( ( )\ )\()) ") - print("((_)\ /(_)) )\ ( )(_)) )\ /(_)) )((_) ((_)\ ") - print(" _((_) (_)) _ ((_) (_(_()) _ ((_) (_)) ((_)_ ((_) ") - print("| \| | | _ \ | | | | |_ _| | | | | | _ \ | _ ) / _ \ ") - print("| .` | | _/ | |_| | | | | |_| | | / | _ \ | (_) | ") - print("|_|\_| |_| \___/ |_| \___/ |_|_\ |___/ \___/ ") - print(" ") + print(r"") + print(r" ) ( ( ) ") + print(r" ( /( )\ ) * ) )\ ) ( ( /( ") + print(r" )\()) (()/( ( ` ) /( ( (()/( ( )\ )\()) ") + print(r"((_)\ /(_)) )\ ( )(_)) )\ /(_)) )((_) ((_)\ ") + print(r" _((_) (_)) _ ((_) (_(_()) _ ((_) (_)) ((_)_ ((_) ") + print(r"| \| | | _ \ | | | | |_ _| | | | | | _ \ | _ ) / _ \ ") + print(r"| .` | | _/ | |_| | | | | |_| | | / | _ \ | (_) | ") + print(r"|_|\_| |_| \___/ |_| \___/ |_|_\ |___/ \___/ ") + print(r" ") diff --git a/start-mcpserver.bat b/start-mcpserver.bat index 6bc259d..406af0a 100644 --- a/start-mcpserver.bat +++ b/start-mcpserver.bat @@ -6,9 +6,9 @@ set "PYTHON_COMMAND=python" call python --version > nul 2>&1 if %errorlevel% equ 0 ( - echo Python command check :OK + echo Python command check: OK ) else ( - echo "Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again" + echo "Error: Python command not found, please install Python (Recommended: Python 3.10..3.12) and try again" pause exit /b 1 diff --git a/start-mcpserver.sh b/start-mcpserver.sh index e12c495..064619e 100644 --- a/start-mcpserver.sh +++ b/start-mcpserver.sh @@ -5,7 +5,7 @@ PYTHON_COMMAND="python3" if ! command -v python3 &>/dev/null; then if ! command -v python &>/dev/null; then - echo "Error: Python not found, please install python 3.8 or higher and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." exit 1 fi fi diff --git a/start-realtime.bat b/start-realtime.bat index 060268b..74da6a0 100644 --- a/start-realtime.bat +++ b/start-realtime.bat @@ -6,9 +6,9 @@ set "PYTHON_COMMAND=python" call python --version > nul 2>&1 if %errorlevel% equ 0 ( - echo Python command check :OK + echo Python command check: OK ) else ( - echo "Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." pause exit /b 1 diff --git a/start-realtime.sh b/start-realtime.sh index b5b9c4a..9af44f0 100644 --- a/start-realtime.sh +++ b/start-realtime.sh @@ -10,7 +10,7 @@ PYTHON_COMMAND="python3" if command -v $PYTHON_COMMAND >/dev/null 2>&1; then echo "Python command check: OK" else - echo "Error: Python command not found, please install Python (Recommended: Python 3.10 or Python 3.11) and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." exit 1 fi diff --git a/start-webserver.bat b/start-webserver.bat index 2228ee0..7ec13fb 100644 --- a/start-webserver.bat +++ b/start-webserver.bat @@ -6,9 +6,9 @@ set "PYTHON_COMMAND=python" call python --version > nul 2>&1 if %errorlevel% equ 0 ( - echo Python command check :OK + echo Python command check: OK ) else ( - echo "Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." pause exit /b 1 diff --git a/start-webserver.sh b/start-webserver.sh index 29b4057..a48fe5c 100644 --- a/start-webserver.sh +++ b/start-webserver.sh @@ -5,7 +5,7 @@ PYTHON_COMMAND="python3" if ! command -v python3 &>/dev/null; then if ! command -v python &>/dev/null; then - echo "Error: Python not found, please install python 3.8 or higher and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." exit 1 fi fi diff --git a/start-webui.bat b/start-webui.bat index 7db54c4..2d2ae96 100644 --- a/start-webui.bat +++ b/start-webui.bat @@ -6,9 +6,9 @@ set "PYTHON_COMMAND=python" call python --version > nul 2>&1 if %errorlevel% equ 0 ( - echo Python command check :OK + echo Python command check: OK ) else ( - echo "Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." pause exit /b 1 @@ -22,4 +22,4 @@ for /f "tokens=2" %%I in ('%PYTHON_COMMAND% --version 2^>^&1') do ( echo Python version: %python_version% set PATH=%PATH%;%~dp0env\Lib\site-packages\openvino\libs -call "%~dp0env\Scripts\activate.bat" && %PYTHON_COMMAND% "%~dp0\src\app.py" -w \ No newline at end of file +call "%~dp0env\Scripts\activate.bat" && %PYTHON_COMMAND% "%~dp0\src\app.py" -w --port 8000 \ No newline at end of file diff --git a/start-webui.sh b/start-webui.sh index 758cdfd..5fcbc5a 100644 --- a/start-webui.sh +++ b/start-webui.sh @@ -5,7 +5,7 @@ PYTHON_COMMAND="python3" if ! command -v python3 &>/dev/null; then if ! command -v python &>/dev/null; then - echo "Error: Python not found, please install python 3.8 or higher and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." exit 1 fi fi diff --git a/start.bat b/start.bat index 886f7c2..bd3605e 100644 --- a/start.bat +++ b/start.bat @@ -6,9 +6,9 @@ set "PYTHON_COMMAND=python" call python --version > nul 2>&1 if %errorlevel% equ 0 ( - echo Python command check :OK + echo Python command check: OK ) else ( - echo "Error: Python command not found, please install Python (Recommended : Python 3.10 or Python 3.11) and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." pause exit /b 1 diff --git a/start.sh b/start.sh index d35cbc7..515c600 100644 --- a/start.sh +++ b/start.sh @@ -5,7 +5,7 @@ PYTHON_COMMAND="python3" if ! command -v python3 &>/dev/null; then if ! command -v python &>/dev/null; then - echo "Error: Python not found, please install python 3.8 or higher and try again" + echo "Error: Python not found, please install Python (Recommended: Python 3.10..3.12) and try again." exit 1 fi fi