Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,15 +81,9 @@ def gen_fnseed(model_str, prompt, seed=1):
|
|
| 81 |
loop.close()
|
| 82 |
return result
|
| 83 |
|
| 84 |
-
with gr.Blocks() as demo:
|
| 85 |
-
gr.HTML(
|
| 86 |
-
|
| 87 |
-
<div>
|
| 88 |
-
<p> <center>For more than 911 models check out <a href="https://huggingface.co/spaces/Yntec/HuggingfaceDiffusion">HuggingfaceDiffusion</a>!</center>
|
| 89 |
-
</p></div>
|
| 90 |
-
"""
|
| 91 |
-
)
|
| 92 |
-
with gr.Tab('🤗 Huggingface Diffusion 🤗'):
|
| 93 |
txt_input = gr.Textbox(label='Your prompt:', lines=4)
|
| 94 |
gen_button = gr.Button('Generate up to 6 images in up to 3 minutes total')
|
| 95 |
with gr.Row():
|
|
@@ -99,6 +93,32 @@ with gr.Blocks() as demo:
|
|
| 99 |
#stop_button = gr.Button('Stop', variant = 'secondary', interactive = False)
|
| 100 |
|
| 101 |
gen_button.click(lambda s: gr.update(interactive = True), None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
gr.HTML(
|
| 103 |
"""
|
| 104 |
<div style="text-align: center; max-width: 1200px; margin: 0 auto;">
|
|
@@ -126,11 +146,6 @@ with gr.Blocks() as demo:
|
|
| 126 |
model_choice.change(extend_choices, model_choice, current_models)
|
| 127 |
with gr.Row():
|
| 128 |
gr.HTML(
|
| 129 |
-
"""
|
| 130 |
-
<div class="footer">
|
| 131 |
-
<p> Based on the <a href="https://huggingface.co/spaces/John6666/hfd_test_nostopbutton">Huggingface NoStopButton</a> Space by John6666, <a href="https://huggingface.co/spaces/derwahnsinn/TestGen">TestGen</a> Space by derwahnsinn, the <a href="https://huggingface.co/spaces/RdnUser77/SpacIO_v1">SpacIO</a> Space by RdnUser77 and Omnibus's Maximum Multiplier! For 6 images with the same model check out the <a href="https://huggingface.co/spaces/Yntec/PrintingPress">Printing Press</a>, for the classic UI with prompt enhancer try <a href="https://huggingface.co/spaces/Yntec/blitz_diffusion">Blitz Diffusion!</a>
|
| 132 |
-
</p>
|
| 133 |
-
"""
|
| 134 |
)
|
| 135 |
|
| 136 |
demo.queue(default_concurrency_limit=200, max_size=200)
|
|
|
|
| 81 |
loop.close()
|
| 82 |
return result
|
| 83 |
|
| 84 |
+
with gr.Blocks(theme="Nymbo/Nymbo_Theme") as demo:
|
| 85 |
+
gr.HTML("<h1>Compare 6</h1>")
|
| 86 |
+
with gr.Tab('Compare-6'):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
txt_input = gr.Textbox(label='Your prompt:', lines=4)
|
| 88 |
gen_button = gr.Button('Generate up to 6 images in up to 3 minutes total')
|
| 89 |
with gr.Row():
|
|
|
|
| 93 |
#stop_button = gr.Button('Stop', variant = 'secondary', interactive = False)
|
| 94 |
|
| 95 |
gen_button.click(lambda s: gr.update(interactive = True), None)
|
| 96 |
+
|
| 97 |
+
with gr.Tab("Advanced Settings"):
|
| 98 |
+
with gr.Row():
|
| 99 |
+
# Textbox for specifying elements to exclude from the image
|
| 100 |
+
negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="What should not be in the image", value="(deformed, distorted, disfigured), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, misspellings, typos", lines=3, elem_id="negative-prompt-text-input")
|
| 101 |
+
with gr.Row():
|
| 102 |
+
# Slider for selecting the image width
|
| 103 |
+
width = gr.Slider(label="Width", value=1024, minimum=64, maximum=1216, step=32)
|
| 104 |
+
# Slider for selecting the image height
|
| 105 |
+
height = gr.Slider(label="Height", value=1024, minimum=64, maximum=1216, step=32)
|
| 106 |
+
with gr.Row():
|
| 107 |
+
# Slider for setting the number of sampling steps
|
| 108 |
+
steps = gr.Slider(label="Sampling steps", value=35, minimum=1, maximum=100, step=1)
|
| 109 |
+
with gr.Row():
|
| 110 |
+
# Slider for adjusting the CFG scale (guidance scale)
|
| 111 |
+
cfg = gr.Slider(label="CFG Scale", value=7, minimum=1, maximum=20, step=1)
|
| 112 |
+
with gr.Row():
|
| 113 |
+
# Slider for adjusting the transformation strength
|
| 114 |
+
strength = gr.Slider(label="Strength", value=0.7, minimum=0, maximum=1, step=0.001)
|
| 115 |
+
with gr.Row():
|
| 116 |
+
# Slider for setting the seed for reproducibility
|
| 117 |
+
seed = gr.Slider(label="Seed", value=-1, minimum=-1, maximum=1000000000, step=1)
|
| 118 |
+
with gr.Row():
|
| 119 |
+
# Radio buttons for selecting the sampling method
|
| 120 |
+
method = gr.Radio(label="Sampling method", value="DPM++ 2M Karras", choices=["DPM++ 2M Karras", "DPM++ SDE Karras", "Euler", "Euler a", "Heun", "DDIM"])
|
| 121 |
+
|
| 122 |
gr.HTML(
|
| 123 |
"""
|
| 124 |
<div style="text-align: center; max-width: 1200px; margin: 0 auto;">
|
|
|
|
| 146 |
model_choice.change(extend_choices, model_choice, current_models)
|
| 147 |
with gr.Row():
|
| 148 |
gr.HTML(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
)
|
| 150 |
|
| 151 |
demo.queue(default_concurrency_limit=200, max_size=200)
|