Skip to content

Commit

Permalink
added some debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul Thapa committed Jun 6, 2024
1 parent 73a9af3 commit 2e814a9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test_dragonfly_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ def main():
model_outputs = model(**inputs)
generation_output = model.generate(**inputs, max_new_tokens=1024, eos_token_id=tokenizer.encode("<|eot_id|>"), do_sample=temperature > 0, temperature=temperature, use_cache=True)


# se = image_processor.size["shortest_edge"]
se = 224
se = image_processor.size["shortest_edge"]
possible_resolutions = [(6*se, 4*se), (4*se, 6*se), (3*se, 8*se), (8*se, 3*se), (2*se, 12*se), (12*se, 2*se)]
high_resolution = select_best_resolution(image.size, possible_resolutions)
high_image_padded = image.resize(high_resolution)
Expand Down

0 comments on commit 2e814a9

Please sign in to comment.