add webp for embed load

This commit is contained in:
DepFA 2022-10-14 18:14:02 +01:00 committed by AUTOMATIC1111
parent 939f16529a
commit 9a1dcd78ed

View file

@ -96,6 +96,10 @@ class EmbeddingDatabase:
else: else:
data = extract_image_data_embed(embed_image) data = extract_image_data_embed(embed_image)
name = data.get('name', name) name = data.get('name', name)
elif filename.upper().endswith('.WEBP'):
embed_image = Image.open(path)
data = extract_image_data_embed(embed_image)
name = data.get('name', name)
else: else:
data = torch.load(path, map_location="cpu") data = torch.load(path, map_location="cpu")