mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Run ruff
This commit is contained in:
parent
90f32d17ba
commit
653a8f67a4
@ -649,7 +649,11 @@ class VaeFolderProbe(FolderProbeBase):
|
|||||||
class TextualInversionFolderProbe(TextualInversionCheckpointProbe):
|
class TextualInversionFolderProbe(TextualInversionCheckpointProbe):
|
||||||
def __init__(self, model_path: Path):
|
def __init__(self, model_path: Path):
|
||||||
files = os.scandir(model_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:
|
if len(files) != 1:
|
||||||
raise InvalidModelConfigException(
|
raise InvalidModelConfigException(
|
||||||
f"Unable to determine base type for {model_path}: expected exactly one valid model file, found {[f.name for f in files]}."
|
f"Unable to determine base type for {model_path}: expected exactly one valid model file, found {[f.name for f in files]}."
|
||||||
|
Loading…
Reference in New Issue
Block a user