Ignore two files names instead of the entire folder

rather than bypassing any path with diffusers in it, im specifically bypassing model.safetensors and diffusion_pytorch_model.safetensors both of which should be diffusers files in most cases.
This commit is contained in:
blessedcoolant 2023-02-12 00:13:22 +13:00
parent 7f695fed39
commit 11e422cf29

View File

@ -806,7 +806,7 @@ class ModelManager(object):
found_models = []
for file in files:
location = str(file.resolve()).replace("\\", "/")
if 'diffusers' not in location:
if 'model.safetensors' not in location and 'diffusion_pytorch_model.safetensors' not in location:
found_models.append(
{"name": file.stem, "location": location}
)