From 9a1dcd78edbf9caf68b9e6286d7b5ca81500e243 Mon Sep 17 00:00:00 2001 From: DepFA <35278260+dfaker@users.noreply.github.com> Date: Fri, 14 Oct 2022 18:14:02 +0100 Subject: [PATCH] add webp for embed load --- modules/textual_inversion/textual_inversion.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index 1d697c90..c07bffc3 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -96,6 +96,10 @@ class EmbeddingDatabase: else: data = extract_image_data_embed(embed_image) 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: data = torch.load(path, map_location="cpu")