Linoy Tsaban
commited on
Commit
·
b30a076
1
Parent(s):
3489b04
Update app.py
Browse files
app.py
CHANGED
|
@@ -93,9 +93,9 @@ def edit(input_image,
|
|
| 93 |
return pure_ddpm_out,sega_out.images[0]
|
| 94 |
|
| 95 |
|
| 96 |
-
####################################
|
| 97 |
|
| 98 |
-
|
| 99 |
gr.HTML("""<h1 style="font-weight: 900; margin-bottom: 7px;">
|
| 100 |
Edit Friendly DDPM X Semantic Guidance: Editing Real Images
|
| 101 |
</h1>
|
|
@@ -159,34 +159,34 @@ def edit(input_image,
|
|
| 159 |
)
|
| 160 |
|
| 161 |
|
| 162 |
-
|
| 163 |
-
|
| 164 |
######################################################
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
-
inputs = [
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
|
| 180 |
|
| 181 |
-
]
|
| 182 |
-
outputs = [gr.Image(label="DDPM"),gr.Image(label="DDPM+SEGA")]
|
| 183 |
-
|
| 184 |
-
# And the minimal interface
|
| 185 |
-
demo = gr.Interface(
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
)
|
| 190 |
-
demo.launch() # debug=True allows you to see errors and output in Colab
|
| 191 |
|
| 192 |
|
|
|
|
| 93 |
return pure_ddpm_out,sega_out.images[0]
|
| 94 |
|
| 95 |
|
| 96 |
+
####################################
|
| 97 |
|
| 98 |
+
with gr.Blocks() as demo:
|
| 99 |
gr.HTML("""<h1 style="font-weight: 900; margin-bottom: 7px;">
|
| 100 |
Edit Friendly DDPM X Semantic Guidance: Editing Real Images
|
| 101 |
</h1>
|
|
|
|
| 159 |
)
|
| 160 |
|
| 161 |
|
| 162 |
+
demo.queue(concurrency_count=1)
|
| 163 |
+
demo.launch(share=False)
|
| 164 |
######################################################
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
+
# inputs = [
|
| 169 |
+
# gr.Image(label="input image", shape=(512, 512)),
|
| 170 |
+
# gr.Textbox(label="input prompt"),
|
| 171 |
+
# gr.Textbox(label="target prompt"),
|
| 172 |
+
# gr.Textbox(label="SEGA edit concept"),
|
| 173 |
+
# gr.Checkbox(label="SEGA negative_guidance"),
|
| 174 |
+
# gr.Slider(label="warmup steps", minimum=1, maximum=30, value=5),
|
| 175 |
+
# gr.Slider(label="edit guidance scale", minimum=0, maximum=15, value=3.5),
|
| 176 |
+
# gr.Slider(label="guidance scale", minimum=7, maximum=18, value=15),
|
| 177 |
+
# gr.Slider(label="skip", minimum=0, maximum=40, value=36),
|
| 178 |
+
# gr.Slider(label="num diffusion steps", minimum=0, maximum=300, value=100)
|
| 179 |
|
| 180 |
|
| 181 |
+
# ]
|
| 182 |
+
# outputs = [gr.Image(label="DDPM"),gr.Image(label="DDPM+SEGA")]
|
| 183 |
+
|
| 184 |
+
# # And the minimal interface
|
| 185 |
+
# demo = gr.Interface(
|
| 186 |
+
# fn=edit,
|
| 187 |
+
# inputs=inputs,
|
| 188 |
+
# outputs=outputs,
|
| 189 |
+
# )
|
| 190 |
+
# demo.launch() # debug=True allows you to see errors and output in Colab
|
| 191 |
|
| 192 |
|