Add Error Handling For Merging

This commit is contained in:
blessedcoolant 2023-02-18 12:17:22 +13:00
parent 248dc81ec3
commit 5b7e4a5f5d

View File

@ -443,6 +443,7 @@ class InvokeAIWebServer:
@socketio.on('mergeDiffusersModels') @socketio.on('mergeDiffusersModels')
def merge_diffusers_models(model_merge_info: dict): def merge_diffusers_models(model_merge_info: dict):
try:
models_to_merge = model_merge_info['models_to_merge'] models_to_merge = model_merge_info['models_to_merge']
model_ids_or_paths = [ model_ids_or_paths = [
self.generate.model_manager.model_name_or_path(x) for x in models_to_merge] self.generate.model_manager.model_name_or_path(x) for x in models_to_merge]
@ -481,6 +482,8 @@ class InvokeAIWebServer:
print(f">> Models Merged: {models_to_merge}") print(f">> Models Merged: {models_to_merge}")
print( print(
f">> New Model Added: {model_merge_info['merged_model_name']}") f">> New Model Added: {model_merge_info['merged_model_name']}")
except Exception as e:
self.handle_exceptions(e)
@socketio.on("requestEmptyTempFolder") @socketio.on("requestEmptyTempFolder")
def empty_temp_folder(): def empty_temp_folder():