Linoy Tsaban commited on
Commit
2967701
1 Parent(s): 52de678

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -121,13 +121,8 @@ with gr.Blocks(css='style.css') as demo:
121
  if not wt:
122
  # invert and retrieve noise maps and latent
123
  wt, zs, wts = invert(x0 =x0 , prompt_src=src_prompt, num_diffusion_steps=steps, cfg_scale_src=cfg_scale_src)
124
- # vae decode image
125
- with autocast("cuda"), inference_mode():
126
- x0_dec = sd_pipe.vae.decode(1 / 0.18215 * x0.expand(1, -1, -1, -1)).sample
127
- if x0_dec.dim()<4:
128
- x0_dec = x0_dec[None,:,:,:]
129
- img = image_grid(x0_dec)
130
- return img
131
 
132
  output = sample(wt, zs, wts, prompt_tar=tar_prompt, cfg_scale_tar=cfg_scale_tar, skip=skip)
133
 
 
121
  if not wt:
122
  # invert and retrieve noise maps and latent
123
  wt, zs, wts = invert(x0 =x0 , prompt_src=src_prompt, num_diffusion_steps=steps, cfg_scale_src=cfg_scale_src)
124
+ output = sample(wt, zs, wts, prompt_tar=src_prompt, cfg_scale_tar=cfg_scale_tar, skip=skip)
125
+
 
 
 
 
 
126
 
127
  output = sample(wt, zs, wts, prompt_tar=tar_prompt, cfg_scale_tar=cfg_scale_tar, skip=skip)
128