From 653a8f67a4082c8facf268549113cdaf906a1730 Mon Sep 17 00:00:00 2001 From: brandonrising Date: Mon, 25 Mar 2024 20:59:34 -0400 Subject: [PATCH] Run ruff --- invokeai/backend/model_manager/probe.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/invokeai/backend/model_manager/probe.py b/invokeai/backend/model_manager/probe.py index 441e316ce3..7b410df6e3 100644 --- a/invokeai/backend/model_manager/probe.py +++ b/invokeai/backend/model_manager/probe.py @@ -649,7 +649,11 @@ class VaeFolderProbe(FolderProbeBase): class TextualInversionFolderProbe(TextualInversionCheckpointProbe): def __init__(self, model_path: Path): files = os.scandir(model_path) - files = [Path(f.path) for f in files if f.is_file() and f.name.endswith((".ckpt", ".pt", ".pth", ".bin", ".safetensors"))] + files = [ + Path(f.path) + for f in files + if f.is_file() and f.name.endswith((".ckpt", ".pt", ".pth", ".bin", ".safetensors")) + ] if len(files) != 1: raise InvalidModelConfigException( f"Unable to determine base type for {model_path}: expected exactly one valid model file, found {[f.name for f in files]}."