Compare commits

...

25 Commits

Author SHA1 Message Date
fc1a9bf3a6 Support python paths in legacy installations in the dev console 2025-07-25 14:49:43 +05:30
d1c834d19b Use the launched python executable for installing new packages 2025-07-25 14:43:43 +05:30
374b411d6c Fix a conflict where the system-wide python gets picked up on some Windows PCs 2025-07-25 14:31:00 +05:30
f443e3c694 Ignore pickle scanning for .sft and .gguf files 2025-06-27 16:44:35 +05:30
3a07523d08 Remove an unnecessary check, the installer already checks for this 2025-06-27 14:07:15 +05:30
a9e5c81a47 Fix a install warning check - this field isn't saved anymore 2025-06-27 14:07:09 +05:30
8016453a2c Potential fix for #1942 - basicsr wasn't installing on mac 2025-06-27 13:59:01 +05:30
3925e50a7f Add support for AMD 9060/9070 2025-06-13 10:44:51 +05:30
1d27765150 Auto-fix cpu-only torch installations on NVIDIA 5060 2025-05-30 18:35:44 +05:30
14e45bfd24 Early support for AMD 9070 (and Navi 4x series) 2025-05-30 13:11:24 +05:30
46c4aca7b7 Recognize 5060 Ti and a few other recent GPUs 2025-05-30 10:58:36 +05:30
38eb8f934e Support more GPUs (workstation and mining); Fix torchruntime test 2025-04-29 10:40:24 +05:30
0393c907d7 Fix torchruntime to not force cu128 on older NVIDIA GPUs (which don't support it) 2025-04-29 10:08:42 +05:30
f9c664dc3c Tell the user to reinstall ED if they're trying to use a 50xx GPU with Python 3.8-based Easy Diffusion 2025-04-27 21:29:14 +05:30
59ca8b0336 Fix FileNotFoundError when installing torch on Windows PCs without powershell in their system PATH variable 2025-04-25 20:45:37 +05:30
e0a4d43087 Use pytorch 2.7 (with cuda 12.8) on new installations with NVIDIA gpus 2025-04-24 15:51:15 +05:30
a33737b991 Auto-upgrade torch for NVIDIA 50xx series. Fix for #1918 2025-04-23 15:23:54 +05:30
bac23290dd Fix for incorrect upgrade logic for torchruntime. Affects the workaround in #1918 2025-04-23 15:23:49 +05:30
8380ba97c5 Update README.md 2025-04-02 10:13:42 +05:30
45c6865b2d Fix for blackwell GPUs on new installations 2025-03-29 14:35:55 +05:30
1b3d048bf2 Use safetensors as the default model instead of ckpt 2025-03-11 10:25:13 +05:30
a675161e47 Fix nvidia 50xx support 2025-03-10 06:21:18 +05:30
3a9f71d17a Fix compatibility with python 3.9 and directml 2025-03-07 10:39:58 +05:30
b09be681e6 Check for half-precision on GeForce MX450 2025-03-07 10:28:28 +05:30
4330434835 Fix Granite Ridge APU device type 2025-03-06 12:48:46 +05:30
8 changed files with 66 additions and 29 deletions

View File

@ -1,5 +1,5 @@
# Easy Diffusion 3.0
### The easiest way to install and use [Stable Diffusion](https://github.com/CompVis/stable-diffusion) on your computer.
### An easy way to install and use [Stable Diffusion](https://github.com/CompVis/stable-diffusion) on your computer.
Does not require technical knowledge, does not require pre-installed software. 1-click install, powerful features, friendly community.

View File

@ -31,14 +31,18 @@ powershell -Command "(Get-WmiObject Win32_VideoController | Select-Object Name,
@rem activate the legacy environment (if present) and set PYTHONPATH
if exist "installer_files\env" (
set PYTHONPATH=%cd%\installer_files\env\lib\site-packages
set PYTHON=%cd%\installer_files\env\python.exe
echo PYTHON=%PYTHON%
)
if exist "stable-diffusion\env" (
call conda activate .\stable-diffusion\env
set PYTHONPATH=%cd%\stable-diffusion\env\lib\site-packages
set PYTHON=%cd%\stable-diffusion\env\python.exe
echo PYTHON=%PYTHON%
)
call where python
call python --version
@REM call where python
call "%PYTHON%" --version
echo PYTHONPATH=%PYTHONPATH%

View File

@ -17,6 +17,7 @@ from pathlib import Path
from pprint import pprint
import re
import torchruntime
from torchruntime.device_db import get_gpus
os_name = platform.system()
@ -35,11 +36,15 @@ modules_to_check = {
# "xformers": "0.0.16",
"huggingface-hub": "0.21.4",
"wandb": "0.17.2",
"torchruntime": "1.14.1",
# "torchruntime": "1.16.2",
"torchsde": "0.2.6",
"basicsr": "1.4.2",
"gfpgan": "1.3.8",
}
modules_to_log = ["torchruntime", "torch", "torchvision", "sdkit", "stable-diffusion-sdkit", "diffusers"]
BLACKWELL_DEVICES = re.compile(r"\b(?:5060|5070|5080|5090)\b")
def version(module_name: str) -> str:
try:
@ -49,12 +54,14 @@ def version(module_name: str) -> str:
def install(module_name: str, module_version: str, index_url=None):
install_cmd = f"python -m pip install --upgrade {module_name}=={module_version}"
install_cmd = f'"{sys.executable}" -m pip install --upgrade {module_name}=={module_version}'
if index_url:
install_cmd += f" --index-url {index_url}"
if module_name == "sdkit" and version("sdkit") is not None:
install_cmd += " -q"
if module_name in ("basicsr", "gfpgan"):
install_cmd += " --use-pep517" # potential fix for https://github.com/easydiffusion/easydiffusion/issues/1942
print(">", install_cmd)
os.system(install_cmd)
@ -63,6 +70,26 @@ def install(module_name: str, module_version: str, index_url=None):
def update_modules():
if version("torch") is None:
torchruntime.install(["torch", "torchvision"])
else:
torch_version_str = version("torch")
torch_version = version_str_to_tuple(torch_version_str)
is_cpu_torch = "+" not in torch_version_str
print(f"Current torch version: {torch_version} ({torch_version_str})")
if torch_version < (2, 7) or is_cpu_torch:
gpu_infos = get_gpus()
device_names = set(gpu.device_name for gpu in gpu_infos)
if any(BLACKWELL_DEVICES.search(device_name) for device_name in device_names):
if sys.version_info < (3, 9):
print(
"\n###################################\n"
"NVIDIA 50xx series of graphics cards detected!\n\n"
"To use this graphics card, please install the latest version of Easy Diffusion from: https://github.com/easydiffusion/easydiffusion#installation"
"\n###################################\n"
)
sys.exit()
else:
print("Upgrading torch to support NVIDIA 50xx series of graphics cards")
torchruntime.install(["--force", "--upgrade", "torch", "torchvision"])
for module_name, allowed_versions in modules_to_check.items():
if os.path.exists(f"src/{module_name}"):
@ -97,10 +124,10 @@ def update_modules():
# if sdkit is 2.0.15.x (or lower), then diffusers should be restricted to 0.21.4 (see below for the reason)
# otherwise use the current sdkit version (with the corresponding diffusers version)
expected_sdkit_version_str = "2.0.22.7"
expected_sdkit_version_str = "2.0.22.8"
expected_diffusers_version_str = "0.28.2"
legacy_sdkit_version_str = "2.0.15.16"
legacy_sdkit_version_str = "2.0.15.17"
legacy_diffusers_version_str = "0.21.4"
sdkit_version_str = version("sdkit")
@ -177,9 +204,9 @@ def update_modules():
def _install(module_name, module_version=None):
if module_version is None:
install_cmd = f"python -m pip install {module_name}"
install_cmd = f'"{sys.executable}" -m pip install {module_name}'
else:
install_cmd = f"python -m pip install --upgrade {module_name}=={module_version}"
install_cmd = f'"{sys.executable}" -m pip install --upgrade {module_name}=={module_version}'
print(">", install_cmd)
os.system(install_cmd)

View File

@ -26,19 +26,19 @@ if "%update_branch%"=="" (
set update_branch=main
)
@>nul findstr /m "conda_sd_ui_deps_installed" scripts\install_status.txt
@if "%ERRORLEVEL%" NEQ "0" (
for /f "tokens=*" %%a in ('python -c "import os; parts = os.getcwd().split(os.path.sep); print(len(parts))"') do if "%%a" NEQ "2" (
echo. & echo "!!!! WARNING !!!!" & echo.
echo "Your 'stable-diffusion-ui' folder is at %cd%" & echo.
echo "The 'stable-diffusion-ui' folder needs to be at the top of your drive, for e.g. 'C:\stable-diffusion-ui' or 'D:\stable-diffusion-ui' etc."
echo "Not placing this folder at the top of a drive can cause errors on some computers."
echo. & echo "Recommended: Please close this window and move the 'stable-diffusion-ui' folder to the top of a drive. For e.g. 'C:\stable-diffusion-ui'. Then run the installer again." & echo.
echo "Not Recommended: If you're sure that you want to install at the current location, please press any key to continue." & echo.
@REM @>nul findstr /m "sd_install_complete" scripts\install_status.txt
@REM @if "%ERRORLEVEL%" NEQ "0" (
@REM for /f "tokens=*" %%a in ('python -c "import os; parts = os.getcwd().split(os.path.sep); print(len(parts))"') do if "%%a" NEQ "2" (
@REM echo. & echo "!!!! WARNING !!!!" & echo.
@REM echo "Your 'stable-diffusion-ui' folder is at %cd%" & echo.
@REM echo "The 'stable-diffusion-ui' folder needs to be at the top of your drive, for e.g. 'C:\stable-diffusion-ui' or 'D:\stable-diffusion-ui' etc."
@REM echo "Not placing this folder at the top of a drive can cause errors on some computers."
@REM echo. & echo "Recommended: Please close this window and move the 'stable-diffusion-ui' folder to the top of a drive. For e.g. 'C:\stable-diffusion-ui'. Then run the installer again." & echo.
@REM echo "Not Recommended: If you're sure that you want to install at the current location, please press any key to continue." & echo.
pause
)
)
@REM pause
@REM )
@REM )
@>nul findstr /m "sd_ui_git_cloned" scripts\install_status.txt
@if "%ERRORLEVEL%" EQU "0" (

View File

@ -66,13 +66,17 @@ set PYTHONNOUSERSITE=1
set PYTHONPATH=%INSTALL_ENV_DIR%\lib\site-packages
echo PYTHONPATH=%PYTHONPATH%
set PYTHON=%INSTALL_ENV_DIR%\python.exe
echo PYTHON=%PYTHON%
@rem Download the required packages
call where python
call python --version
@REM call where python
call "%PYTHON%" --version
call python -m pip install -q torchruntime
@rem this is outside check_modules.py to ensure that the required version of torchruntime is present
call "%PYTHON%" -m pip install -q "torchruntime>=1.19.1"
call python scripts\check_modules.py --launch-uvicorn
call "%PYTHON%" scripts\check_modules.py --launch-uvicorn
pause
exit /b

View File

@ -46,7 +46,8 @@ fi
if [ -e "src" ]; then mv src src-old; fi
if [ -e "ldm" ]; then mv ldm ldm-old; fi
python -m pip install -q torchruntime
# this is outside check_modules.py to ensure that the required version of torchruntime is present
python -m pip install -q "torchruntime>=1.19.1"
cd ..
# Download the required packages

View File

@ -37,7 +37,7 @@ MODEL_EXTENSIONS = {
}
DEFAULT_MODELS = {
"stable-diffusion": [
{"file_name": "sd-v1-4.ckpt", "model_id": "1.4"},
{"file_name": "sd-v1-5.safetensors", "model_id": "1.5-pruned-emaonly-fp16"},
],
"gfpgan": [
{"file_name": "GFPGANv1.4.pth", "model_id": "1.4"},
@ -293,7 +293,7 @@ def make_model_folders():
def is_malicious_model(file_path):
try:
if file_path.endswith(".safetensors"):
if file_path.endswith((".safetensors", ".sft", ".gguf")):
return False
scan_result = scan_model(file_path)
if scan_result.issues_count > 0 or scan_result.infected_files > 0:

View File

@ -7,7 +7,8 @@ from sdkit.utils import log
from easydiffusion import app
# future home of scripts/check_modules.py
# was meant to be a rewrite of scripts/check_modules.py
# but probably dead for now
manifest = {
"tensorrt": {