From 44caa158f12f4302e6f0709099129893eb1a833f Mon Sep 17 00:00:00 2001 From: IlyasMoutawwakil Date: Wed, 20 Nov 2024 12:57:39 +0100 Subject: [PATCH] remove file --- test.py | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index 6c96b058..00000000 --- a/test.py +++ /dev/null @@ -1,53 +0,0 @@ -from transformers import AutoProcessor, Idefics2Processor - -processor = Idefics2Processor.from_pretrained("HuggingFaceM4/idefics-9b") -print(processor.to_dict()) - -# dogs_image_url_1 = "https://huggingface.co/datasets/hf-internal-testing/fixtures_nlvr2/raw/main/image1.jpeg" -# dogs_image_url_2 = "https://huggingface.co/datasets/hf-internal-testing/fixtures_nlvr2/raw/main/image2.jpeg" - -# prompts = [ -# [ -# "User:", -# dogs_image_url_1, -# "Describe this image.\nAssistant: An image of two dogs.\n", -# "User:", -# dogs_image_url_2, -# "Describe this image.\nAssistant:", -# ] -# ] - -# inputs = processor(prompts, return_tensors="pt") - -# print("inputs_ids", inputs["input_ids"].shape) -# print("pixel_values", inputs["pixel_values"].shape) - -# batch_size = 1 -# sequence_length = 128 - -# num_images = 1 -# num_channels = 3 -# height = 224 -# width = 224 - -# patch_size = 14 -# temporal_patch_size = 2 - -# input_ids = torch.rand( -# size=( -# batch_size, -# sequence_length, -# ) -# ) - -# pixel_values = torch.rand( -# size=( -# num_images * int(height / patch_size) * int(width / patch_size), -# num_channels * patch_size * patch_size * temporal_patch_size, -# ) -# ) -# image_grid_thw = torch.tensor([[num_images, int(height / patch_size), int(width / patch_size)]]) - - -# print("image_grid_thw", image_grid_thw) -# print("pixel_values", pixel_values.shape)