diff --git a/finetune/tag_images_by_wd14_tagger.py b/finetune/tag_images_by_wd14_tagger.py index dde586c7..e2ac5c1d 100644 --- a/finetune/tag_images_by_wd14_tagger.py +++ b/finetune/tag_images_by_wd14_tagger.py @@ -176,7 +176,7 @@ def main(args): with open(caption_file, "rt", encoding="utf-8") as f: # Read file and remove new lines - existing_content = f.read().strip("\n") # Remove trailing comma, whitespace, and newlines + existing_content = f.read().strip("\n") # Remove newlines # Split the content into tags and store them in a list existing_tags = [tag.strip() for tag in existing_content.split(",") if tag.strip()]