Linoy Tsaban commited on
Commit
aa9a059
1 Parent(s): 620dc0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -111,7 +111,7 @@ def load_and_invert(
111
  seed = randomize_seed_fn()
112
  seed_everything(seed)
113
  # invert and retrieve noise maps and latent
114
- zs, wts = pipe.invert(
115
  image_path=input_image,
116
  source_prompt=src_prompt,
117
  source_guidance_scale=src_cfg_scale,
@@ -119,6 +119,8 @@ def load_and_invert(
119
  skip=skip,
120
  eta=1.0,
121
  )
 
 
122
  do_inversion = False
123
 
124
  return wts, zs, do_inversion, inversion_progress.update(visible=False)
 
111
  seed = randomize_seed_fn()
112
  seed_everything(seed)
113
  # invert and retrieve noise maps and latent
114
+ zs_tensor, wts_tensor = pipe.invert(
115
  image_path=input_image,
116
  source_prompt=src_prompt,
117
  source_guidance_scale=src_cfg_scale,
 
119
  skip=skip,
120
  eta=1.0,
121
  )
122
+ wts = gr.State(value=wts_tensor)
123
+ zs = gr.State(value=zs_tensor)
124
  do_inversion = False
125
 
126
  return wts, zs, do_inversion, inversion_progress.update(visible=False)