Spaces:
Running
on
Zero
Running
on
Zero
minor: auto-cap event
Browse files
app_v3.py
CHANGED
|
@@ -207,7 +207,7 @@ with gr.Blocks(title="FLUX Turbo Upscaler", fill_height=True) as demo:
|
|
| 207 |
],
|
| 208 |
outputs=[log_state, generated_image, prompt]
|
| 209 |
)
|
| 210 |
-
control_image.
|
| 211 |
generate_caption,
|
| 212 |
inputs=[control_image],
|
| 213 |
outputs=[caption_state]
|
|
@@ -224,6 +224,14 @@ with gr.Blocks(title="FLUX Turbo Upscaler", fill_height=True) as demo:
|
|
| 224 |
fn=generate_caption,
|
| 225 |
inputs=[control_image],
|
| 226 |
outputs=[prompt]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
)
|
| 228 |
|
| 229 |
demo.launch(show_error=True)
|
|
|
|
| 207 |
],
|
| 208 |
outputs=[log_state, generated_image, prompt]
|
| 209 |
)
|
| 210 |
+
control_image.input(
|
| 211 |
generate_caption,
|
| 212 |
inputs=[control_image],
|
| 213 |
outputs=[caption_state]
|
|
|
|
| 224 |
fn=generate_caption,
|
| 225 |
inputs=[control_image],
|
| 226 |
outputs=[prompt]
|
| 227 |
+
).then(
|
| 228 |
+
generate_focus,
|
| 229 |
+
inputs=[control_image, focus],
|
| 230 |
+
outputs=[focus_state]
|
| 231 |
+
).then(
|
| 232 |
+
combine_caption_focus,
|
| 233 |
+
inputs=[caption_state, focus_state],
|
| 234 |
+
outputs=[prompt]
|
| 235 |
)
|
| 236 |
|
| 237 |
demo.launch(show_error=True)
|