From 65a87ccc9bf92a0fd24a453e2837dd2d19bbf5ce Mon Sep 17 00:00:00 2001 From: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com> Date: Tue, 23 May 2023 00:09:49 +0800 Subject: [PATCH] Add error information for recursion error --- modules/sd_samplers_kdiffusion.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/sd_samplers_kdiffusion.py b/modules/sd_samplers_kdiffusion.py index ba0cf08e..e2f18b54 100644 --- a/modules/sd_samplers_kdiffusion.py +++ b/modules/sd_samplers_kdiffusion.py @@ -272,6 +272,12 @@ class KDiffusionSampler: try: return func() + except RecursionError: + print( + 'rho>5 with polyexponential scheduler may cause this error.' + 'You should try to use smaller rho instead.' + ) + return self.last_latent except sd_samplers_common.InterruptedException: return self.last_latent