Commit
·
a618ce5
1
Parent(s):
00ac23b
28. Sept. 2024, 11:30
Browse files
app.py
CHANGED
@@ -277,25 +277,34 @@ with gr.Blocks(theme=theme, css="custom.css", js="javascript.js") as demo:
|
|
277 |
""",
|
278 |
elem_classes="md-header",
|
279 |
)
|
280 |
-
with gr.
|
281 |
-
with gr.
|
282 |
-
|
283 |
-
|
284 |
-
## TAB LINEART
|
285 |
-
with gr.Tab("Lineart"):
|
286 |
-
with gr.Row():
|
287 |
-
gr.Markdown("## Lineart \n<p>Check Invert to use with Mochi Diffusion. Inverted image can also be created here for use with ControlNet Scribble.")
|
288 |
-
with gr.Row():
|
289 |
-
with gr.Column():
|
290 |
-
preprocessor_name = gr.Radio(label="Preprocessor", show_label=False, choices=["Lineart", "Lineart Coarse", "Lineart Anime"], type="value", value="Lineart")
|
291 |
-
invert = gr.Checkbox(label="Invert", value=True)
|
292 |
-
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
293 |
-
run_btn_lineart = gr.Button("Run")
|
294 |
-
|
295 |
-
with gr.Column(scale=2):
|
296 |
-
gallery = gr.Gallery(label="Generated images", show_label=False, interactive=False, format="png", elem_id="output_gallery", elem_classes="output-gallery", columns=[3], rows=[2], object_fit="contain", height="auto", type="filepath")
|
297 |
|
298 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
|
300 |
|
301 |
"""
|
|
|
277 |
""",
|
278 |
elem_classes="md-header",
|
279 |
)
|
280 |
+
with gr.Tab("Preprocessors"):
|
281 |
+
with gr.Row(elem_classes="row-main"):
|
282 |
+
with gr.Column(scale=1):
|
283 |
+
input_image = gr.Image(label="Input Image", type="numpy", height=512)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
|
285 |
+
## TAB LINEART
|
286 |
+
with gr.Tab("Lineart"):
|
287 |
+
with gr.Row():
|
288 |
+
gr.Markdown("## Lineart \n<p>Check Invert to use with Mochi Diffusion. Inverted image can also be created here for use with ControlNet Scribble.")
|
289 |
+
with gr.Row():
|
290 |
+
with gr.Column():
|
291 |
+
preprocessor_name = gr.Radio(label="Preprocessor", show_label=False, choices=["Lineart", "Lineart Coarse", "Lineart Anime"], type="value", value="Lineart")
|
292 |
+
invert = gr.Checkbox(label="Invert", value=True)
|
293 |
+
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
294 |
+
run_btn_lineart = gr.Button("Run")
|
295 |
+
|
296 |
+
with gr.Column(scale=2):
|
297 |
+
gallery = gr.Gallery(label="Generated images", show_label=False, interactive=False, format="png", elem_id="output_gallery", elem_classes="output-gallery", columns=[3], rows=[2], object_fit="contain", height="auto", type="filepath")
|
298 |
+
|
299 |
+
with gr.Tab("Tutorial"):
|
300 |
+
with gr.Row(elem_classes="row-main"):
|
301 |
+
with gr.Column():
|
302 |
+
gr.Markdown(
|
303 |
+
f"""
|
304 |
+
# Das Tutorial kommt bald.
|
305 |
+
"""
|
306 |
+
)
|
307 |
+
run_btn_lineart.click(fn=lineart, inputs=[input_image, resolution, preprocessor_name, invert, gallery], outputs=[gallery])
|
308 |
|
309 |
|
310 |
"""
|