Linoy Tsaban
commited on
Commit
·
4060cec
1
Parent(s):
39f64fe
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,7 +101,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
| 101 |
|
| 102 |
|
| 103 |
def edit(input_image,
|
| 104 |
-
|
| 105 |
src_prompt ="",
|
| 106 |
tar_prompt="",
|
| 107 |
steps=100,
|
|
@@ -118,7 +118,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
| 118 |
# offsets=(0,0,0,0)
|
| 119 |
x0 = load_512(input_image, device=device)
|
| 120 |
|
| 121 |
-
if not
|
| 122 |
# invert and retrieve noise maps and latent
|
| 123 |
zs, wts = invert(x0 =x0 , prompt_src=src_prompt, num_diffusion_steps=steps, cfg_scale_src=cfg_scale_src)
|
| 124 |
# xt = gr.State(value=wts[skip])
|
|
|
|
| 101 |
|
| 102 |
|
| 103 |
def edit(input_image,
|
| 104 |
+
wts, zs,
|
| 105 |
src_prompt ="",
|
| 106 |
tar_prompt="",
|
| 107 |
steps=100,
|
|
|
|
| 118 |
# offsets=(0,0,0,0)
|
| 119 |
x0 = load_512(input_image, device=device)
|
| 120 |
|
| 121 |
+
if not wts:
|
| 122 |
# invert and retrieve noise maps and latent
|
| 123 |
zs, wts = invert(x0 =x0 , prompt_src=src_prompt, num_diffusion_steps=steps, cfg_scale_src=cfg_scale_src)
|
| 124 |
# xt = gr.State(value=wts[skip])
|