From 801db438b058acf05db14088fafd916435f8dcd6 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 10 Jun 2025 19:46:28 -0700 Subject: [PATCH 1/2] Undo changes to portable builds --- .../workflows/build-portable-release-cuda.yml | 21 +++---------------- .../build-portable-release-vulkan.yml | 21 +++---------------- .github/workflows/build-portable-release.yml | 21 +++---------------- 3 files changed, 9 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build-portable-release-cuda.yml b/.github/workflows/build-portable-release-cuda.yml index 7ba1fc6b..571cbac0 100644 --- a/.github/workflows/build-portable-release-cuda.yml +++ b/.github/workflows/build-portable-release-cuda.yml @@ -160,31 +160,16 @@ jobs: rm requirements_cuda_temp.txt fi - # 6. Move up and rename folder to include version + # 6. Create ZIP file cd .. VERSION_CLEAN="${VERSION#v}" - if [[ "$RUNNER_OS" == "Windows" ]]; then - sleep 3 - powershell -Command "Move-Item -Path text-generation-webui -Destination text-generation-webui-${VERSION_CLEAN} -Force" - else - mv text-generation-webui text-generation-webui-${VERSION_CLEAN} - fi - - # 7. Create ZIP file ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-cuda${CUDA_VERSION}.zip" echo "Creating archive: $ZIP_NAME" if [[ "$RUNNER_OS" == "Windows" ]]; then - powershell -Command "Compress-Archive -Path text-generation-webui-${VERSION_CLEAN} -DestinationPath $ZIP_NAME" + powershell -Command "Compress-Archive -Path text-generation-webui -DestinationPath $ZIP_NAME" else - zip -r "$ZIP_NAME" text-generation-webui-${VERSION_CLEAN} - fi - - # Rename back after creating the zip (the next step assumes this folder exists) - if [[ "$RUNNER_OS" == "Windows" ]]; then - powershell -Command "Move-Item -Path text-generation-webui-${VERSION_CLEAN} -Destination text-generation-webui -Force" - else - mv text-generation-webui-${VERSION_CLEAN} text-generation-webui + zip -r "$ZIP_NAME" text-generation-webui fi - name: Upload files to a GitHub release diff --git a/.github/workflows/build-portable-release-vulkan.yml b/.github/workflows/build-portable-release-vulkan.yml index c02aa662..4e88d4d9 100644 --- a/.github/workflows/build-portable-release-vulkan.yml +++ b/.github/workflows/build-portable-release-vulkan.yml @@ -146,31 +146,16 @@ jobs: echo "Installing Python packages from $REQ_FILE..." $PIP_PATH install --target="./$PACKAGES_PATH" -r "$REQ_FILE" - # 5. Move up and rename folder to include version + # 6. Create ZIP file cd .. VERSION_CLEAN="${VERSION#v}" - if [[ "$RUNNER_OS" == "Windows" ]]; then - sleep 3 - powershell -Command "Move-Item -Path text-generation-webui -Destination text-generation-webui-${VERSION_CLEAN} -Force" - else - mv text-generation-webui text-generation-webui-${VERSION_CLEAN} - fi - - # 6. Create ZIP file ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-vulkan.zip" echo "Creating archive: $ZIP_NAME" if [[ "$RUNNER_OS" == "Windows" ]]; then - powershell -Command "Compress-Archive -Path text-generation-webui-${VERSION_CLEAN} -DestinationPath $ZIP_NAME" + powershell -Command "Compress-Archive -Path text-generation-webui -DestinationPath $ZIP_NAME" else - zip -r "$ZIP_NAME" text-generation-webui-${VERSION_CLEAN} - fi - - # Rename back after creating the zip (the next step assumes this folder exists) - if [[ "$RUNNER_OS" == "Windows" ]]; then - powershell -Command "Move-Item -Path text-generation-webui-${VERSION_CLEAN} -Destination text-generation-webui -Force" - else - mv text-generation-webui-${VERSION_CLEAN} text-generation-webui + zip -r "$ZIP_NAME" text-generation-webui fi - name: Upload files to a GitHub release diff --git a/.github/workflows/build-portable-release.yml b/.github/workflows/build-portable-release.yml index 85179617..6910ce2c 100644 --- a/.github/workflows/build-portable-release.yml +++ b/.github/workflows/build-portable-release.yml @@ -170,31 +170,16 @@ jobs: echo "Installing Python packages from $REQ_FILE..." $PIP_PATH install --target="./$PACKAGES_PATH" -r "$REQ_FILE" - # 5. Move up and rename folder to include version + # 5. Create ZIP file cd .. VERSION_CLEAN="${VERSION#v}" - if [[ "$RUNNER_OS" == "Windows" ]]; then - sleep 3 # Give time for any lingering file handles to close - powershell -Command "Move-Item -Path text-generation-webui -Destination text-generation-webui-${VERSION_CLEAN} -Force" - else - mv text-generation-webui text-generation-webui-${VERSION_CLEAN} - fi - - # 6. Create ZIP file ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}.zip" echo "Creating archive: $ZIP_NAME" if [[ "$RUNNER_OS" == "Windows" ]]; then - powershell -Command "Compress-Archive -Path text-generation-webui-${VERSION_CLEAN} -DestinationPath $ZIP_NAME" + powershell -Command "Compress-Archive -Path text-generation-webui -DestinationPath $ZIP_NAME" else - zip -r "$ZIP_NAME" text-generation-webui-${VERSION_CLEAN} - fi - - # Rename back after creating the zip (the next step assumes this folder exists) - if [[ "$RUNNER_OS" == "Windows" ]]; then - powershell -Command "Move-Item -Path text-generation-webui-${VERSION_CLEAN} -Destination text-generation-webui -Force" - else - mv text-generation-webui-${VERSION_CLEAN} text-generation-webui + zip -r "$ZIP_NAME" text-generation-webui fi - name: Upload files to a GitHub release From 13a5288d011495ad8a354ab7d2d0dbd1ccf19e1c Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 10 Jun 2025 21:08:18 -0700 Subject: [PATCH 2/2] Fix an error when upgrading from cuda 12.4 to cuda 12.8 --- one_click.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/one_click.py b/one_click.py index 94f2aab0..050da76b 100644 --- a/one_click.py +++ b/one_click.py @@ -298,7 +298,7 @@ def update_pytorch_and_python(): def clean_outdated_pytorch_cuda_dependencies(): - patterns = ["cu121", "cu122", "torch2.4"] + patterns = ["cu121", "cu122", "torch2.4", "torchvision", "torchaudio"] result = run_cmd("python -m pip list --format=freeze", capture_output=True, environment=True) matching_packages = []