Linoy Tsaban
commited on
Commit
•
1988c7f
1
Parent(s):
62abbd7
Update app.py
Browse files
app.py
CHANGED
@@ -177,53 +177,81 @@ def randomize_seed_fn(seed, randomize_seed):
|
|
177 |
def get_example():
|
178 |
case = [
|
179 |
[
|
180 |
-
'examples/
|
181 |
-
|
182 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
100,
|
184 |
36,
|
185 |
15,
|
186 |
-
|
187 |
-
5.5,
|
188 |
-
1,
|
189 |
-
'examples/ddpm_sega_watercolor_painting_a_cat_sitting_next_to_a_mirror_plus_dog_minus_cat.png'
|
190 |
],
|
191 |
[
|
192 |
-
'examples/
|
193 |
-
|
194 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
100,
|
196 |
36,
|
197 |
15,
|
198 |
-
'painting','',
|
199 |
-
10,
|
200 |
-
1,
|
201 |
-
'examples/ddpm_sega_painting_of_a_robot_wearing_a_brown_hoodie_in_a_crowded_street.png'
|
202 |
],
|
203 |
-
|
204 |
-
'examples/
|
205 |
-
'',
|
206 |
-
'',
|
207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
36,
|
209 |
15,
|
210 |
-
|
211 |
-
|
212 |
-
1,
|
213 |
-
'examples/ddpm_sega_plus_pink_drawings_of_muffins.png'
|
214 |
],
|
215 |
-
|
216 |
-
'examples/
|
217 |
-
|
218 |
-
'
|
219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
36,
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
1,
|
225 |
-
'examples/ddpm_sega_glass_walls_gian_elephant.png'
|
226 |
-
]]
|
227 |
return case
|
228 |
|
229 |
|
@@ -667,24 +695,28 @@ with gr.Blocks(css="style.css") as demo:
|
|
667 |
outputs = [seed],
|
668 |
queue = False)
|
669 |
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
|
|
|
|
|
|
|
|
688 |
|
689 |
|
690 |
|
|
|
177 |
def get_example():
|
178 |
case = [
|
179 |
[
|
180 |
+
'examples/lemons_input.jpg',
|
181 |
+
# '',
|
182 |
+
'a ceramic bowl',
|
183 |
+
'apples', 'lemons',
|
184 |
+
'examples/lemons_output.jpg',
|
185 |
+
|
186 |
+
|
187 |
+
7,7,
|
188 |
+
1,1,
|
189 |
+
False, True,
|
190 |
100,
|
191 |
36,
|
192 |
15,
|
193 |
+
|
|
|
|
|
|
|
194 |
],
|
195 |
[
|
196 |
+
'examples/rockey_shore_input.jpg',
|
197 |
+
# '',
|
198 |
+
'watercolor painting',
|
199 |
+
'sea turtle', '',
|
200 |
+
'examples/rockey_shore_output.jpg',
|
201 |
+
|
202 |
+
|
203 |
+
7,7,
|
204 |
+
1,2,
|
205 |
100,
|
206 |
36,
|
207 |
15,
|
|
|
|
|
|
|
|
|
208 |
],
|
209 |
+
[
|
210 |
+
'examples/flower_field_input.jpg',
|
211 |
+
# '',
|
212 |
+
'oil painting',
|
213 |
+
'colorful flowers', 'red flowers',
|
214 |
+
'examples/flower_field_output.jpg',
|
215 |
+
|
216 |
+
20,7,
|
217 |
+
1,1,
|
218 |
+
False, True,
|
219 |
+
100,
|
220 |
36,
|
221 |
15,
|
222 |
+
|
223 |
+
|
|
|
|
|
224 |
],
|
225 |
+
[
|
226 |
+
'examples/flower_field_input.jpg',
|
227 |
+
# '',
|
228 |
+
'oil painting',
|
229 |
+
'wheat', 'red flowers',
|
230 |
+
'examples/flower_field_output_2.jpg',
|
231 |
+
|
232 |
+
|
233 |
+
20,7,
|
234 |
+
1,1,
|
235 |
+
False,True,
|
236 |
+
100,
|
237 |
+
36,
|
238 |
+
15,
|
239 |
+
|
240 |
+
],
|
241 |
+
[
|
242 |
+
'examples/butterfly.jpg',
|
243 |
+
# '',
|
244 |
+
'oil painting',
|
245 |
+
'bee', 'butterfly',
|
246 |
+
'examples/butterfly_output.jpg',
|
247 |
+
7, 7,
|
248 |
+
1,1,
|
249 |
+
False, True,
|
250 |
+
100,
|
251 |
36,
|
252 |
+
15,
|
253 |
+
]
|
254 |
+
]
|
|
|
|
|
|
|
255 |
return case
|
256 |
|
257 |
|
|
|
695 |
outputs = [seed],
|
696 |
queue = False)
|
697 |
|
698 |
+
gr.Examples(
|
699 |
+
label='Examples',
|
700 |
+
examples=get_example(),
|
701 |
+
inputs=[input_image,
|
702 |
+
# src_prompt,
|
703 |
+
tar_prompt,
|
704 |
+
edit_concept_1,
|
705 |
+
edit_concept_2,
|
706 |
+
sega_edited_image,
|
707 |
+
guidnace_scale_1,
|
708 |
+
guidnace_scale_2,
|
709 |
+
warmup_1,
|
710 |
+
warmup_2,
|
711 |
+
neg_guidance_1,
|
712 |
+
neg_guidance_2,
|
713 |
+
steps,
|
714 |
+
skip,
|
715 |
+
tar_cfg_scale,
|
716 |
+
|
717 |
+
],
|
718 |
+
outputs=[sega_edited_image],
|
719 |
+
)
|
720 |
|
721 |
|
722 |
|