Skip to content

Commit 6f4f6bf

Browse files
committed
add more info to the error message for AUTOMATIC1111#15567
1 parent 367b823 commit 6f4f6bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/textual_inversion/image_embedding.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import base64
22
import json
3+
import os.path
34
import warnings
45
import logging
56

@@ -117,7 +118,7 @@ def extract_image_data_embed(image):
117118
outarr = crop_black(np.array(image.convert('RGB').getdata()).reshape(image.size[1], image.size[0], d).astype(np.uint8)) & 0x0F
118119
black_cols = np.where(np.sum(outarr, axis=(0, 2)) == 0)
119120
if black_cols[0].shape[0] < 2:
120-
logger.debug('No Image data blocks found.')
121+
logger.debug(f'{os.path.basename(getattr(image, "filename", "unknown image file"))}: no embedded information found.')
121122
return None
122123

123124
data_block_lower = outarr[:, :black_cols[0].min(), :].astype(np.uint8)

0 commit comments

Comments
 (0)