From 2604e3f7ac580eeabd548d3a152ba375c61c279c Mon Sep 17 00:00:00 2001 From: jllllll Date: Fri, 24 Mar 2023 18:15:24 -0500 Subject: [PATCH] Update download-model.bat Added variables for model selection and text only mode. Updated virtual environment handling to use Micromamba. --- download-model.bat | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/download-model.bat b/download-model.bat index 874d359e..148f493a 100644 --- a/download-model.bat +++ b/download-model.bat @@ -1,9 +1,28 @@ @echo off -set INSTALL_ENV_DIR=%cd%\installer_files\env -set PATH=%INSTALL_ENV_DIR%;%INSTALL_ENV_DIR%\Library\bin;%INSTALL_ENV_DIR%\Scripts;%INSTALL_ENV_DIR%\Library\usr\bin;%PATH% -call conda activate -cd text-generation-webui -python download-model.py +SET TextOnly=False &REM True or False for Text only mode +SET ModelName="chansung/alpaca-lora-13b" &REM HuggingFace model repo eg. "facebook/opt-1.3b" +cd /D "%~dp0" + +set MAMBA_ROOT_PREFIX=%cd%\installer_files\mamba +set INSTALL_ENV_DIR=%cd%\installer_files\env + +if not exist "%MAMBA_ROOT_PREFIX%\Scripts\activate.bat" ( + call "%MAMBA_ROOT_PREFIX%\micromamba.exe" shell hook >nul 2>&1 +) +call "%MAMBA_ROOT_PREFIX%\condabin\mamba_hook.bat" || ( echo MicroMamba hook not found. && goto end ) +call micromamba activate "%INSTALL_ENV_DIR%" || goto end + +cd text-generation-webui || goto end +goto %TextOnly% + +:False +call python download-model.py %ModelName% +goto end + +:True +call python download-model.py %ModelName% --text-only + +:end pause