Spaces:
Build error
Build error
Update app_ctrlx.py
Browse files- app_ctrlx.py +15 -16
app_ctrlx.py
CHANGED
|
@@ -85,8 +85,7 @@ title = """
|
|
| 85 |
SDXL v1.0
|
| 86 |
</h3>
|
| 87 |
</div>
|
| 88 |
-
""
|
| 89 |
-
description = """<div style="display: flex; align-items: center; justify-content: center;margin-bottom: 25px">
|
| 90 |
<h3 style="text-align: center">
|
| 91 |
[<a href="https://genforce.github.io/ctrl-x/">Page</a>]
|
| 92 |
|
|
@@ -95,7 +94,8 @@ description = """<div style="display: flex; align-items: center; justify-content
|
|
| 95 |
[<a href="https://github.com/genforce/ctrl-x">Code</a>]
|
| 96 |
</h3>
|
| 97 |
</div>
|
| 98 |
-
|
|
|
|
| 99 |
<p>
|
| 100 |
<b>Ctrl-X</b> is a simple training-free and guidance-free framework for text-to-image (T2I) generation with
|
| 101 |
structure and appearance control. Given structure and appearance images, Ctrl-X designs feedforward structure
|
|
@@ -240,22 +240,11 @@ with gr.Blocks(theme=gr.themes.Default(), css=css, title="Ctrl-X (SDXL v1.0)") a
|
|
| 240 |
with gr.Accordion("Instructions", open=False):
|
| 241 |
gr.HTML(description)
|
| 242 |
with gr.Row():
|
| 243 |
-
|
| 244 |
-
with gr.Column(scale=55):
|
| 245 |
with gr.Group():
|
| 246 |
-
kwargs = {} # {"width": 400, "height": 400}
|
| 247 |
with gr.Row():
|
| 248 |
structure_image = gr.Image(label="Upload structure image (optional)", type="pil", **kwargs)
|
| 249 |
appearance_image = gr.Image(label="Upload appearance image (optional)", type="pil", **kwargs)
|
| 250 |
-
with gr.Row():
|
| 251 |
-
result = gr.Image(label="Output image", format="jpg", **kwargs)
|
| 252 |
-
result_refiner = gr.Image(label="Output image w/ refiner", format="jpg", **kwargs)
|
| 253 |
-
with gr.Row():
|
| 254 |
-
structure_recon = gr.Image(label="Structure image", format="jpg", **kwargs)
|
| 255 |
-
appearance_recon = gr.Image(label="Style image", format="jpg", **kwargs)
|
| 256 |
-
|
| 257 |
-
with gr.Column(scale=45):
|
| 258 |
-
with gr.Group():
|
| 259 |
with gr.Row():
|
| 260 |
structure_prompt = gr.Textbox(label="Structure prompt (optional)", placeholder="Describes the structure image")
|
| 261 |
appearance_prompt = gr.Textbox(label="Appearance prompt (optional)", placeholder="Describes the style image")
|
|
@@ -289,7 +278,17 @@ with gr.Blocks(theme=gr.themes.Default(), css=css, title="Ctrl-X (SDXL v1.0)") a
|
|
| 289 |
)
|
| 290 |
with gr.Row():
|
| 291 |
generate = gr.Button(value="Run")
|
| 292 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 293 |
inputs = [
|
| 294 |
structure_image, appearance_image,
|
| 295 |
prompt, structure_prompt, appearance_prompt,
|
|
|
|
| 85 |
SDXL v1.0
|
| 86 |
</h3>
|
| 87 |
</div>
|
| 88 |
+
<div style="display: flex; align-items: center; justify-content: center;margin-bottom: 25px">
|
|
|
|
| 89 |
<h3 style="text-align: center">
|
| 90 |
[<a href="https://genforce.github.io/ctrl-x/">Page</a>]
|
| 91 |
|
|
|
|
| 94 |
[<a href="https://github.com/genforce/ctrl-x">Code</a>]
|
| 95 |
</h3>
|
| 96 |
</div>
|
| 97 |
+
"""
|
| 98 |
+
description = """<div>
|
| 99 |
<p>
|
| 100 |
<b>Ctrl-X</b> is a simple training-free and guidance-free framework for text-to-image (T2I) generation with
|
| 101 |
structure and appearance control. Given structure and appearance images, Ctrl-X designs feedforward structure
|
|
|
|
| 240 |
with gr.Accordion("Instructions", open=False):
|
| 241 |
gr.HTML(description)
|
| 242 |
with gr.Row():
|
| 243 |
+
with gr.Column(scale=45):
|
|
|
|
| 244 |
with gr.Group():
|
|
|
|
| 245 |
with gr.Row():
|
| 246 |
structure_image = gr.Image(label="Upload structure image (optional)", type="pil", **kwargs)
|
| 247 |
appearance_image = gr.Image(label="Upload appearance image (optional)", type="pil", **kwargs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
with gr.Row():
|
| 249 |
structure_prompt = gr.Textbox(label="Structure prompt (optional)", placeholder="Describes the structure image")
|
| 250 |
appearance_prompt = gr.Textbox(label="Appearance prompt (optional)", placeholder="Describes the style image")
|
|
|
|
| 278 |
)
|
| 279 |
with gr.Row():
|
| 280 |
generate = gr.Button(value="Run")
|
| 281 |
+
|
| 282 |
+
with gr.Column(scale=55):
|
| 283 |
+
with gr.Group():
|
| 284 |
+
kwargs = {} # {"width": 400, "height": 400}
|
| 285 |
+
with gr.Row():
|
| 286 |
+
result = gr.Image(label="Output image", format="jpg", **kwargs)
|
| 287 |
+
result_refiner = gr.Image(label="Output image w/ refiner", format="jpg", **kwargs)
|
| 288 |
+
with gr.Row():
|
| 289 |
+
structure_recon = gr.Image(label="Structure image", format="jpg", **kwargs)
|
| 290 |
+
appearance_recon = gr.Image(label="Style image", format="jpg", **kwargs)
|
| 291 |
+
|
| 292 |
inputs = [
|
| 293 |
structure_image, appearance_image,
|
| 294 |
prompt, structure_prompt, appearance_prompt,
|