added guard for torch.load to prevent loading pickles with unknown content

This commit is contained in:
AUTOMATIC
2022-10-09 17:58:43 +03:00
parent bba2ac8324
commit 875ddfeecf
3 changed files with 91 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import argparse
import os
import sys
import modules.safe
script_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
models_path = os.path.join(script_path, "models")