From ea298030f306790b5c09354259330182e35a2c32 Mon Sep 17 00:00:00 2001 From: Johannes Stelzer Date: Thu, 12 Jan 2023 10:09:19 +0100 Subject: [PATCH] asserts --- stable_diffusion_holder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stable_diffusion_holder.py b/stable_diffusion_holder.py index 05cbcaf..e7495b0 100644 --- a/stable_diffusion_holder.py +++ b/stable_diffusion_holder.py @@ -180,8 +180,9 @@ class StableDiffusionHolder: fp_config = 'configs/v2-inference-v.yaml' else: raise ValueError("auto detect of config failed. please specify fp_config manually!") - - + + assert os.path.isfile(fp_config), "Auto-init of the config file failed. Please specify manually." + assert os.path.isfile(fp_config), f"Your config file does not exist: {fp_config}"