ysharma HF staff commited on
Commit
3548cd4
1 Parent(s): 23007d6

update code to handle random seed as passed arguments

Browse files
Files changed (1) hide show
  1. src/edit_synthetic.py +3 -2
src/edit_synthetic.py CHANGED
@@ -22,6 +22,7 @@ if __name__=="__main__":
22
  parser.add_argument('--xa_guidance', default=0.15, type=float)
23
  parser.add_argument('--negative_guidance_scale', default=5.0, type=float)
24
  parser.add_argument('--use_float_16', action='store_true')
 
25
  args = parser.parse_args()
26
 
27
  os.makedirs(args.results_folder, exist_ok=True)
@@ -48,5 +49,5 @@ if __name__=="__main__":
48
  negative_prompt="" # use the empty string for the negative prompt
49
  )
50
 
51
- edit_pil[0].save(os.path.join(args.results_folder, f"edit.png"))
52
- rec_pil[0].save(os.path.join(args.results_folder, f"reconstruction.png"))
 
22
  parser.add_argument('--xa_guidance', default=0.15, type=float)
23
  parser.add_argument('--negative_guidance_scale', default=5.0, type=float)
24
  parser.add_argument('--use_float_16', action='store_true')
25
+ parser.add_argument('--seed', type=str)
26
  args = parser.parse_args()
27
 
28
  os.makedirs(args.results_folder, exist_ok=True)
 
49
  negative_prompt="" # use the empty string for the negative prompt
50
  )
51
 
52
+ edit_pil[0].save(os.path.join(args.results_folder, f"edit{args.seed}.png"))
53
+ rec_pil[0].save(os.path.join(args.results_folder, f"reconstruction{args.seed}.png"))