forked from Hukasx0/character-factory
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
installation for koboldcpp - WebUi (Recommended)
- Loading branch information
Showing
7 changed files
with
529 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ | |
app 2/characters/.png | ||
app 2/characters/uploaded_character/uploaded_character.png | ||
/characters | ||
venv/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@echo off | ||
setlocal EnableDelayedExpansion | ||
|
||
:: Check if virtual environment already exists | ||
if not exist "venv\Scripts\activate.bat" ( | ||
echo Creating virtual environment... | ||
python -m venv venv | ||
if errorlevel 1 ( | ||
echo Failed to create virtual environment | ||
pause | ||
exit /b 1 | ||
) | ||
) | ||
|
||
:: Activate virtual environment | ||
call venv\Scripts\activate.bat | ||
|
||
:: Upgrade pip | ||
echo Upgrading pip... | ||
python -m pip install --upgrade pip | ||
if errorlevel 1 ( | ||
echo Failed to upgrade pip | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
:: Install requirements from requirements.txt | ||
if exist requirements.txt ( | ||
echo Installing or upgrading requirements from requirements.txt... | ||
pip install -r requirements.txt --use-deprecated=legacy-resolver --no-cache-dir --ignore-installed | ||
if errorlevel 1 ( | ||
echo Failed to install some packages from requirements.txt, but continuing... | ||
) | ||
) else ( | ||
echo WARNING: requirements.txt not found! | ||
) | ||
|
||
:: Verify Python executable path and installed packages | ||
where python | ||
pip list | ||
|
||
:: Installation complete | ||
echo ======================================================== | ||
echo Installation complete! | ||
echo Virtual environment created at: venv | ||
echo Python packages installed successfully. | ||
echo ======================================================== | ||
pause | ||
endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
|
||
:: Display warning and ask for confirmation | ||
echo ======================================================== | ||
echo WARNING: This script will perform the following actions: | ||
echo 1. Create a virtual environment in the current directory. | ||
echo 2. Install Python packages, including PyTorch, Gradio, NumPy, Pandas, and Diffusers. | ||
echo ======================================================== | ||
echo. | ||
setlocal enabledelayedexpansion | ||
set /p CONFIRM="Do you want to continue? (y/n): " | ||
if /i "!CONFIRM!" neq "y" ( | ||
echo Installation canceled. | ||
pause | ||
exit /b 0 | ||
) | ||
|
||
|
||
:: Create virtual environment and install requirements if it doesn't exist | ||
if not exist "venv\Scripts\activate.bat" ( | ||
echo Creating virtual environment... | ||
python -m venv venv | ||
if errorlevel 1 ( | ||
echo Failed to create virtual environment | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
:: Activate virtual environment | ||
call venv\Scripts\activate.bat | ||
|
||
:: Upgrade pip first | ||
echo Upgrading pip... | ||
python -m pip install --upgrade pip | ||
if errorlevel 1 ( | ||
echo Failed to upgrade pip | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
:: Install wheel and setuptools first | ||
echo Installing wheel and setuptools... | ||
pip install --upgrade wheel setuptools --no-cache-dir | ||
if errorlevel 1 ( | ||
echo Failed to install wheel and setuptools | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
:: Install torch separately first (if it's in requirements) | ||
if exist requirements.txt ( | ||
findstr /i "torch" requirements.txt >nul | ||
if errorlevel 0 ( | ||
echo Installing PyTorch first... | ||
pip install torch torchvision torchaudio --no-cache-dir | ||
if errorlevel 1 ( | ||
echo Failed to install PyTorch | ||
pause | ||
exit /b 1 | ||
) | ||
) | ||
) | ||
|
||
:: Install requirements (First Pass) | ||
echo Installing requirements (First Pass)... | ||
if exist requirements.txt ( | ||
pip install -r requirements.txt --no-cache-dir --ignore-installed | ||
if errorlevel 1 ( | ||
echo Some packages failed to install during the first pass. Continuing to the second pass... | ||
) | ||
) else ( | ||
echo WARNING: requirements.txt not found! | ||
) | ||
|
||
:: Install requirements (Second Pass) | ||
echo Installing requirements (Second Pass)... | ||
if exist requirements.txt ( | ||
pip install -r requirements.txt --no-cache-dir --ignore-installed | ||
if errorlevel 1 ( | ||
echo Some packages failed to install during the second pass. Continuing anyway... | ||
) | ||
) else ( | ||
echo WARNING: requirements.txt not found! | ||
) | ||
|
||
:: Install critical packages explicitly | ||
echo Installing critical packages... | ||
pip install gradio numpy pandas diffusers --no-cache-dir | ||
if errorlevel 1 ( | ||
echo Failed to install critical packages | ||
pause | ||
exit /b 1 | ||
) | ||
) else ( | ||
:: Just activate the existing virtual environment | ||
call venv\Scripts\activate.bat | ||
) | ||
|
||
:: Verify Python executable path | ||
where python | ||
|
||
:: Verify installed packages | ||
pip list | ||
|
||
:: Installation complete | ||
echo ======================================================== | ||
echo Installation complete! | ||
echo Virtual environment created at: venv | ||
echo Python packages installed successfully. | ||
echo ======================================================== | ||
pause | ||
endlocal |
Oops, something went wrong.