Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -42,6 +42,7 @@ def invert_and_edit(image,
|
|
42 |
start_timestep,
|
43 |
stop_timestep,
|
44 |
num_inversion_steps,
|
|
|
45 |
width,
|
46 |
height,
|
47 |
inverted_latents,
|
@@ -64,7 +65,7 @@ def invert_and_edit(image,
|
|
64 |
latent_image_ids=latent_image_ids.to(DEVICE),
|
65 |
start_timestep=start_timestep,
|
66 |
stop_timestep=stop_timestep,
|
67 |
-
num_inference_steps=
|
68 |
eta=eta,
|
69 |
).images[0]
|
70 |
|
@@ -148,6 +149,13 @@ Stochastic Rectified Differential Equations*](https://rf-inversion.github.io/dat
|
|
148 |
)
|
149 |
|
150 |
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
with gr.Row():
|
153 |
gamma = gr.Slider(
|
@@ -163,7 +171,7 @@ Stochastic Rectified Differential Equations*](https://rf-inversion.github.io/dat
|
|
163 |
minimum=1,
|
164 |
maximum=50,
|
165 |
step=1,
|
166 |
-
value=
|
167 |
)
|
168 |
|
169 |
with gr.Row():
|
@@ -195,6 +203,7 @@ Stochastic Rectified Differential Equations*](https://rf-inversion.github.io/dat
|
|
195 |
start_timestep,
|
196 |
stop_timestep,
|
197 |
num_inversion_steps,
|
|
|
198 |
width,
|
199 |
height,
|
200 |
inverted_latents,
|
@@ -219,5 +228,10 @@ Stochastic Rectified Differential Equations*](https://rf-inversion.github.io/dat
|
|
219 |
outputs=[do_inversion]
|
220 |
)
|
221 |
|
|
|
|
|
|
|
|
|
|
|
222 |
if __name__ == "__main__":
|
223 |
demo.launch()
|
|
|
42 |
start_timestep,
|
43 |
stop_timestep,
|
44 |
num_inversion_steps,
|
45 |
+
num_inference_steps,
|
46 |
width,
|
47 |
height,
|
48 |
inverted_latents,
|
|
|
65 |
latent_image_ids=latent_image_ids.to(DEVICE),
|
66 |
start_timestep=start_timestep,
|
67 |
stop_timestep=stop_timestep,
|
68 |
+
num_inference_steps=num_inference_steps,
|
69 |
eta=eta,
|
70 |
).images[0]
|
71 |
|
|
|
149 |
)
|
150 |
|
151 |
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
152 |
+
num_inference_steps = gr.Slider(
|
153 |
+
label="num inference steps",
|
154 |
+
minimum=1,
|
155 |
+
maximum=50,
|
156 |
+
step=1,
|
157 |
+
value=28,
|
158 |
+
)
|
159 |
|
160 |
with gr.Row():
|
161 |
gamma = gr.Slider(
|
|
|
171 |
minimum=1,
|
172 |
maximum=50,
|
173 |
step=1,
|
174 |
+
value=28,
|
175 |
)
|
176 |
|
177 |
with gr.Row():
|
|
|
203 |
start_timestep,
|
204 |
stop_timestep,
|
205 |
num_inversion_steps,
|
206 |
+
num_inference_steps,
|
207 |
width,
|
208 |
height,
|
209 |
inverted_latents,
|
|
|
228 |
outputs=[do_inversion]
|
229 |
)
|
230 |
|
231 |
+
num_inversion_steps.change(
|
232 |
+
fn=reset_do_inversion,
|
233 |
+
outputs=[do_inversion]
|
234 |
+
)
|
235 |
+
|
236 |
if __name__ == "__main__":
|
237 |
demo.launch()
|