ShaoTengLiu commited on
Commit
56ef158
1 Parent(s): edc0f20

change mode

Browse files
Files changed (1) hide show
  1. run_videop2p.py +3 -3
run_videop2p.py CHANGED
@@ -659,7 +659,7 @@ def main(
659
 
660
  ldm_stable.enable_xformers_memory_efficient_attention()
661
 
662
- (image_gt, image_enc), x_t, uncond_embeddings = null_inversion.invert_(image_path, prompt, offsets=(0,0,0,0), verbose=True)
663
 
664
  ##### load uncond #####
665
  # uncond_embeddings_load = np.load(uncond_embeddings_path)
@@ -696,8 +696,8 @@ def main(
696
  inversion.append( Image.fromarray((sequence1[i] * 255).numpy().astype(np.uint8)) )
697
  videop2p.append( Image.fromarray((sequence2[i] * 255).numpy().astype(np.uint8)) )
698
 
699
- inversion[0].save(gif_name_1.replace('name', 'inversion_simple_debug'), save_all=True, append_images=inversion[1:], optimize=False, loop=0, duration=250)
700
- videop2p[0].save(gif_name_2.replace('name', 'p2p_simple_debug'), save_all=True, append_images=videop2p[1:], optimize=False, loop=0, duration=250)
701
 
702
  if __name__ == "__main__":
703
  parser = argparse.ArgumentParser()
 
659
 
660
  ldm_stable.enable_xformers_memory_efficient_attention()
661
 
662
+ (image_gt, image_enc), x_t, uncond_embeddings = null_inversion.invert(image_path, prompt, offsets=(0,0,0,0), verbose=True)
663
 
664
  ##### load uncond #####
665
  # uncond_embeddings_load = np.load(uncond_embeddings_path)
 
696
  inversion.append( Image.fromarray((sequence1[i] * 255).numpy().astype(np.uint8)) )
697
  videop2p.append( Image.fromarray((sequence2[i] * 255).numpy().astype(np.uint8)) )
698
 
699
+ inversion[0].save(gif_name_1.replace('name', 'inversion'), save_all=True, append_images=inversion[1:], optimize=False, loop=0, duration=250)
700
+ videop2p[0].save(gif_name_2.replace('name', 'p2p'), save_all=True, append_images=videop2p[1:], optimize=False, loop=0, duration=250)
701
 
702
  if __name__ == "__main__":
703
  parser = argparse.ArgumentParser()