Spaces:
Running
on
A10G
Running
on
A10G
Linoy Tsaban
commited on
Commit
•
26f7dab
1
Parent(s):
bc09c01
Update app.py
Browse files
app.py
CHANGED
@@ -128,6 +128,7 @@ def invert_and_reconstruct(
|
|
128 |
bottom = 0
|
129 |
):
|
130 |
# offsets=(0,0,0,0)
|
|
|
131 |
x0 = load_512(input_image, left,right, top, bottom, device)
|
132 |
|
133 |
|
@@ -163,7 +164,7 @@ def edit(input_image,
|
|
163 |
# neg_guidance=False,
|
164 |
seed =0,
|
165 |
):
|
166 |
-
|
167 |
if not bool(inversion_map):
|
168 |
raise gr.Error("Must invert before editing")
|
169 |
latnets, zs, wts = inversion_map['latnets'],inversion_map['zs'],inversion_map['wts']
|
|
|
128 |
bottom = 0
|
129 |
):
|
130 |
# offsets=(0,0,0,0)
|
131 |
+
torch.manual_seed(seed)
|
132 |
x0 = load_512(input_image, left,right, top, bottom, device)
|
133 |
|
134 |
|
|
|
164 |
# neg_guidance=False,
|
165 |
seed =0,
|
166 |
):
|
167 |
+
torch.manual_seed(seed)
|
168 |
if not bool(inversion_map):
|
169 |
raise gr.Error("Must invert before editing")
|
170 |
latnets, zs, wts = inversion_map['latnets'],inversion_map['zs'],inversion_map['wts']
|