Spaces:
Running
Running
updated
Browse files
app.py
CHANGED
|
@@ -57,14 +57,13 @@ def ui():
|
|
| 57 |
|
| 58 |
with gr.Blocks(css=css) as demo:
|
| 59 |
gr.Markdown(f"""
|
| 60 |
-
# ControlNeXt-SDXL Demo
|
| 61 |
-
|
| 62 |
-
More better results please refer to the [official project page](https://github.com/dvlab-research/ControlNeXt).
|
| 63 |
""")
|
| 64 |
with gr.Row():
|
| 65 |
with gr.Column(scale=9):
|
| 66 |
-
prompt = gr.Textbox(value=DEFAULT_PROMPT, lines=3, placeholder='prompt', container=False)
|
| 67 |
-
negative_prompt = gr.Textbox(value=DEFAULT_NEGATIVE_PROMPT, lines=3, placeholder='negative prompt', container=False)
|
| 68 |
with gr.Column(scale=1):
|
| 69 |
generate_button = gr.Button("Generate", variant='primary', min_width=96)
|
| 70 |
with gr.Row():
|
|
@@ -104,27 +103,32 @@ def ui():
|
|
| 104 |
with gr.Row():
|
| 105 |
seed = gr.Number(label='Seed', step=1, precision=0, value=-1)
|
| 106 |
with gr.Column(scale=1):
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
|
|
|
| 116 |
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
|
| 129 |
@spaces.GPU
|
| 130 |
def generate(
|
|
|
|
| 57 |
|
| 58 |
with gr.Blocks(css=css) as demo:
|
| 59 |
gr.Markdown(f"""
|
| 60 |
+
# [ControlNeXt-SDXL](https://github.com/dvlab-research/ControlNeXt) Demo
|
| 61 |
+
Base model: [Neta-Art-XL-2.0](https://civitai.com/models/410737/neta-art-xl)
|
|
|
|
| 62 |
""")
|
| 63 |
with gr.Row():
|
| 64 |
with gr.Column(scale=9):
|
| 65 |
+
prompt = gr.Textbox(label='Prompt', value=DEFAULT_PROMPT, lines=3, placeholder='prompt', container=False)
|
| 66 |
+
negative_prompt = gr.Textbox(label='Negative Prompt', value=DEFAULT_NEGATIVE_PROMPT, lines=3, placeholder='negative prompt', container=False)
|
| 67 |
with gr.Column(scale=1):
|
| 68 |
generate_button = gr.Button("Generate", variant='primary', min_width=96)
|
| 69 |
with gr.Row():
|
|
|
|
| 103 |
with gr.Row():
|
| 104 |
seed = gr.Number(label='Seed', step=1, precision=0, value=-1)
|
| 105 |
with gr.Column(scale=1):
|
| 106 |
+
with gr.Row():
|
| 107 |
+
output = gr.Gallery(
|
| 108 |
+
label='Output',
|
| 109 |
+
value=None,
|
| 110 |
+
object_fit='scale-down',
|
| 111 |
+
columns=4,
|
| 112 |
+
height=512,
|
| 113 |
+
show_download_button=True,
|
| 114 |
+
show_share_button=True,
|
| 115 |
+
)
|
| 116 |
|
| 117 |
+
with gr.Row():
|
| 118 |
+
examples = gr.Examples(
|
| 119 |
+
label='Examples',
|
| 120 |
+
examples=[
|
| 121 |
+
[
|
| 122 |
+
'best quality, 1girl, solo, open hand, outdoors, street',
|
| 123 |
+
'examples/example_1.jpg',
|
| 124 |
+
],
|
| 125 |
+
],
|
| 126 |
+
inputs=[
|
| 127 |
+
prompt,
|
| 128 |
+
control_image,
|
| 129 |
+
],
|
| 130 |
+
cache_examples=False,
|
| 131 |
+
)
|
| 132 |
|
| 133 |
@spaces.GPU
|
| 134 |
def generate(
|