From afd2322e264b1b72ebcb31a7e09e0b43518244d9 Mon Sep 17 00:00:00 2001 From: Kent Keirsey <31807370+hipsterusername@users.noreply.github.com> Date: Sun, 23 Jun 2024 13:20:05 -0400 Subject: [PATCH 1/2] Update prevention exception message --- invokeai/backend/model_hash/hash_validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/backend/model_hash/hash_validator.py b/invokeai/backend/model_hash/hash_validator.py index 8c387885147..e91c71fd783 100644 --- a/invokeai/backend/model_hash/hash_validator.py +++ b/invokeai/backend/model_hash/hash_validator.py @@ -12,7 +12,7 @@ def validate_hash(hash: str): map = json.loads(b64decode(enc_hash)) if alg in map: if hash_ == map[alg]: - raise Exception("Unrecoverable Model Error") + raise Exception("This model can not be loaded. If you're looking for help, consider visiting https://www.redirectionprogram.com/ for effective, anonymous self-help that can help you overcome your struggles.") hashes: list[str] = [ From fe1536d929de78db9d6ae5cc6e94a696a46c1ad0 Mon Sep 17 00:00:00 2001 From: Brandon Rising Date: Tue, 25 Jun 2024 15:24:31 -0500 Subject: [PATCH 2/2] Run ruff --- invokeai/backend/model_hash/hash_validator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invokeai/backend/model_hash/hash_validator.py b/invokeai/backend/model_hash/hash_validator.py index e91c71fd783..622cdbbddfb 100644 --- a/invokeai/backend/model_hash/hash_validator.py +++ b/invokeai/backend/model_hash/hash_validator.py @@ -12,7 +12,9 @@ def validate_hash(hash: str): map = json.loads(b64decode(enc_hash)) if alg in map: if hash_ == map[alg]: - raise Exception("This model can not be loaded. If you're looking for help, consider visiting https://www.redirectionprogram.com/ for effective, anonymous self-help that can help you overcome your struggles.") + raise Exception( + "This model can not be loaded. If you're looking for help, consider visiting https://www.redirectionprogram.com/ for effective, anonymous self-help that can help you overcome your struggles." + ) hashes: list[str] = [