From 2043c4a231eef838bb15044f502b864b55885037 Mon Sep 17 00:00:00 2001 From: C43H66N12O12S2 <36072735+C43H66N12O12S2@users.noreply.github.com> Date: Mon, 17 Oct 2022 19:49:11 +0300 Subject: [PATCH] delete xformers attnblock --- modules/sd_hijack_optimizations.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/modules/sd_hijack_optimizations.py b/modules/sd_hijack_optimizations.py index 79405525e..60da74594 100644 --- a/modules/sd_hijack_optimizations.py +++ b/modules/sd_hijack_optimizations.py @@ -292,15 +292,3 @@ def cross_attention_attnblock_forward(self, x): return h3 -def xformers_attnblock_forward(self, x): - try: - h_ = x - h_ = self.norm(h_) - q1 = self.q(h_).contiguous() - k1 = self.k(h_).contiguous() - v = self.v(h_).contiguous() - out = xformers.ops.memory_efficient_attention(q1, k1, v) - out = self.proj_out(out) - return x + out - except NotImplementedError: - return cross_attention_attnblock_forward(self, x)