Linoy Tsaban commited on
Commit
8fa000b
1 Parent(s): 116e1ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -138,12 +138,12 @@ def invert_and_reconstruct(
138
 
139
  x0 = load_512(input_image, device=device)
140
 
141
- if do_inversion:
142
  # invert and retrieve noise maps and latent
143
- zs_tensor, wts_tensor = invert(x0 =x0 , prompt_src=src_prompt, num_diffusion_steps=steps, cfg_scale_src=src_cfg_scale)
144
- wts = gr.State(value=wts_tensor)
145
- zs = gr.State(value=zs_tensor)
146
- do_inversion = False
147
 
148
  output = sample(zs.value, wts.value, prompt_tar=tar_prompt, skip=skip, cfg_scale_tar=tar_cfg_scale)
149
 
 
138
 
139
  x0 = load_512(input_image, device=device)
140
 
141
+ # if do_inversion:
142
  # invert and retrieve noise maps and latent
143
+ zs_tensor, wts_tensor = invert(x0 =x0 , prompt_src=src_prompt, num_diffusion_steps=steps, cfg_scale_src=src_cfg_scale)
144
+ wts = gr.State(value=wts_tensor)
145
+ zs = gr.State(value=zs_tensor)
146
+ # do_inversion = False
147
 
148
  output = sample(zs.value, wts.value, prompt_tar=tar_prompt, skip=skip, cfg_scale_tar=tar_cfg_scale)
149