Skip to content

Commit

Permalink
Bugfix sybil-predict
Browse files Browse the repository at this point in the history
Properly set --return-attentions when --write-attention-images is set.
  • Loading branch information
jsilter committed Jul 30, 2024
1 parent 0d85c12 commit 81a412c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sybil/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def _get_parser():
help="Generate images with attention overlap. Sets --return-attentions (if not already set).",
)


parser.add_argument(
"--file-type",
default="auto",
Expand Down Expand Up @@ -90,6 +89,8 @@ def predict(
):
logger = sybil.utils.logging_utils.get_logger()

return_attentions |= write_attention_images

input_files = os.listdir(image_dir)
input_files = [os.path.join(image_dir, x) for x in input_files if not x.startswith(".")]
input_files = [x for x in input_files if os.path.isfile(x)]
Expand Down

0 comments on commit 81a412c

Please sign in to comment.