From de16e85d10cc60cd08abc2f08b83644eeb8268dd Mon Sep 17 00:00:00 2001 From: Andray Date: Sun, 7 Jul 2024 10:21:34 +0400 Subject: [PATCH] fix import filetype --- modules/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/util.py b/modules/util.py index 60406783b..6fe382ac6 100644 --- a/modules/util.py +++ b/modules/util.py @@ -1,6 +1,5 @@ import os import re -import filetype from modules import shared from modules.paths_internal import script_path, cwd @@ -54,6 +53,7 @@ def walk_files(path, allowed_extensions=None, allowed_mime=None): file_allowed = True if allowed_mime is not None: + import filetype if filetype.guess(filepath).mime.startswith(allowed_mime): file_allowed = True else: