Linoy Tsaban commited on
Commit
3fc6280
1 Parent(s): 4588985

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -17,7 +17,10 @@ inv_pipe.scheduler = DDIMScheduler.from_pretrained(model_id, subfolder="schedule
17
  def randomize_seed_fn():
18
  seed = random.randint(0, np.iinfo(np.int32).max)
19
  return seed
20
-
 
 
 
21
  def preprocess_and_invert(video,
22
  frames,
23
  latents,
@@ -138,8 +141,7 @@ with gr.Blocks(css="style.css") as demo:
138
  input_vid.upload(
139
  fn = reset_do_inversion,
140
  outputs = [do_inversion],
141
- queue = False)
142
- ).then(fn = preprocess_and_invert,
143
  inputs = [input_vid,
144
  frames,
145
  latents,
 
17
  def randomize_seed_fn():
18
  seed = random.randint(0, np.iinfo(np.int32).max)
19
  return seed
20
+
21
+ def reset_do_inversion():
22
+ return True
23
+
24
  def preprocess_and_invert(video,
25
  frames,
26
  latents,
 
141
  input_vid.upload(
142
  fn = reset_do_inversion,
143
  outputs = [do_inversion],
144
+ queue = False).then(fn = preprocess_and_invert,
 
145
  inputs = [input_vid,
146
  frames,
147
  latents,