From b17ca0a5e731c142101bbdbf34d121df949e86d7 Mon Sep 17 00:00:00 2001 From: damian0815 Date: Tue, 8 Nov 2022 14:28:38 +0100 Subject: [PATCH] don't suppress exceptions when doing cross-attention control --- ldm/models/diffusion/shared_invokeai_diffusion.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ldm/models/diffusion/shared_invokeai_diffusion.py b/ldm/models/diffusion/shared_invokeai_diffusion.py index 1b181ba388..0a18eb25c8 100644 --- a/ldm/models/diffusion/shared_invokeai_diffusion.py +++ b/ldm/models/diffusion/shared_invokeai_diffusion.py @@ -151,10 +151,12 @@ class InvokeAIDiffuserComponent: context.request_apply_saved_attention_maps(ca_type) edited_conditioning = self.conditioning.cross_attention_control_args.edited_conditioning conditioned_next_x = self.model_forward_callback(x, sigma, edited_conditioning) - - finally: context.clear_requests(cleanup=True) + except: + context.clear_requests(cleanup=True) + raise + return unconditioned_next_x, conditioned_next_x def estimate_percent_through(self, step_index, sigma):