Large Update
TTS Generator - Various interface bugs & filtering options cleaned up. TTS Generator - TTSDiff now scans generated text and TTS for errors. TTS Generator - TTSSRT now creates subtitle files for video production e.g. a Youtube video. Finetune - Now uses a customised tokenizer to deal with Japanese. Finetune - Pre flight check and warning messages. Finetune - Extra documentation and warnings. Entire file structure has been re-organised to simplify management and future changes. Documentation (built in and Github) has been rewritten/tidied up. Requirements files have been cleaned up and simplified. ATsetup has been re-written as necessary with additional options. DeepSpeed moved up to version 14. Standalone Application moved to PyTorch 2.2.1. Nvidia CUDA Toolkit installation is NO LONGER needed (other than to compile DeepSpeed on Linux) Tested on Linux and Windows.
This commit is contained in:
1 parent
b205657be3
commit
a075495a0a
65 files changed
+10339
-341
No files matched your search
+27
-14
@@ -8,6 +8,7 @@ try:
|
||||
import re
|
||||
import sys
|
||||
import glob
|
||||
import site
|
||||
import textwrap
|
||||
import torch
|
||||
import packaging.version
|
||||
@@ -15,6 +16,7 @@ try:
|
||||
from packaging.specifiers import SpecifierSet
|
||||
from packaging.specifiers import SpecifierSet
|
||||
from packaging.version import parse as parse_version
|
||||
from pathlib import Path
|
||||
except ImportError as e:
|
||||
print(f"\033[91mError importing module: {e}\033[0m\n")
|
||||
print("\033[94mPlease ensure you started the Text-generation-webUI Python environment with either\033[0m")
|
||||
@@ -22,6 +24,8 @@ except ImportError as e:
|
||||
print("\033[94mfrom the text-generation-webui directory, and then try running the diagnostics again.\033[0m")
|
||||
exit(1)
|
||||
|
||||
this_dir = Path(__file__).parent
|
||||
|
||||
try:
|
||||
import psutil
|
||||
except ImportError:
|
||||
@@ -30,21 +34,24 @@ except ImportError:
|
||||
import psutil
|
||||
|
||||
def get_requirements_file():
|
||||
requirements_files = glob.glob("requirements*.txt")
|
||||
this_dir = Path(__file__).parent # Assuming 'this_dir' is defined as the script's directory
|
||||
requirements_dir = this_dir / 'system' / 'requirements'
|
||||
requirements_files = list(requirements_dir.glob('requirements*.txt')) # Using pathlib for globbing
|
||||
|
||||
if not requirements_files:
|
||||
print("\033[91mNo requirements files found.\033[0m")
|
||||
return None
|
||||
|
||||
print("\033[94m\nSelect a requirements file to check against (or press Enter for default 'requirements.txt'):\033[0m\n")
|
||||
for i, file in enumerate(requirements_files, start=1):
|
||||
print(f"{i}. {file}")
|
||||
for i, file_path in enumerate(requirements_files, start=1):
|
||||
print(f" {i}. {file_path.name}") # Only print the filename
|
||||
|
||||
choice = input("\nEnter the number of your choice: ")
|
||||
try:
|
||||
choice = int(choice) - 1
|
||||
return requirements_files[choice]
|
||||
return str(requirements_files[choice]) # Return the full path as a string
|
||||
except (ValueError, IndexError):
|
||||
return "requirements.txt"
|
||||
return str(requirements_dir / "requirements.txt") # Return the default path as a string
|
||||
|
||||
# Set up logging with filemode='w'
|
||||
logging.basicConfig(filename='diagnostics.log',
|
||||
@@ -106,17 +113,23 @@ def test_cuda():
|
||||
return "Fail - CUDA is not available."
|
||||
|
||||
def find_files_in_path_with_wildcard(pattern):
|
||||
# Split the system's PATH variable into a list of directories
|
||||
search_path = os.environ.get('PATH', '').split(os.pathsep)
|
||||
|
||||
# Get the site-packages directory of the current Python environment
|
||||
site_packages_path = site.getsitepackages()
|
||||
found_paths = []
|
||||
# Iterate over each directory in the search path
|
||||
for directory in search_path:
|
||||
# Adjust the sub-directory based on the operating system
|
||||
sub_directory = "nvidia/cublas"
|
||||
if platform.system() == "Linux":
|
||||
sub_directory = os.path.join(sub_directory, "lib")
|
||||
else:
|
||||
sub_directory = os.path.join(sub_directory, "bin")
|
||||
# Iterate over each site-packages directory (there can be more than one)
|
||||
for directory in site_packages_path:
|
||||
# Construct the search directory path
|
||||
search_directory = os.path.join(directory, sub_directory)
|
||||
# Use glob to find all files matching the pattern in this directory
|
||||
for file_path in glob.glob(os.path.join(directory, pattern)):
|
||||
for file_path in glob.glob(os.path.join(search_directory, pattern)):
|
||||
if os.path.isfile(file_path): # Ensure it's a file
|
||||
found_paths.append(file_path)
|
||||
|
||||
return found_paths
|
||||
|
||||
# Function to log and print system information
|
||||
@@ -173,7 +186,7 @@ def log_system_info():
|
||||
path_env = os.environ.get('PATH', 'N/A')
|
||||
|
||||
# Check for cublas
|
||||
file_name = 'cublas64_11.*'
|
||||
file_name = 'cublas64_11.*' if platform.system() == "Windows" else 'libcublas.so.11*'
|
||||
found_paths = find_files_in_path_with_wildcard(file_name)
|
||||
|
||||
# Compare with requirements file
|
||||
@@ -309,4 +322,4 @@ def log_system_info():
|
||||
print(f"\033[94m\nPlease upload the log file with any support ticket.\033[0m")
|
||||
|
||||
if __name__ == "__main__":
|
||||
log_system_info()
|
||||
log_system_info()
|
||||
Reference in new issue
Block a user