PY007 commited on
Commit
711924e
1 Parent(s): 66967c8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -39,7 +39,7 @@ input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_t
39
  image = Image.open(image_path).convert("RGB")
40
  images_tensor = process_images([image], image_processor, model.config).to(model.device, dtype=torch.float16)
41
  with torch.inference_mode():
42
- output_ids = model.generate(input_ids, images=[images_tensor], image_sizes=[image.size], modalities=["image"], **gen_kwargs)
43
  outputs = tokenizer.batch_decode(output_ids, skip_special_tokens=True)[0].strip()
44
  print(outputs)
45
  print("-"*50)
 
39
  image = Image.open(image_path).convert("RGB")
40
  images_tensor = process_images([image], image_processor, model.config).to(model.device, dtype=torch.float16)
41
  with torch.inference_mode():
42
+ output_ids = model.generate(input_ids, images=images_tensor, image_sizes=[image.size], modalities=["image"], **gen_kwargs)
43
  outputs = tokenizer.batch_decode(output_ids, skip_special_tokens=True)[0].strip()
44
  print(outputs)
45
  print("-"*50)