Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
a0c87f1f
Commit
a0c87f1f
authored
Jan 08, 2023
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skip images in embeddings dir if they have a second .preview extension
parent
15123339
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
textual_inversion.py
modules/textual_inversion/textual_inversion.py
+4
-0
No files found.
modules/textual_inversion/textual_inversion.py
View file @
a0c87f1f
...
...
@@ -109,6 +109,10 @@ class EmbeddingDatabase:
ext
=
ext
.
upper
()
if
ext
in
[
'.PNG'
,
'.WEBP'
,
'.JXL'
,
'.AVIF'
]:
_
,
second_ext
=
os
.
path
.
splitext
(
name
)
if
second_ext
.
upper
()
==
'.PREVIEW'
:
return
embed_image
=
Image
.
open
(
path
)
if
hasattr
(
embed_image
,
'text'
)
and
'sd-ti-embedding'
in
embed_image
.
text
:
data
=
embedding_from_b64
(
embed_image
.
text
[
'sd-ti-embedding'
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment