diff --git a/backups.py b/backups.py index e38c21f..1bcbc81 100644 --- a/backups.py +++ b/backups.py @@ -3,15 +3,15 @@ import hashlib import time -LOGS_FOLDER = '/content/Retrieval-based-Voice-Conversion-WebUI/logs' -WEIGHTS_FOLDER = '/content/Retrieval-based-Voice-Conversion-WebUI/weights' +LOGS_FOLDER = '/content/Mangio-RVC-Tweaks/logs' +WEIGHTS_FOLDER = '/content/Mangio-RVC-Tweaks/weights' GOOGLE_DRIVE_PATH = '/content/drive/MyDrive/RVC_Backup' def import_google_drive_backup(): print("Importing Google Drive backup...") GOOGLE_DRIVE_PATH = '/content/drive/MyDrive/RVC_Backup' # change this to your Google Drive path - LOGS_FOLDER = '/content/Retrieval-based-Voice-Conversion-WebUI/logs' - WEIGHTS_FOLDER = '/content/Retrieval-based-Voice-Conversion-WebUI/weights' + LOGS_FOLDER = '/content/Mangio-RVC-Tweaks/logs' + WEIGHTS_FOLDER = '/content/Mangio-RVC-Tweaks/weights' weights_exist = False for root, dirs, files in os.walk(GOOGLE_DRIVE_PATH): for filename in files: @@ -119,4 +119,4 @@ def backup_files(): with open(last_backup_timestamps_path, 'w') as f: for filepath, timestamp in last_backup_timestamps.items(): f.write(f'{filepath}:{timestamp}\n') - time.sleep(sleep_time) # wait for 15 seconds before checking again, or 1s if not fully up to date to speed up backups \ No newline at end of file + time.sleep(sleep_time) # wait for 15 seconds before checking again, or 1s if not fully up to date to speed up backups diff --git a/backups_test.py b/backups_test.py index 1b75649..7e6ee0f 100644 --- a/backups_test.py +++ b/backups_test.py @@ -4,15 +4,15 @@ import hashlib import time -LOGS_FOLDER = '/content/Retrieval-based-Voice-Conversion-WebUI/logs' -WEIGHTS_FOLDER = '/content/Retrieval-based-Voice-Conversion-WebUI/weights' +LOGS_FOLDER = '/content/Mangio-RVC-Tweaks/logs' +WEIGHTS_FOLDER = '/content/Mangio-RVC-Tweaks/weights' GOOGLE_DRIVE_PATH = '/content/drive/MyDrive/RVC_Backup' def import_google_drive_backup(): print("Importing Google Drive backup...") GOOGLE_DRIVE_PATH = '/content/drive/MyDrive/RVC_Backup' # change this to your Google Drive path - LOGS_FOLDER = '/content/Retrieval-based-Voice-Conversion-WebUI/logs' - WEIGHTS_FOLDER = '/content/Retrieval-based-Voice-Conversion-WebUI/weights' + LOGS_FOLDER = '/content/Mangio-RVC-Tweaks/logs' + WEIGHTS_FOLDER = '/content/Mangio-RVC-Tweaks/weights' weights_exist = False files_to_copy = [] weights_to_copy = [] diff --git a/clonerepo_experimental.py b/clonerepo_experimental.py index 5b28486..5bb3387 100644 --- a/clonerepo_experimental.py +++ b/clonerepo_experimental.py @@ -99,7 +99,7 @@ def edit_file(file_path): print("No changes were needed.") # Define the repo path - repo_path = '/content/Retrieval-based-Voice-Conversion-WebUI' + repo_path = '/content/Mangio-RVC-Tweaks' def copy_all_files_in_directory(src_dir, dest_dir): # Iterate over all files in source directory @@ -115,11 +115,11 @@ def copy_all_files_in_directory(src_dir, dest_dir): def clone_and_copy_repo(repo_path): # New repository link - new_repo_link = "https://github.com/alexlnkp/Mangio-RVC-Tweaks/" + new_repo_link = "https://github.com/sonphantrung/Mangio-RVC-Tweaks/" # Temporary path to clone the repository - temp_repo_path = "/content/temp_Mangio-RVC-Fork" + temp_repo_path = "/content/temp_Mangio-RVC-Tweaks" # New folder name - new_folder_name = "Mangio-RVC-Fork" + new_folder_name = "Mangio-RVC-Tweaks" # Clone the latest code from the new repository to a temporary location run_cmd(f"git clone {new_repo_link} {temp_repo_path}") @@ -145,20 +145,20 @@ def clone_and_copy_repo(repo_path): clone_and_copy_repo(repo_path) # Download the credentials file for RVC archive sheet - os.makedirs('/content/Retrieval-based-Voice-Conversion-WebUI/stats/', exist_ok=True) - run_cmd("wget -q https://cdn.discordapp.com/attachments/945486970883285045/1114717554481569802/peppy-generator-388800-07722f17a188.json -O /content/Retrieval-based-Voice-Conversion-WebUI/stats/peppy-generator-388800-07722f17a188.json") + os.makedirs('/content/Mangio-RVC-Tweaks/stats/', exist_ok=True) + run_cmd("wget -q https://cdn.discordapp.com/attachments/945486970883285045/1114717554481569802/peppy-generator-388800-07722f17a188.json -O /content/Mangio-RVC-Tweaks/stats/peppy-generator-388800-07722f17a188.json") # Forcefully delete any existing torchcrepe dependencies downloaded from an earlier run just in case - shutil.rmtree('/content/Retrieval-based-Voice-Conversion-WebUI/torchcrepe', ignore_errors=True) + shutil.rmtree('/content/Mangio-RVC-Tweaks/torchcrepe', ignore_errors=True) shutil.rmtree('/content/torchcrepe', ignore_errors=True) # Download the torchcrepe folder from the maxrmorrison/torchcrepe repository run_cmd("git clone https://github.com/maxrmorrison/torchcrepe.git") - shutil.move('/content/torchcrepe/torchcrepe', '/content/Retrieval-based-Voice-Conversion-WebUI/') + shutil.move('/content/torchcrepe/torchcrepe', '/content/Mangio-RVC-Tweaks/') shutil.rmtree('/content/torchcrepe', ignore_errors=True) # Delete the torchcrepe repository folder - # Change the current directory to /content/Retrieval-based-Voice-Conversion-WebUI - os.chdir('/content/Retrieval-based-Voice-Conversion-WebUI') + # Change the current directory to /content/Mangio-RVC-Tweaks + os.chdir('/content/Mangio-RVC-Tweaks') os.makedirs('pretrained', exist_ok=True) os.makedirs('uvr5_weights', exist_ok=True) @@ -194,7 +194,7 @@ def download_pretrained_models(): } base_url = "https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/" - base_path = "/content/Retrieval-based-Voice-Conversion-WebUI/" + base_path = "/content/Mangio-RVC-Tweaks/" # Calculate total number of files to download total_files = sum(len(files) for files in pretrained_models.values()) + 1 # +1 for hubert_base.pt @@ -219,4 +219,4 @@ def clone_repository(run_download): with ThreadPoolExecutor(max_workers=2) as executor: executor.submit(run_script) if run_download: - executor.submit(download_pretrained_models) \ No newline at end of file + executor.submit(download_pretrained_models)