xizaoqu
commited on
Commit
·
6e9cdb7
1
Parent(s):
65428f8
update
Browse files
app.py
CHANGED
@@ -165,7 +165,7 @@ def save_video(frames, path="output.mp4", fps=10):
|
|
165 |
def run(cfg: DictConfig):
|
166 |
|
167 |
algo = run_local(cfg)
|
168 |
-
|
169 |
|
170 |
actions = torch.zeros((1, 25))
|
171 |
poses = torch.zeros((1, 5))
|
@@ -174,13 +174,11 @@ def run(cfg: DictConfig):
|
|
174 |
|
175 |
@spaces.GPU()
|
176 |
def run_interactive(algo, first_frame, action, first_pose, curr_frame, device):
|
177 |
-
algo = algo.to(device)
|
178 |
new_frame = algo.interactive(first_frame,
|
179 |
action,
|
180 |
first_pose,
|
181 |
curr_frame,
|
182 |
device=device)
|
183 |
-
algo = algo.to("cpu")
|
184 |
return algo, new_frame
|
185 |
|
186 |
def set_denoising_steps(denoising_steps, sampling_timesteps_state):
|
|
|
165 |
def run(cfg: DictConfig):
|
166 |
|
167 |
algo = run_local(cfg)
|
168 |
+
algo.to(device)
|
169 |
|
170 |
actions = torch.zeros((1, 25))
|
171 |
poses = torch.zeros((1, 5))
|
|
|
174 |
|
175 |
@spaces.GPU()
|
176 |
def run_interactive(algo, first_frame, action, first_pose, curr_frame, device):
|
|
|
177 |
new_frame = algo.interactive(first_frame,
|
178 |
action,
|
179 |
first_pose,
|
180 |
curr_frame,
|
181 |
device=device)
|
|
|
182 |
return algo, new_frame
|
183 |
|
184 |
def set_denoising_steps(denoising_steps, sampling_timesteps_state):
|