From 2696da733756f6a45286e9a92273d4ff8dada178 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 28 Sep 2022 15:10:05 +0530 Subject: [PATCH 1/3] Allow using a custom ckpt model --- ui/server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/server.py b/ui/server.py index c8c7324f..67c84949 100644 --- a/ui/server.py +++ b/ui/server.py @@ -84,7 +84,10 @@ async def ping(): model_is_loading = True from sd_internal import runtime - runtime.load_model_ckpt(ckpt_to_use="sd-v1-4") + + custom_weight_path = os.path.join(SCRIPT_DIR, 'custom-model.ckpt') + ckpt_to_use = "sd-v1-4" if not os.path.exists(custom_weight_path) else "custom-model" + runtime.load_model_ckpt(ckpt_to_use=ckpt_to_use) model_loaded = True model_is_loading = False From 34023f66f0cbf9c8d05de7ed79f4874613be21b3 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 28 Sep 2022 15:10:24 +0530 Subject: [PATCH 2/3] Bump version --- ui/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/index.html b/ui/index.html index 8cfde5f9..ed35db3c 100644 --- a/ui/index.html +++ b/ui/index.html @@ -15,7 +15,7 @@