warn and continue if huggingface uploading failed

This commit is contained in:
Kohya S
2023-05-31 20:48:33 +09:00
parent 6fbd526931
commit 3a06968332
2 changed files with 31 additions and 25 deletions

View File

@@ -1087,7 +1087,9 @@ class DreamBoothDataset(BaseDataset):
for img_path in img_paths:
cap_for_img = read_caption(img_path, subset.caption_extension)
if cap_for_img is None and subset.class_tokens is None:
print(f"neither caption file nor class tokens are found. use empty caption for {img_path} / キャプションファイルもclass tokenも見つかりませんでした。空のキャプションを使用します: {img_path}")
print(
f"neither caption file nor class tokens are found. use empty caption for {img_path} / キャプションファイルもclass tokenも見つかりませんでした。空のキャプションを使用します: {img_path}"
)
captions.append("")
missing_captions.append(img_path)
else: