Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,6 +36,17 @@ def controlnet_process(image, controlnet_type, model):
|
|
| 36 |
# Logika untuk memproses gambar menggunakan ControlNet
|
| 37 |
return f"Proses gambar dengan ControlNet '{controlnet_type}' dan model '{model}'"
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
#wd tagger
|
| 40 |
|
| 41 |
# Dataset v3 series of models:
|
|
@@ -309,11 +320,6 @@ with gr.Blocks(css= "style.css") as app:
|
|
| 309 |
|
| 310 |
with gr.Column():
|
| 311 |
controlnet_output_image = gr.Image(label="Hasil ControlNet")
|
| 312 |
-
|
| 313 |
-
def controlnet_process_func(image, controlnet_type, model):
|
| 314 |
-
# Update fungsi sesuai kebutuhan
|
| 315 |
-
return controlnet_process(image, controlnet_type, model)
|
| 316 |
-
|
| 317 |
controlnet_button.click(fn=controlnet_process_func, inputs=[controlnet_image_input, controlnet_dropdown, model_dropdown, vae_dropdown], outputs=controlnet_output_image)
|
| 318 |
|
| 319 |
# Tab untuk Intpainting
|
|
@@ -331,7 +337,7 @@ with gr.Blocks(css= "style.css") as app:
|
|
| 331 |
with gr.Column():
|
| 332 |
image_out = gr.Image(label="Output", elem_id="output-img")
|
| 333 |
|
| 334 |
-
btn.click(fn=
|
| 335 |
|
| 336 |
|
| 337 |
|
|
|
|
| 36 |
# Logika untuk memproses gambar menggunakan ControlNet
|
| 37 |
return f"Proses gambar dengan ControlNet '{controlnet_type}' dan model '{model}'"
|
| 38 |
|
| 39 |
+
|
| 40 |
+
def controlnet_process_func(image, controlnet_type, model):
|
| 41 |
+
# Update fungsi sesuai kebutuhan
|
| 42 |
+
return controlnet_process(image, controlnet_type, model)
|
| 43 |
+
|
| 44 |
+
def intpaint_func (image, controlnet_type, model):
|
| 45 |
+
# Update fungsi sesuai kebutuhan
|
| 46 |
+
return controlnet_process(image, controlnet_type, model)
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
|
| 50 |
#wd tagger
|
| 51 |
|
| 52 |
# Dataset v3 series of models:
|
|
|
|
| 320 |
|
| 321 |
with gr.Column():
|
| 322 |
controlnet_output_image = gr.Image(label="Hasil ControlNet")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 323 |
controlnet_button.click(fn=controlnet_process_func, inputs=[controlnet_image_input, controlnet_dropdown, model_dropdown, vae_dropdown], outputs=controlnet_output_image)
|
| 324 |
|
| 325 |
# Tab untuk Intpainting
|
|
|
|
| 337 |
with gr.Column():
|
| 338 |
image_out = gr.Image(label="Output", elem_id="output-img")
|
| 339 |
|
| 340 |
+
btn.click(fn=intpaint_func, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, scheduler], outputs=[image_out, share_btn_container])
|
| 341 |
|
| 342 |
|
| 343 |
|