peterproofpath commited on
Commit
be10754
·
verified ·
1 Parent(s): bd33527

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +5 -3
handler.py CHANGED
@@ -38,13 +38,15 @@ class EndpointHandler:
38
  # Determine device
39
  self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
40
 
41
- # Eagle 2.5 uses Qwen2VLProcessor - import and load directly
42
- from transformers import Qwen2VLProcessor, Qwen2VLForConditionalGeneration
 
43
 
44
- self.processor = Qwen2VLProcessor.from_pretrained(
45
  model_id,
46
  trust_remote_code=True,
47
  token=hf_token,
 
48
  )
49
 
50
  # Set padding side for batch processing
 
38
  # Determine device
39
  self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
40
 
41
+ # Eagle 2.5 uses Qwen2VL architecture - use AutoProcessor with use_fast=False
42
+ # to avoid the broken Eagle2_5_VLVideoProcessorFast class
43
+ from transformers import AutoProcessor, Qwen2VLForConditionalGeneration
44
 
45
+ self.processor = AutoProcessor.from_pretrained(
46
  model_id,
47
  trust_remote_code=True,
48
  token=hf_token,
49
+ use_fast=False, # Avoid the broken video processor
50
  )
51
 
52
  # Set padding side for batch processing