Spaces:
Runtime error
Runtime error
Update tuneavideo/util.py
Browse files- tuneavideo/util.py +2 -2
tuneavideo/util.py
CHANGED
|
@@ -14,7 +14,7 @@ def save_videos_grid(
|
|
| 14 |
path: str = 'output.gif',
|
| 15 |
rescale=False,
|
| 16 |
n_rows=4,
|
| 17 |
-
|
| 18 |
):
|
| 19 |
videos = rearrange(videos, "b c t h w -> t b c h w")
|
| 20 |
outputs = []
|
|
@@ -30,5 +30,5 @@ def save_videos_grid(
|
|
| 30 |
os.makedirs(save_path)
|
| 31 |
|
| 32 |
|
| 33 |
-
imageio.mimsave(os.path.join(save_path, path), outputs,
|
| 34 |
return os.path.join(save_path, path)
|
|
|
|
| 14 |
path: str = 'output.gif',
|
| 15 |
rescale=False,
|
| 16 |
n_rows=4,
|
| 17 |
+
duration=3
|
| 18 |
):
|
| 19 |
videos = rearrange(videos, "b c t h w -> t b c h w")
|
| 20 |
outputs = []
|
|
|
|
| 30 |
os.makedirs(save_path)
|
| 31 |
|
| 32 |
|
| 33 |
+
imageio.mimsave(os.path.join(save_path, path), outputs, duration=duration)
|
| 34 |
return os.path.join(save_path, path)
|