()
| 376 | |
| 377 | |
| 378 | def refresh_models(): |
| 379 | def make_refresh_call(type): |
| 380 | try: |
| 381 | webui_post(f"/sdapi/v1/refresh-{type}") |
| 382 | except: |
| 383 | pass |
| 384 | |
| 385 | try: |
| 386 | for type in ("checkpoints", "vae-and-text-encoders"): |
| 387 | t = Thread(target=make_refresh_call, args=(type,)) |
| 388 | t.start() |
| 389 | except Exception as e: |
| 390 | print(f"Error refreshing models: {e}") |
| 391 | |
| 392 | |
| 393 | def list_controlnet_filters(): |