Spaces:
Runtime error
Runtime error
Update open_oasis_master/generate.py
Browse files
open_oasis_master/generate.py
CHANGED
@@ -10,6 +10,7 @@ from utils import one_hot_actions, sigmoid_beta_schedule
|
|
10 |
from tqdm import tqdm
|
11 |
from einops import rearrange
|
12 |
from torch import autocast
|
|
|
13 |
#assert torch.cuda.is_available()
|
14 |
#device = "cuda:0"
|
15 |
device = "cpu"
|
@@ -36,9 +37,10 @@ noise_abs_max = 20
|
|
36 |
ctx_max_noise_idx = ddim_noise_steps // 10 * 3
|
37 |
|
38 |
# get input video
|
|
|
39 |
video_id = "snippy-chartreuse-mastiff-f79998db196d-20220401-224517.chunk_001"
|
40 |
-
mp4_path = f"sample_data/{video_id}.mp4"
|
41 |
-
actions_path = f"sample_data/{video_id}.actions.pt"
|
42 |
video = read_video(mp4_path, pts_unit="sec")[0].float() / 255
|
43 |
actions = one_hot_actions(torch.load(actions_path,map_location=torch.device('cpu')))
|
44 |
offset = 100
|
|
|
10 |
from tqdm import tqdm
|
11 |
from einops import rearrange
|
12 |
from torch import autocast
|
13 |
+
import os
|
14 |
#assert torch.cuda.is_available()
|
15 |
#device = "cuda:0"
|
16 |
device = "cpu"
|
|
|
37 |
ctx_max_noise_idx = ddim_noise_steps // 10 * 3
|
38 |
|
39 |
# get input video
|
40 |
+
print(os.cwd())
|
41 |
video_id = "snippy-chartreuse-mastiff-f79998db196d-20220401-224517.chunk_001"
|
42 |
+
mp4_path = f"{os.cwd()}/sample_data/{video_id}.mp4"
|
43 |
+
actions_path = f"{os.cwd()}/sample_data/{video_id}.actions.pt"
|
44 |
video = read_video(mp4_path, pts_unit="sec")[0].float() / 255
|
45 |
actions = one_hot_actions(torch.load(actions_path,map_location=torch.device('cpu')))
|
46 |
offset = 100
|