Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
6f4f6bff
Commit
6f4f6bff
authored
Apr 21, 2024
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add more info to the error message for #15567
parent
367b8234
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
modules/textual_inversion/image_embedding.py
modules/textual_inversion/image_embedding.py
+2
-1
No files found.
modules/textual_inversion/image_embedding.py
View file @
6f4f6bff
import
base64
import
json
import
os.path
import
warnings
import
logging
...
...
@@ -117,7 +118,7 @@ def extract_image_data_embed(image):
outarr
=
crop_black
(
np
.
array
(
image
.
convert
(
'RGB'
)
.
getdata
())
.
reshape
(
image
.
size
[
1
],
image
.
size
[
0
],
d
)
.
astype
(
np
.
uint8
))
&
0x0F
black_cols
=
np
.
where
(
np
.
sum
(
outarr
,
axis
=
(
0
,
2
))
==
0
)
if
black_cols
[
0
]
.
shape
[
0
]
<
2
:
logger
.
debug
(
'No Image data blocks
found.'
)
logger
.
debug
(
f
'{os.path.basename(getattr(image, "filename", "unknown image file"))}: no embedded information
found.'
)
return
None
data_block_lower
=
outarr
[:,
:
black_cols
[
0
]
.
min
(),
:]
.
astype
(
np
.
uint8
)
...
...
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