File size: 2,747 Bytes
f8ba0eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2025-08-18 23:31:01 - INFO - Loading model: LiquidAI/LFM2-VL-1.6B
2025-08-18 23:31:02 - INFO - We will use 90% of the memory on device 0 for storing the model, and 10% for the buffer to avoid OOM. You can set `max_memory` in to a higher value to use more memory (at your own risk).
2025-08-18 23:31:09 - INFO - Model loaded in 7.34 seconds
2025-08-18 23:31:09 - INFO - GPU Memory Usage after model load: 3023.64 MB
2025-08-18 23:31:56 - INFO - [653718a5-3216-4691-b041-10603df59fa5] Received new video inference request. Prompt: 'Please describe the video.', Video: 'messi_part_001.mp4'
2025-08-18 23:31:56 - INFO - [653718a5-3216-4691-b041-10603df59fa5] Video saved to temporary file: temp_videos/653718a5-3216-4691-b041-10603df59fa5.mp4
2025-08-18 23:31:56 - INFO - [653718a5-3216-4691-b041-10603df59fa5] Extracting frames using method: uniform, rate/threshold: 30
2025-08-18 23:32:01 - INFO - [653718a5-3216-4691-b041-10603df59fa5] Extracted 30 frames successfully. Saving to temporary files...
2025-08-18 23:32:01 - INFO - [653718a5-3216-4691-b041-10603df59fa5] 30 frames saved to temp_videos/653718a5-3216-4691-b041-10603df59fa5
2025-08-18 23:32:01 - ERROR - [653718a5-3216-4691-b041-10603df59fa5] An error occurred during processing: Incorrect format used for image. Should be an url linking to an image, a base64 string, a local path, or a PIL image.
Traceback (most recent call last):
  File "/mnt/data/xiuying/Code/local_deploy/infer.py", line 107, in video_inference
    output = model.generate(frame_paths, prompt)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/data/xiuying/Code/local_deploy/models/lfm.py", line 52, in generate
    inputs = self.processor.apply_chat_template(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xiuying/miniconda3/envs/gptq/lib/python3.11/site-packages/transformers/utils/deprecation.py", line 172, in wrapped_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/xiuying/miniconda3/envs/gptq/lib/python3.11/site-packages/transformers/processing_utils.py", line 1552, in apply_chat_template
    images.append(load_image(fname))
                  ^^^^^^^^^^^^^^^^^
  File "/home/xiuying/miniconda3/envs/gptq/lib/python3.11/site-packages/transformers/image_utils.py", line 493, in load_image
    raise TypeError(
TypeError: Incorrect format used for image. Should be an url linking to an image, a base64 string, a local path, or a PIL image.
2025-08-18 23:32:01 - INFO - [653718a5-3216-4691-b041-10603df59fa5] Cleaned up temporary file: temp_videos/653718a5-3216-4691-b041-10603df59fa5.mp4
2025-08-18 23:32:01 - INFO - [653718a5-3216-4691-b041-10603df59fa5] Cleaned up temporary frame directory: temp_videos/653718a5-3216-4691-b041-10603df59fa5