diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 51a51549..df28e57a 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -191,6 +191,16 @@ call WHERE uvicorn > .tmp exit /b ) +@>nul 2>nul call python -m picklescan --help +@if "%ERRORLEVEL%" NEQ "0" ( + @echo. & echo Picklescan not found. Installing + @call pip install picklescan || ( + echo "Error installing the picklescan package necessary for Stable Diffusion UI. Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" + pause + exit /b + ) +) + @>nul findstr /m "conda_sd_ui_deps_installed" ..\scripts\install_status.txt @if "%ERRORLEVEL%" NEQ "0" ( @echo conda_sd_ui_deps_installed >> ..\scripts\install_status.txt diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index d4bb1ad1..adcba1f2 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -156,6 +156,13 @@ else echo conda_sd_ui_deps_installed >> ../scripts/install_status.txt fi +if python -m picklescan --help >/dev/null 2>&1; then + echo "Picklescan is already installed." +else + echo "Picklescan not found, installing." + pip install picklescan || fail "Picklescan installation failed." +fi + mkdir -p "../models/stable-diffusion" diff --git a/ui/media/js/main.js b/ui/media/js/main.js index afb0925d..eee7d8b9 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -1141,8 +1141,16 @@ async function getModels() { let res = await fetch('/get/models') const models = await res.json() - console.log('get models response', models) + console.log('got models response', models) + if ( "scan-error" in models ) { + // let previewPane = document.getElementById('tab-content-wrapper') + let previewPane = document.getElementById('preview') + previewPane.style.background="red" + previewPane.style.textAlign="center" + previewPane.innerHTML = '