Spaces:
Running
Running
Commit
·
82cc5d2
1
Parent(s):
7075221
options/Video_model/Model.py
CHANGED
@@ -51,6 +51,10 @@ def Video(
|
|
51 |
# Convert BFloat16 to Float32 if necessary
|
52 |
if image.dtype == torch.bfloat16:
|
53 |
image = image.to(dtype=torch.float32)
|
|
|
|
|
|
|
|
|
54 |
|
55 |
with torch.autocast(device):
|
56 |
frames = pipeline(
|
|
|
51 |
# Convert BFloat16 to Float32 if necessary
|
52 |
if image.dtype == torch.bfloat16:
|
53 |
image = image.to(dtype=torch.float32)
|
54 |
+
elif isinstance(image, Image.Image):
|
55 |
+
# Convert PIL Image to a supported tensor
|
56 |
+
image = torch.tensor(image).float()
|
57 |
+
|
58 |
|
59 |
with torch.autocast(device):
|
60 |
frames = pipeline(
|
options/Video_model/__pycache__/Model.cpython-310.pyc
CHANGED
Binary files a/options/Video_model/__pycache__/Model.cpython-310.pyc and b/options/Video_model/__pycache__/Model.cpython-310.pyc differ
|
|