Mihaiii commited on
Commit
ac820b0
1 Parent(s): 5fd1a36

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -42,7 +42,7 @@ def model_inference(
42
 
43
  #We recommend enabling flash_attention_2 for better acceleration and memory saving, especially in multi-image and video scenarios.
44
  model = Qwen2VLForConditionalGeneration.from_pretrained(
45
- "Qwen/Qwen2-VL-2B-Instruct",
46
  #attn_implementation="flash_attention_2", #doesn't work on zerogpu WTF?!
47
  trust_remote_code=True,
48
  torch_dtype=torch.bfloat16).to("cuda:0")
@@ -50,8 +50,8 @@ def model_inference(
50
  # default processer
51
  min_pixels = 256*28*28
52
  max_pixels = 1280*28*28
53
- processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-2B-Instruct", min_pixels=min_pixels, max_pixels=max_pixels)
54
- # processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-7B-Instruct", min_pixels=min_pixels, max_pixels=max_pixels)
55
 
56
  messages = [
57
  {
 
42
 
43
  #We recommend enabling flash_attention_2 for better acceleration and memory saving, especially in multi-image and video scenarios.
44
  model = Qwen2VLForConditionalGeneration.from_pretrained(
45
+ "Qwen/Qwen2-VL-7B-Instruct",
46
  #attn_implementation="flash_attention_2", #doesn't work on zerogpu WTF?!
47
  trust_remote_code=True,
48
  torch_dtype=torch.bfloat16).to("cuda:0")
 
50
  # default processer
51
  min_pixels = 256*28*28
52
  max_pixels = 1280*28*28
53
+ #processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-2B-Instruct", min_pixels=min_pixels, max_pixels=max_pixels)
54
+ processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-7B-Instruct", min_pixels=min_pixels, max_pixels=max_pixels)
55
 
56
  messages = [
57
  {