Spaces:
Runtime error
Runtime error
Examples
Browse files
app.py
CHANGED
|
@@ -89,10 +89,9 @@ def infer(input_image, prompt, seed=42, randomize_seed=False, guidance_scale=2.5
|
|
| 89 |
|
| 90 |
def infer_example(input_image, prompt):
|
| 91 |
if input_image_debug_value[0] is not None or prompt_debug_value[0] is not None:
|
| 92 |
-
input_image
|
| 93 |
-
prompt
|
| 94 |
-
|
| 95 |
-
|
| 96 |
image, seed, _ = infer(input_image, prompt)
|
| 97 |
return image, seed
|
| 98 |
|
|
@@ -155,18 +154,38 @@ Image editing and manipulation model guidance-distilled from FLUX.1 Kontext [pro
|
|
| 155 |
|
| 156 |
|
| 157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
|
| 159 |
with gr.Row(visible=False):
|
| 160 |
input_image_debug=gr.Image(type="pil", label="Image Debug")
|
| 161 |
prompt_debug=gr.Textbox(label="Prompt Debug")
|
| 162 |
gr.Examples(
|
| 163 |
examples=[
|
| 164 |
-
["
|
| 165 |
-
["
|
| 166 |
["monster.png", "make this monster ride a skateboard on the beach"],
|
| 167 |
["monster.png", "make this monster blue"],
|
| 168 |
-
["
|
| 169 |
-
["
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
],
|
| 171 |
inputs=[input_image, prompt],
|
| 172 |
outputs=[result, seed],
|
|
|
|
| 89 |
|
| 90 |
def infer_example(input_image, prompt):
|
| 91 |
if input_image_debug_value[0] is not None or prompt_debug_value[0] is not None:
|
| 92 |
+
input_image=input_image_debug_value[0]
|
| 93 |
+
prompt=prompt_debug_value[0]
|
| 94 |
+
input_image_debug_value[0]=prompt_debug_value[0]=None
|
|
|
|
| 95 |
image, seed, _ = infer(input_image, prompt)
|
| 96 |
return image, seed
|
| 97 |
|
|
|
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
+
gr.Examples(
|
| 158 |
+
label = "Examples from demo",
|
| 159 |
+
examples=[
|
| 160 |
+
["flowers.png", "turn the flowers into sunflowers"],
|
| 161 |
+
["monster.png", "make this monster ride a skateboard on the beach"],
|
| 162 |
+
["cat.png", "make this cat happy"]
|
| 163 |
+
],
|
| 164 |
+
inputs=[input_image, prompt],
|
| 165 |
+
outputs=[result, seed],
|
| 166 |
+
fn=infer_example
|
| 167 |
+
)
|
| 168 |
|
| 169 |
with gr.Row(visible=False):
|
| 170 |
input_image_debug=gr.Image(type="pil", label="Image Debug")
|
| 171 |
prompt_debug=gr.Textbox(label="Prompt Debug")
|
| 172 |
gr.Examples(
|
| 173 |
examples=[
|
| 174 |
+
["cat.png", "make this cat happy"],
|
| 175 |
+
["cat.png", "make this cat a dog"],
|
| 176 |
["monster.png", "make this monster ride a skateboard on the beach"],
|
| 177 |
["monster.png", "make this monster blue"],
|
| 178 |
+
["monster.png", "make this monster orange"],
|
| 179 |
+
["monster.png", "make this monster yellow"],
|
| 180 |
+
["monster.png", "make this monster purple"],
|
| 181 |
+
["monster.png", "make this monster brown"],
|
| 182 |
+
["monster.png", "make this monster white"],
|
| 183 |
+
["monster.png", "make this monster black"],
|
| 184 |
+
["monster.png", "make this monster grey"],
|
| 185 |
+
["monster.png", "make this monster pink"],
|
| 186 |
+
["flowers.png", "turn the flowers into sunflowers"],
|
| 187 |
+
["flowers.png", "turn the flowers into roses"],
|
| 188 |
+
["flowers.png", "turn the flowers into umbrellas"]
|
| 189 |
],
|
| 190 |
inputs=[input_image, prompt],
|
| 191 |
outputs=[result, seed],
|