From 3d2b497eb0e9089de88851f9987cece0a20f1da9 Mon Sep 17 00:00:00 2001 From: Matthias Wild <40327258+mauwii@users.noreply.github.com> Date: Sat, 10 Dec 2022 20:07:14 +0100 Subject: [PATCH 1/3] Run more tests for PRs (#1895) * run 3 tests for PR with different samplers reduce tests for PR to do only 5 Iterations * use correct txt file - delete unused old file --- tests/pr_prompt.txt | 1 - tests/validate_pr_prompt.txt | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 tests/pr_prompt.txt diff --git a/tests/pr_prompt.txt b/tests/pr_prompt.txt deleted file mode 100644 index c1a8e00cbe..0000000000 --- a/tests/pr_prompt.txt +++ /dev/null @@ -1 +0,0 @@ -banana sushi -Ak_lms -S42 -s10 diff --git a/tests/validate_pr_prompt.txt b/tests/validate_pr_prompt.txt index c1a8e00cbe..06c1b1ca4d 100644 --- a/tests/validate_pr_prompt.txt +++ b/tests/validate_pr_prompt.txt @@ -1 +1,3 @@ -banana sushi -Ak_lms -S42 -s10 +banana sushi -Ak_lms -S42 -s5 +banana sushi -Ak_heun -S42 -s5 +banana sushi -Addim -S42 -s5 From 12a8d7fc1494c24ba42fafe6c8e22249961d3bc9 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sun, 11 Dec 2022 07:12:20 +1300 Subject: [PATCH 2/3] Fix crash introduced in #1866 --- ldm/models/diffusion/cross_attention_control.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldm/models/diffusion/cross_attention_control.py b/ldm/models/diffusion/cross_attention_control.py index 47a7095eca..db86659b5e 100644 --- a/ldm/models/diffusion/cross_attention_control.py +++ b/ldm/models/diffusion/cross_attention_control.py @@ -280,7 +280,7 @@ class InvokeAICrossAttentionMixin: return self.einsum_op_slice_dim1(q, k, v, slice_size) # fallback for when there is no saved strategy, or saved strategy does not slice - mem_free_total = self.cached_mem_free_total or get_mem_free_total(q.device) + mem_free_total = get_mem_free_total(q.device) # Divide factor of safety as there's copying and fragmentation return self.einsum_op_tensor_mem(q, k, v, mem_free_total / 3.3 / (1 << 20)) From 8cbb50c204b7ae24f805574aa59ede1ed2156318 Mon Sep 17 00:00:00 2001 From: Damian Stewart Date: Sat, 10 Dec 2022 20:31:45 +0100 Subject: [PATCH 3/3] avoid further crash under low-memory conditions --- ldm/invoke/generator/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ldm/invoke/generator/base.py b/ldm/invoke/generator/base.py index 14cdf20a0a..1e094717f0 100644 --- a/ldm/invoke/generator/base.py +++ b/ldm/invoke/generator/base.py @@ -103,7 +103,8 @@ class Generator(): results.append([image, seed]) if image_callback is not None: - image_callback(image, seed, first_seed=first_seed, attention_maps_image=attention_maps_images[-1]) + attention_maps_image = None if len(attention_maps_images)==0 else attention_maps_images[-1] + image_callback(image, seed, first_seed=first_seed, attention_maps_image=attention_maps_image) seed = self.new_seed()