Spaces:
Running
Running
fix png (#1)
Browse files- Update infer.py (a152c2269fbf0b114382394af6034f384d7c53c2)
Co-authored-by: Joya Chen <[email protected]>
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:
|