From 5008daa0fffe9effbcb23c3efaf05e805fdfd86f Mon Sep 17 00:00:00 2001 From: missionfloyd Date: Tue, 27 Jun 2023 19:00:29 -0600 Subject: [PATCH] Add exception handler to load_checkpoint() (#2904) --- extensions/sd_api_pictures/script.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/sd_api_pictures/script.py b/extensions/sd_api_pictures/script.py index e416d717..75cc205d 100644 --- a/extensions/sd_api_pictures/script.py +++ b/extensions/sd_api_pictures/script.py @@ -286,12 +286,14 @@ def get_checkpoints(): def load_checkpoint(checkpoint): - payload = { "sd_model_checkpoint": checkpoint } - requests.post(url=f'{params["address"]}/sdapi/v1/options', json=payload) + try: + requests.post(url=f'{params["address"]}/sdapi/v1/options', json=payload) + except: + pass def get_samplers():