Added an autocaptioner for Ideogram 4 captions

This commit is contained in:
Jaret Burkett
2026-06-04 13:04:23 -06:00
parent 6a8d9333b6
commit edcc7415d1
10 changed files with 906 additions and 36 deletions

View File

@@ -167,7 +167,11 @@ class BaseCaptioner(BaseExtensionProcess):
caption_file_path = (
f"{filename_no_ext}.{self.caption_config.caption_extension}"
)
if not os.path.exists(caption_file_path):
has_caption = False
if os.path.exists(caption_file_path):
with open(caption_file_path, "r", encoding="utf-8") as f:
has_caption = f.read().strip() != ""
if not has_caption:
filtered_file_paths.append(file_path)
print(
f"Found {len(self.file_paths)} files. {len(filtered_file_paths)} need captioning."