Spaces:
Runtime error
Runtime error
Jordan Legg
commited on
Commit
Β·
8c3684f
1
Parent(s):
c457147
make button more obvious
Browse files
app.py
CHANGED
|
@@ -61,6 +61,11 @@ with gr.Blocks() as demo:
|
|
| 61 |
prompt = gr.Textbox(label="Prompt", placeholder="Enter your image description here...", value=example_prompt)
|
| 62 |
run_button = gr.Button("Generate")
|
| 63 |
result = gr.Image(label="Generated Image")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
gr.Markdown("""
|
| 65 |
## Example Prompt
|
| 66 |
Try this example prompt or modify it to see how FLUX.1 [schnell] performs:
|
|
@@ -68,18 +73,15 @@ with gr.Blocks() as demo:
|
|
| 68 |
A vibrant red origami crane on a white background, intricate paper folds, studio lighting
|
| 69 |
```
|
| 70 |
""")
|
| 71 |
-
with gr.Accordion("Advanced Settings", open=
|
| 72 |
-
seed = gr.Slider(minimum=0, maximum=MAX_SEED, step=1, label="Seed", randomize=
|
| 73 |
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
| 74 |
width = gr.Slider(minimum=256, maximum=MAX_IMAGE_SIZE, step=32, value=1024, label="Width")
|
| 75 |
height = gr.Slider(minimum=256, maximum=MAX_IMAGE_SIZE, step=32, value=1024, label="Height")
|
| 76 |
num_inference_steps = gr.Slider(minimum=1, maximum=50, step=1, value=4, label="Number of inference steps")
|
| 77 |
-
upscale = gr.Checkbox(label="Upscale with AuraSR V2", value=False)
|
| 78 |
gr.Markdown("""
|
| 79 |
**Note:** FLUX.1 [schnell] is optimized for speed and can produce high-quality results with just a few inference steps.
|
| 80 |
Adjust the number of steps based on your speed/quality preference. More steps may improve quality but will increase generation time.
|
| 81 |
-
|
| 82 |
-
The upscaling option uses AuraSR V2 to increase the resolution of the generated image by 4x. This may significantly increase processing time.
|
| 83 |
""")
|
| 84 |
gr.Markdown("""
|
| 85 |
## Additional Information
|
|
@@ -90,7 +92,7 @@ with gr.Blocks() as demo:
|
|
| 90 |
- For more details and other FLUX.1 variants, visit [Black Forest Labs](https://blackforestlabs.ai)
|
| 91 |
- The upscaling feature uses AuraSR V2, an open reproduction of the GigaGAN Upscaler from fal.ai
|
| 92 |
""")
|
| 93 |
-
|
| 94 |
run_button.click(
|
| 95 |
infer,
|
| 96 |
inputs=[prompt, seed, randomize_seed, width, height, num_inference_steps, upscale],
|
|
|
|
| 61 |
prompt = gr.Textbox(label="Prompt", placeholder="Enter your image description here...", value=example_prompt)
|
| 62 |
run_button = gr.Button("Generate")
|
| 63 |
result = gr.Image(label="Generated Image")
|
| 64 |
+
upscale = gr.Checkbox(label="Upscale with AuraSR V2 (4x resolution increase)", value=True)
|
| 65 |
+
gr.Markdown("""
|
| 66 |
+
**Note:** Upscaling with AuraSR V2 will significantly increase the resolution and may improve image quality,
|
| 67 |
+
but it will also increase processing time. Use this option for the best possible output quality.
|
| 68 |
+
""")
|
| 69 |
gr.Markdown("""
|
| 70 |
## Example Prompt
|
| 71 |
Try this example prompt or modify it to see how FLUX.1 [schnell] performs:
|
|
|
|
| 73 |
A vibrant red origami crane on a white background, intricate paper folds, studio lighting
|
| 74 |
```
|
| 75 |
""")
|
| 76 |
+
with gr.Accordion("Advanced Settings", open=True):
|
| 77 |
+
seed = gr.Slider(minimum=0, maximum=MAX_SEED, step=1, label="Seed", randomize=False)
|
| 78 |
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
| 79 |
width = gr.Slider(minimum=256, maximum=MAX_IMAGE_SIZE, step=32, value=1024, label="Width")
|
| 80 |
height = gr.Slider(minimum=256, maximum=MAX_IMAGE_SIZE, step=32, value=1024, label="Height")
|
| 81 |
num_inference_steps = gr.Slider(minimum=1, maximum=50, step=1, value=4, label="Number of inference steps")
|
|
|
|
| 82 |
gr.Markdown("""
|
| 83 |
**Note:** FLUX.1 [schnell] is optimized for speed and can produce high-quality results with just a few inference steps.
|
| 84 |
Adjust the number of steps based on your speed/quality preference. More steps may improve quality but will increase generation time.
|
|
|
|
|
|
|
| 85 |
""")
|
| 86 |
gr.Markdown("""
|
| 87 |
## Additional Information
|
|
|
|
| 92 |
- For more details and other FLUX.1 variants, visit [Black Forest Labs](https://blackforestlabs.ai)
|
| 93 |
- The upscaling feature uses AuraSR V2, an open reproduction of the GigaGAN Upscaler from fal.ai
|
| 94 |
""")
|
| 95 |
+
|
| 96 |
run_button.click(
|
| 97 |
infer,
|
| 98 |
inputs=[prompt, seed, randomize_seed, width, height, num_inference_steps, upscale],
|