junshan233 commited on
Commit
b2f557a
·
verified ·
1 Parent(s): 889f986

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -40,8 +40,8 @@ from transformers import AutoModel, AutoTokenizer
40
  import requests
41
  from io import BytesIO
42
 
43
- IMAGENET_MEAN = (0.485, 0.456, 0.406)
44
- IMAGENET_STD = (0.229, 0.224, 0.225)
45
 
46
  def build_transform(input_size):
47
  MEAN, STD = IMAGENET_MEAN, IMAGENET_STD
@@ -128,7 +128,8 @@ response = requests.get(image_url)
128
  image_data = BytesIO(response.content)
129
  pixel_values = load_image(image_data, max_num=10).to(torch.bfloat16).cuda()
130
  generation_config = dict(max_new_tokens=1024, do_sample=True)
131
- # optimal alpha ranges from 64 to 576
 
132
  num_image_token = 256
133
 
134
  # pure-text conversation
 
40
  import requests
41
  from io import BytesIO
42
 
43
+ IMAGENET_MEAN = (0.5, 0.5, 0.5)
44
+ IMAGENET_STD = (0.5, 0.5, 0.5)
45
 
46
  def build_transform(input_size):
47
  MEAN, STD = IMAGENET_MEAN, IMAGENET_STD
 
128
  image_data = BytesIO(response.content)
129
  pixel_values = load_image(image_data, max_num=10).to(torch.bfloat16).cuda()
130
  generation_config = dict(max_new_tokens=1024, do_sample=True)
131
+
132
+ # The recommended range for `num_image_token` is 64 to 576, and the value can be adjusted based on task requirements.
133
  num_image_token = 256
134
 
135
  # pure-text conversation