|
@echo off |
|
|
|
REM ############################################################################ |
|
REM |
|
REM |
|
REM Install Spaghetti AI for Windows using NVIDIA GPU |
|
REM |
|
REM December 28th, 2023 - This app remains a work in progress. |
|
REM |
|
REM |
|
REM Before running this script, you need to complete the following steps. |
|
REM |
|
REM I don't recommend using this file. I was trying to make it easier to |
|
REM install, but it's best to read Instructions.txt. You need to |
|
REM configure your firewall and antivirus program. You may have to |
|
REM install the app several times. |
|
REM |
|
REM It is also important to note that you should not have any other |
|
REM programs opened while installing this app. Until I had fully allowed |
|
REM the app through my firewall and antivirus program, at times my |
|
REM computer completely froze up. You don't want to lose any work you are |
|
REM working on. |
|
REM |
|
REM |
|
REM ############################################################################ |
|
REM |
|
REM |
|
REM Step 1 (if you haven't done already): |
|
REM |
|
REM Install Python 3.10.6: |
|
REM |
|
REM https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe |
|
REM |
|
REM Make sure to check "Add Python to PATH" |
|
REM |
|
REM |
|
REM ##################### |
|
REM |
|
REM |
|
REM Step 2 (if you haven't done already): |
|
REM |
|
REM I'm not certain if you need this. You might not. I already had it |
|
REM installed on my system. |
|
REM |
|
REM Install git |
|
REM |
|
REM https://git-scm.com/download/win |
|
REM |
|
REM |
|
REM ##################### |
|
REM |
|
REM |
|
REM Step 3: |
|
REM |
|
REM Create directory manually: |
|
REM |
|
REM C:/Spaghetti_AI |
|
REM |
|
REM This can be anywhere, but if you change it here you need to change it |
|
REM in this script and in the other places that use it. |
|
REM |
|
REM Move these files into that folder: |
|
REM |
|
REM C:/Spaghetti_AI/.venv/app_files/spaghetti_ai_launcher.bat |
|
REM C:/Spaghetti_AI/.venv/app_files/spaghetti_ai_script.py |
|
REM |
|
REM |
|
REM ##################### |
|
REM |
|
REM |
|
REM Step 4 |
|
REM |
|
REM You can either follow the instructions in Instructions.txt or use |
|
REM this file to install this app on Windows to try to do everything at |
|
REM once. |
|
REM |
|
REM To use this easier method, rename this file from ".txt" to ".bat". |
|
REM Then double click this file to install the many packages, well over |
|
REM 100, that will be needed to run this app. They will install into the |
|
REM virtual environment that the longer set of instructions covers. It |
|
REM will download several gigabytes of data. |
|
REM |
|
REM You should only need to run this file once. |
|
REM |
|
REM Once everything is installed, your browser will automatically launch |
|
REM the app. |
|
REM |
|
REM |
|
REM ##################### |
|
REM |
|
REM |
|
REM Step 5 |
|
REM |
|
REM To download a lot of data at once rather than waiting until you use |
|
REM each model, you can add this at the end of the URL: |
|
REM |
|
REM ?download_data=1 |
|
REM |
|
REM It will download dozens of gigabytes of data, so you may not want to |
|
REM do that. If you do it while using this script, you can do it without |
|
REM updating "HF_HUB_OFFLINE" in "spaghetti_ai_launcher.bat". |
|
REM |
|
REM |
|
REM ##################### |
|
REM |
|
REM |
|
REM Step 6 |
|
REM |
|
REM Normal access of the app should be done using |
|
REM "spaghetti_ai_launcher.bat", not this file. This file checks to make |
|
REM sure everything is installed each time. While that is okay, it's not |
|
REM necessary. |
|
REM |
|
REM |
|
REM ############################################################################ |
|
|
|
set HF_HUB_OFFLINE=0 |
|
set HF_HUB_DISABLE_TELEMETRY=1 |
|
|
|
cd C:/Spaghetti_AI |
|
|
|
call py -m venv .venv |
|
|
|
call .venv\Scripts\activate.bat |
|
|
|
call py -m pip install --upgrade pip |
|
|
|
call pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121 |
|
|
|
call pip install diffusers transformers accelerate ftfy modin[all] invisible_watermark torchsde |
|
|
|
REM Version 4.11.0 of Gradio works |
|
|
|
call pip install https://gradio-builds.s3.amazonaws.com/d4068557953746662235d595ec435c42ceb24414/gradio-4.11.0-py3-none-any.whl |
|
|
|
call py .venv/app_files/spaghetti_ai_script.py |
|
|
|
cmd /k |