feat: add exclude scan model types (#92)

This commit is contained in:
Hayden
2025-01-13 15:15:32 +08:00
committed by GitHub
parent 14bb6f194d
commit 40a1a7f43a
6 changed files with 18 additions and 3 deletions

View File

@@ -116,10 +116,13 @@ def download_web_distribution(version: str):
print_error(f"An unexpected error occurred: {e}")
def resolve_model_base_paths():
def resolve_model_base_paths(request):
folders = list(folder_paths.folder_names_and_paths.keys())
model_base_paths = {}
folder_black_list = ["configs", "custom_nodes"]
custom_folders = get_setting_value(request, "scan.exclude_scan_types", "")
custom_black_list = [f.strip() for f in custom_folders.split(",") if f.strip()]
folder_black_list.extend(custom_black_list)
for folder in folders:
if folder in folder_black_list:
continue