Spaces:
Running
on
L40S
Running
on
L40S
Commit
•
81240b4
1
Parent(s):
b97a2fd
Update app.py
Browse files
app.py
CHANGED
@@ -290,14 +290,16 @@ def generate_image(prompt, structure_image, style_image, depth_strength=15, styl
|
|
290 |
# Create Gradio interface
|
291 |
|
292 |
examples = [
|
293 |
-
["", "mona.png", "receita-tacos.webp"],
|
294 |
-
["a woman looking at a house catching fire on the background", "disaster_girl.png", "abaporu.jpg"],
|
295 |
-
["istanbul aerial, dramatic photography", "natasha.png", "istambul.jpg"],
|
296 |
]
|
297 |
|
|
|
|
|
298 |
with gr.Blocks() as app:
|
299 |
gr.Markdown("# FLUX Style Shaping")
|
300 |
-
gr.Markdown("
|
301 |
with gr.Row():
|
302 |
with gr.Column():
|
303 |
prompt_input = gr.Textbox(label="Prompt", placeholder="Enter your prompt here...")
|
@@ -309,16 +311,17 @@ with gr.Blocks() as app:
|
|
309 |
style_image = gr.Image(label="Style Image", type="filepath")
|
310 |
style_strength = gr.Slider(minimum=0, maximum=1, value=0.5, label="Style Strength")
|
311 |
generate_btn = gr.Button("Generate")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
|
313 |
with gr.Column():
|
314 |
-
output_image
|
315 |
-
gr.Examples(
|
316 |
-
examples=examples,
|
317 |
-
inputs=[prompt_input, structure_image, style_image],
|
318 |
-
outputs=[output_image],
|
319 |
-
fn=generate_image,
|
320 |
-
cache_examples="lazy"
|
321 |
-
)
|
322 |
generate_btn.click(
|
323 |
fn=generate_image,
|
324 |
inputs=[prompt_input, structure_image, style_image, depth_strength, style_strength],
|
|
|
290 |
# Create Gradio interface
|
291 |
|
292 |
examples = [
|
293 |
+
["", "mona.png", "receita-tacos.webp", 15, 0.6],
|
294 |
+
["a woman looking at a house catching fire on the background", "disaster_girl.png", "abaporu.jpg", 15, 0.15],
|
295 |
+
["istanbul aerial, dramatic photography", "natasha.png", "istambul.jpg", 15, 0.5],
|
296 |
]
|
297 |
|
298 |
+
output_image = gr.Image(label="Generated Image")
|
299 |
+
|
300 |
with gr.Blocks() as app:
|
301 |
gr.Markdown("# FLUX Style Shaping")
|
302 |
+
gr.Markdown("Flux[dev] Redux + Flux[dev] Depth ComfyUI workflow by [Nathan Shipley](https://x.com/CitizenPlain) running directly on Gradio. [workflow](https://gist.github.com/nathanshipley/7a9ac1901adde76feebe58d558026f68) - [how to convert your any comfy workflow to gradio (soon)](#)")
|
303 |
with gr.Row():
|
304 |
with gr.Column():
|
305 |
prompt_input = gr.Textbox(label="Prompt", placeholder="Enter your prompt here...")
|
|
|
311 |
style_image = gr.Image(label="Style Image", type="filepath")
|
312 |
style_strength = gr.Slider(minimum=0, maximum=1, value=0.5, label="Style Strength")
|
313 |
generate_btn = gr.Button("Generate")
|
314 |
+
|
315 |
+
gr.Examples(
|
316 |
+
examples=examples,
|
317 |
+
inputs=[prompt_input, structure_image, style_image, depth_strength, style_strength],
|
318 |
+
outputs=[output_image],
|
319 |
+
fn=generate_image,
|
320 |
+
cache_examples="lazy"
|
321 |
+
)
|
322 |
|
323 |
with gr.Column():
|
324 |
+
output_image.render()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
generate_btn.click(
|
326 |
fn=generate_image,
|
327 |
inputs=[prompt_input, structure_image, style_image, depth_strength, style_strength],
|