[PR #81] [CLOSED] Update Launcher.bat GPU detection code, and others. #119

Closed
opened 2026-10-15 18:07:08 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/SillyTavern/SillyTavern-Launcher/pull/81
Author: @JaceEthaniel
Created: 9/30/2024
Status: ❌ Closed

Base: main ← Head: main


📝 Commits (6)

  • 34ddcc1 Update Launcher.bat
  • 0b71f9d Replace gpu_info.bat with gpu_info.ps1
  • b9259da Update gpu_info.ps1
  • 3403267 Removed redundant comment...
  • d047038 Removed unneeded cd call.
  • 3687965 Just a slight alteration to a comment...

📊 Changes

3 files changed (+52 additions, -84 deletions)

View changed files

📝 Launcher.bat (+18 -37)
➖ bin/functions/Toolbox/Troubleshooting/gpu_info.bat (+0 -47)
➕ bin/functions/Toolbox/Troubleshooting/gpu_info.ps1 (+34 -0)

📄 Description

As promised... I learned more about batch and have now updated the code for GPU detection in the launcher.bat file, and replaced gpu_info.bat with gpu_info.ps1 because batch is not good at handling/ sorting gpu information. As a result, it is more streamlined and will now pick the GPU with the most VRAM from among all installed gpus, instead of only the last two.

I know. I know. I learned more about batch and so I replaced the batch code with powershell code... but I also made other edits:

I have altered how the GPU information is stored, displayed on the home screen, and how frequently the gpu_info script is called. First, GPU info for the preferred GPU is now stored to the log file without ANSI codes by using the variables set previously (instead of making another call to gpu_info.ps1). Second, the gpuInfo variable is also set using the two variables previously set and is formatted at the same time to include ANSI codes (that way we don't have ANSI codes in places we don't want them). As a result, the gpu_info.ps1 script is only called once at startup and never again; but that is fine since it will always run before the menu is displayed.

I only have one computer, however, so I have not tested it with anything other than a computer with two GPUs. If you have one GPU, or more than two GPUs, you will need to test it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SillyTavern/SillyTavern-Launcher/pull/81 **Author:** [@JaceEthaniel](https://github.com/JaceEthaniel) **Created:** 9/30/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (6) - [`34ddcc1`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/34ddcc1cff52a72c5da509d30d49db3e1d064cd8) Update Launcher.bat - [`0b71f9d`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/0b71f9daeb406624755ed7a612ff3d395029a548) Replace gpu_info.bat with gpu_info.ps1 - [`b9259da`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/b9259da7b8e243ff4dd06b32b68383907e28e068) Update gpu_info.ps1 - [`3403267`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/3403267782e6f5cd0d2aee0895d6851ade770fd9) Removed redundant comment... - [`d047038`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/d047038046d580cf1092e92656ab5991891358eb) Removed unneeded cd call. - [`3687965`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/3687965c171c0b98d8146eac7317df189bac166a) Just a slight alteration to a comment... ### 📊 Changes **3 files changed** (+52 additions, -84 deletions) <details> <summary>View changed files</summary> 📝 `Launcher.bat` (+18 -37) ➖ `bin/functions/Toolbox/Troubleshooting/gpu_info.bat` (+0 -47) ➕ `bin/functions/Toolbox/Troubleshooting/gpu_info.ps1` (+34 -0) </details> ### 📄 Description As promised... I learned more about batch and have now updated the code for GPU detection in the launcher.bat file, and replaced gpu_info.bat with gpu_info.ps1 because batch is not good at handling/ sorting gpu information. As a result, it is more streamlined and will now pick the GPU with the most VRAM from among all installed gpus, instead of only the last two. I know. I know. I learned more about batch and so I replaced the batch code with powershell code... but I also made other edits: I have altered how the GPU information is stored, displayed on the home screen, and how frequently the gpu_info script is called. First, GPU info for the preferred GPU is now stored to the log file without ANSI codes by using the variables set previously (instead of making another call to gpu_info.ps1). Second, the gpuInfo variable is also set using the two variables previously set and is formatted at the same time to include ANSI codes (that way we don't have ANSI codes in places we don't want them). As a result, the gpu_info.ps1 script is only called once at startup and never again; but that is fine since it will always run before the menu is displayed. I only have one computer, however, so I have not tested it with anything other than a computer with two GPUs. If you have one GPU, or more than two GPUs, you will need to test it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 18:07:08 +00:00
Sign in to join this conversation.
No description provided.