hongfz16 commited on
Commit
5a73f09
1 Parent(s): fe3c641

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -249,7 +249,7 @@ def infer(prompt, samples, steps, scale, seed, global_info):
249
 
250
  big_video_list = []
251
 
252
- global_info['decode_res'] = decode_res
253
 
254
  for b in range(batch_size):
255
  def render_img(v):
@@ -303,6 +303,7 @@ def infer(prompt, samples, steps, scale, seed, global_info):
303
 
304
  path = f"tmp/{prompt.replace(' ', '_')}_{str(datetime.datetime.now()).replace(' ', '_')}.mp4"
305
  imageio.mimwrite(path, np.stack(cat_video_list, 0))
 
306
 
307
  return global_info, path
308
 
 
249
 
250
  big_video_list = []
251
 
252
+ global_info['decode_res'] = decode_res.detach()
253
 
254
  for b in range(batch_size):
255
  def render_img(v):
 
303
 
304
  path = f"tmp/{prompt.replace(' ', '_')}_{str(datetime.datetime.now()).replace(' ', '_')}.mp4"
305
  imageio.mimwrite(path, np.stack(cat_video_list, 0))
306
+ torch.cuda.empty_cache()
307
 
308
  return global_info, path
309