OmPrakashSingh1704 commited on
Commit
7075221
·
1 Parent(s): bd84d37
options/Video_model/Model.py CHANGED
@@ -47,6 +47,11 @@ def Video(
47
  base_count = len(glob(os.path.join(output_folder, "*.mp4")))
48
  video_path = os.path.join(output_folder, f"{base_count:06d}.mp4")
49
 
 
 
 
 
 
50
  with torch.autocast(device):
51
  frames = pipeline(
52
  image, height = height, width = width,
 
47
  base_count = len(glob(os.path.join(output_folder, "*.mp4")))
48
  video_path = os.path.join(output_folder, f"{base_count:06d}.mp4")
49
 
50
+ if isinstance(image, torch.Tensor):
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(
57
  image, height = height, width = width,
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