Spaces:
Runtime error
Runtime error
Linoy Tsaban
commited on
Commit
•
e496c75
1
Parent(s):
5589998
Update app.py
Browse files
app.py
CHANGED
@@ -88,8 +88,8 @@ def invert_and_reconstruct(input_image,
|
|
88 |
# invert
|
89 |
wt, zs, wts = invert(x0 =x0 , prompt_src=src_prompt, num_diffusion_steps=steps, cfg_scale_src=src_cfg_scale)
|
90 |
|
91 |
-
latnets = wts[skip].expand(1, -1, -1, -1)
|
92 |
-
inversion_map['
|
93 |
inversion_map['zs'] = zs
|
94 |
inversion_map['wts'] = wts
|
95 |
|
@@ -104,7 +104,7 @@ def edit(tar_prompt="",
|
|
104 |
outputs = []
|
105 |
num_generations = 1
|
106 |
for i in range(num_generations):
|
107 |
-
out = sample(wt, zs, wts, prompt_tar=tar_prompt,
|
108 |
cfg_scale_tar=tar_cfg_scale, skip=skip)
|
109 |
outputs.append(out)
|
110 |
|
|
|
88 |
# invert
|
89 |
wt, zs, wts = invert(x0 =x0 , prompt_src=src_prompt, num_diffusion_steps=steps, cfg_scale_src=src_cfg_scale)
|
90 |
|
91 |
+
# latnets = wts[skip].expand(1, -1, -1, -1)
|
92 |
+
inversion_map['wt'] = wt
|
93 |
inversion_map['zs'] = zs
|
94 |
inversion_map['wts'] = wts
|
95 |
|
|
|
104 |
outputs = []
|
105 |
num_generations = 1
|
106 |
for i in range(num_generations):
|
107 |
+
out = sample(wt=inversion_map['wt'], zs= inversion_map['zs'], wts=inversion_map['wts'], prompt_tar=tar_prompt,
|
108 |
cfg_scale_tar=tar_cfg_scale, skip=skip)
|
109 |
outputs.append(out)
|
110 |
|