Spaces:
Runtime error
Runtime error
change params order
Browse files
app.py
CHANGED
|
@@ -131,6 +131,7 @@ def download_lora(style_name):
|
|
| 131 |
@spaces.GPU
|
| 132 |
def generate_styled_image(
|
| 133 |
input_image,
|
|
|
|
| 134 |
style_name,
|
| 135 |
custom_prompt="",
|
| 136 |
num_inference_steps=24,
|
|
@@ -138,7 +139,6 @@ def generate_styled_image(
|
|
| 138 |
width=1024,
|
| 139 |
height=1024,
|
| 140 |
seed=-1,
|
| 141 |
-
input_base64: str | None = None,
|
| 142 |
):
|
| 143 |
"""Generate styled image using FLUX Kontext with LoRA"""
|
| 144 |
global pipeline, current_lora
|
|
@@ -392,12 +392,12 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
|
|
| 392 |
gr.Markdown("### Examples")
|
| 393 |
gr.Examples(
|
| 394 |
examples=[
|
| 395 |
-
["https://huggingface.co/datasets/black-forest-labs/kontext-bench/resolve/main/test/images/0003.jpg", "None", "", 24, 7.5, 1024, 1024, -1],
|
| 396 |
-
["https://huggingface.co/datasets/black-forest-labs/kontext-bench/resolve/main/test/images/0003.jpg", "Ghibli", "", 24, 7.5, 1024, 1024, -1],
|
| 397 |
-
["https://huggingface.co/datasets/black-forest-labs/kontext-bench/resolve/main/test/images/0003.jpg", "Pixel", "", 24, 7.5, 1024, 1024, -1],
|
| 398 |
-
["https://huggingface.co/datasets/black-forest-labs/kontext-bench/resolve/main/test/images/0003.jpg", "Van_Gogh", "", 24, 7.5, 1024, 1024, -1],
|
| 399 |
],
|
| 400 |
-
inputs=[input_image, style_dropdown, custom_prompt, num_inference_steps, guidance_scale, width, height, seed
|
| 401 |
outputs=[output_image],
|
| 402 |
fn=generate_styled_image,
|
| 403 |
cache_examples=False,
|
|
|
|
| 131 |
@spaces.GPU
|
| 132 |
def generate_styled_image(
|
| 133 |
input_image,
|
| 134 |
+
input_base64,
|
| 135 |
style_name,
|
| 136 |
custom_prompt="",
|
| 137 |
num_inference_steps=24,
|
|
|
|
| 139 |
width=1024,
|
| 140 |
height=1024,
|
| 141 |
seed=-1,
|
|
|
|
| 142 |
):
|
| 143 |
"""Generate styled image using FLUX Kontext with LoRA"""
|
| 144 |
global pipeline, current_lora
|
|
|
|
| 392 |
gr.Markdown("### Examples")
|
| 393 |
gr.Examples(
|
| 394 |
examples=[
|
| 395 |
+
["https://huggingface.co/datasets/black-forest-labs/kontext-bench/resolve/main/test/images/0003.jpg", "", "None", "", 24, 7.5, 1024, 1024, -1],
|
| 396 |
+
["https://huggingface.co/datasets/black-forest-labs/kontext-bench/resolve/main/test/images/0003.jpg", "", "Ghibli", "", 24, 7.5, 1024, 1024, -1],
|
| 397 |
+
["https://huggingface.co/datasets/black-forest-labs/kontext-bench/resolve/main/test/images/0003.jpg", "", "Pixel", "", 24, 7.5, 1024, 1024, -1],
|
| 398 |
+
["https://huggingface.co/datasets/black-forest-labs/kontext-bench/resolve/main/test/images/0003.jpg", "", "Van_Gogh", "", 24, 7.5, 1024, 1024, -1],
|
| 399 |
],
|
| 400 |
+
inputs=[input_image, input_base64, style_dropdown, custom_prompt, num_inference_steps, guidance_scale, width, height, seed],
|
| 401 |
outputs=[output_image],
|
| 402 |
fn=generate_styled_image,
|
| 403 |
cache_examples=False,
|