Merge pull request #916 from JeLuF/skipst

Don't scan safetensors files
This commit is contained in:
cmdr2 2023-02-21 08:39:52 +05:30 committed by GitHub
commit f1a7aed1b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,6 +158,8 @@ def make_model_folders():
def is_malicious_model(file_path):
try:
if file_path.endswith(".safetensors"):
return False
scan_result = scan_model(file_path)
if scan_result.issues_count > 0 or scan_result.infected_files > 0:
log.warn(