Skip to content

Commit

Permalink
bugfix and doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
victorchall committed Mar 3, 2024
1 parent aca1867 commit 91a9b3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion caption_kosmos2.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def main(args):
print(f"File: {full_file_path}, Generated caption: {processed_text}")

name = os.path.splitext(full_file_path)[0]
if not os.path.exists(f"{name}.txt") or args.overwrite and not args.save_entities_only:
if (not os.path.exists(f"{name}.txt") or args.overwrite) and not args.save_entities_only:
with open(f"{name}.txt", "w") as f:
f.write(processed_text)

Expand Down
2 changes: 1 addition & 1 deletion doc/CAPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Kosmos-2

Microsoft's [Kosmos-2](https://huggingface.co/microsoft/kosmos-2-patch14-224) is significantly lighter weight than Cog, using <5GB of VRAM and generating captions in under 1/21 second on a RTX 3090.
Microsoft's [Kosmos-2](https://huggingface.co/microsoft/kosmos-2-patch14-224) is significantly lighter weight than Cog, using <5GB of VRAM and generating captions in under a second on a RTX 3090.

It has the capability to output grounding bounding boxes.

Expand Down

0 comments on commit 91a9b3d

Please sign in to comment.