Files changed (1) hide show
  1. infer.py +2 -2
infer.py CHANGED
@@ -9,7 +9,7 @@ import torch
9
  import decord
10
  import numpy as np
11
  from PIL import Image, ImageSequence
12
- from torchvision.io import read_image, encode_jpeg
13
  from torchvision.transforms.functional import resize
14
  from torchvision.transforms import InterpolationMode
15
 
@@ -210,7 +210,7 @@ class SeedVLInfer:
210
  },
211
  })
212
  else:
213
- image = read_image(path)
214
  if online and path.endswith('.webp'):
215
  streaming_timestamp = i
216
  if streaming_timestamp is not None:
 
9
  import decord
10
  import numpy as np
11
  from PIL import Image, ImageSequence
12
+ from torchvision.io import read_image, encode_jpeg, ImageReadMode
13
  from torchvision.transforms.functional import resize
14
  from torchvision.transforms import InterpolationMode
15
 
 
210
  },
211
  })
212
  else:
213
+ image = read_image(path, ImageReadMode.RGB)
214
  if online and path.endswith('.webp'):
215
  streaming_timestamp = i
216
  if streaming_timestamp is not None: