Skip to content

Commit

Permalink
Update inference.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JoyBoy-Su authored Jul 15, 2024
1 parent 1ecf1ec commit e2549f6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def main(args: argparse.Namespace):
with open(input_path, "r") as f:
input_segs: List[Dict[str, str]] = json.load(f)
assert not input_segs is None
print(f"load input done.")
batch_prompt_ui = [[]]
for input_seg in input_segs:
if input_seg["type"] == "text":
Expand All @@ -103,7 +102,6 @@ def main(args: argparse.Namespace):
# split
boi, eoi = model.vocab.begin_image, model.vocab.end_image # 8197(boi), 8196(eoi)
segments = split_token_sequence(tokens, boi, eoi)
print(segments)
# decode
os.makedirs(args.save_dir, exist_ok=True)
for seg_id, (seg_type, seg_tokens) in enumerate(segments):
Expand Down

0 comments on commit e2549f6

Please sign in to comment.