Update app.py
Browse files
app.py
CHANGED
@@ -139,12 +139,12 @@ model_uniformer = None
|
|
139 |
# return [result]
|
140 |
|
141 |
|
|
|
142 |
|
143 |
model_lineart_anime = None
|
144 |
model_lineart = None
|
145 |
|
146 |
-
|
147 |
-
def lineart(img, res, preprocessor_name=Lineart, invert=True):
|
148 |
img = resize_image(HWC3(img), res)
|
149 |
["Lineart", "Lineart Coarse", "Lineart Anime"]
|
150 |
if preprocessor_name in ["Lineart", "Lineart Coarse"]:
|
@@ -386,7 +386,7 @@ with gr.Blocks(theme=theme) as demo:
|
|
386 |
gallery = gr.Gallery(label="Generated images", show_label=False, height="auto")
|
387 |
run_button.click(fn=openpose, inputs=[input_image, resolution, hand_and_face], outputs=[gallery])
|
388 |
|
389 |
-
|
390 |
with gr.Tab("Lineart"):
|
391 |
with gr.Row():
|
392 |
gr.Markdown("## Lineart \n<p>Check Invert to use with Mochi Diffusion. Inverted image can also be created here for use with ControlNet Scribble.")
|
|
|
139 |
# return [result]
|
140 |
|
141 |
|
142 |
+
## FUNCTION LINEART
|
143 |
|
144 |
model_lineart_anime = None
|
145 |
model_lineart = None
|
146 |
|
147 |
+
def lineart(img, res, preprocessor_name="Lineart", invert=True):
|
|
|
148 |
img = resize_image(HWC3(img), res)
|
149 |
["Lineart", "Lineart Coarse", "Lineart Anime"]
|
150 |
if preprocessor_name in ["Lineart", "Lineart Coarse"]:
|
|
|
386 |
gallery = gr.Gallery(label="Generated images", show_label=False, height="auto")
|
387 |
run_button.click(fn=openpose, inputs=[input_image, resolution, hand_and_face], outputs=[gallery])
|
388 |
|
389 |
+
## TAB LINEART
|
390 |
with gr.Tab("Lineart"):
|
391 |
with gr.Row():
|
392 |
gr.Markdown("## Lineart \n<p>Check Invert to use with Mochi Diffusion. Inverted image can also be created here for use with ControlNet Scribble.")
|