Spaces:
Running
Running
Upload 2 files
Browse files- app.py +10 -10
- externalmod.py +5 -1
app.py
CHANGED
@@ -119,11 +119,11 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', fill_width=True, css=CSS) as demo:
|
|
119 |
neg_input = gr.Textbox(label='Negative prompt:', lines=1)
|
120 |
with gr.Accordion("Advanced", open=False, visible=True):
|
121 |
with gr.Row():
|
122 |
-
width = gr.
|
123 |
-
height = gr.
|
124 |
with gr.Row():
|
125 |
-
steps = gr.
|
126 |
-
cfg = gr.
|
127 |
seed = gr.Slider(label="Seed", info="Randomize Seed if -1.", minimum=-1, maximum=MAX_SEED, step=1, value=-1)
|
128 |
with gr.Row():
|
129 |
gen_button = gr.Button(f'Generate up to {int(num_models)} images in up to 3 minutes total', scale=3)
|
@@ -166,11 +166,11 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', fill_width=True, css=CSS) as demo:
|
|
166 |
neg_input2 = gr.Textbox(label='Negative prompt:', lines=1)
|
167 |
with gr.Accordion("Advanced", open=False, visible=True):
|
168 |
with gr.Row():
|
169 |
-
width2 = gr.
|
170 |
-
height2 = gr.
|
171 |
with gr.Row():
|
172 |
-
steps2 = gr.
|
173 |
-
cfg2 = gr.
|
174 |
seed2 = gr.Slider(label="Seed", info="Randomize Seed if -1.", minimum=-1, maximum=MAX_SEED, step=1, value=-1)
|
175 |
num_images = gr.Slider(1, max_images, value=max_images, step=1, label='Number of images')
|
176 |
with gr.Row():
|
@@ -202,5 +202,5 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', fill_width=True, css=CSS) as demo:
|
|
202 |
|
203 |
gr.Markdown("Based on the [TestGen](https://huggingface.co/spaces/derwahnsinn/TestGen) Space by derwahnsinn, the [SpacIO](https://huggingface.co/spaces/RdnUser77/SpacIO_v1) Space by RdnUser77 and Omnibus's Maximum Multiplier!")
|
204 |
|
205 |
-
demo.queue()
|
206 |
-
demo.launch()
|
|
|
119 |
neg_input = gr.Textbox(label='Negative prompt:', lines=1)
|
120 |
with gr.Accordion("Advanced", open=False, visible=True):
|
121 |
with gr.Row():
|
122 |
+
width = gr.Slider(label="Width", info="If 0, the default value is used.", maximum=1216, step=32, value=0)
|
123 |
+
height = gr.Slider(label="Height", info="If 0, the default value is used.", maximum=1216, step=32, value=0)
|
124 |
with gr.Row():
|
125 |
+
steps = gr.Slider(label="Number of inference steps", info="If 0, the default value is used.", maximum=100, step=1, value=0)
|
126 |
+
cfg = gr.Slider(label="Guidance scale", info="If 0, the default value is used.", maximum=30.0, step=0.1, value=0)
|
127 |
seed = gr.Slider(label="Seed", info="Randomize Seed if -1.", minimum=-1, maximum=MAX_SEED, step=1, value=-1)
|
128 |
with gr.Row():
|
129 |
gen_button = gr.Button(f'Generate up to {int(num_models)} images in up to 3 minutes total', scale=3)
|
|
|
166 |
neg_input2 = gr.Textbox(label='Negative prompt:', lines=1)
|
167 |
with gr.Accordion("Advanced", open=False, visible=True):
|
168 |
with gr.Row():
|
169 |
+
width2 = gr.Slider(label="Width", info="If 0, the default value is used.", maximum=1216, step=32, value=0)
|
170 |
+
height2 = gr.Slider(label="Height", info="If 0, the default value is used.", maximum=1216, step=32, value=0)
|
171 |
with gr.Row():
|
172 |
+
steps2 = gr.Slider(label="Number of inference steps", info="If 0, the default value is used.", maximum=100, step=1, value=0)
|
173 |
+
cfg2 = gr.Slider(label="Guidance scale", info="If 0, the default value is used.", maximum=30.0, step=0.1, value=0)
|
174 |
seed2 = gr.Slider(label="Seed", info="Randomize Seed if -1.", minimum=-1, maximum=MAX_SEED, step=1, value=-1)
|
175 |
num_images = gr.Slider(1, max_images, value=max_images, step=1, label='Number of images')
|
176 |
with gr.Row():
|
|
|
202 |
|
203 |
gr.Markdown("Based on the [TestGen](https://huggingface.co/spaces/derwahnsinn/TestGen) Space by derwahnsinn, the [SpacIO](https://huggingface.co/spaces/RdnUser77/SpacIO_v1) Space by RdnUser77 and Omnibus's Maximum Multiplier!")
|
204 |
|
205 |
+
demo.queue(default_concurrency_limit=200, max_size=200)
|
206 |
+
demo.launch(show_api=False, max_threads=400)
|
externalmod.py
CHANGED
@@ -531,7 +531,11 @@ def gr_Interface_load(
|
|
531 |
alias: str | None = None,
|
532 |
**kwargs,
|
533 |
) -> Blocks:
|
534 |
-
|
|
|
|
|
|
|
|
|
535 |
|
536 |
|
537 |
def list_uniq(l):
|
|
|
531 |
alias: str | None = None,
|
532 |
**kwargs,
|
533 |
) -> Blocks:
|
534 |
+
try:
|
535 |
+
return load_blocks_from_repo(name, src, hf_token, alias)
|
536 |
+
except Exception as e:
|
537 |
+
print(e)
|
538 |
+
return gradio.Interface(lambda: None, ['text'], ['image'])
|
539 |
|
540 |
|
541 |
def list_uniq(l):
|