From 8b6e99fbdd3ec8b169558d603145a208e5b8eaf1 Mon Sep 17 00:00:00 2001 From: sachit3022 Date: Sat, 18 May 2024 19:43:05 -0400 Subject: [PATCH] change type to attn_type, Fixing bug which doesnot have the variable type. Authors have failed to change it to type to attn_type. Curious if cross attn is not used in stable diffusion? --- ldm/modules/diffusionmodules/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldm/modules/diffusionmodules/model.py b/ldm/modules/diffusionmodules/model.py index b089eeb..9a695ea 100644 --- a/ldm/modules/diffusionmodules/model.py +++ b/ldm/modules/diffusionmodules/model.py @@ -288,7 +288,7 @@ def make_attn(in_channels, attn_type="vanilla", attn_kwargs=None): elif attn_type == "vanilla-xformers": print(f"building MemoryEfficientAttnBlock with {in_channels} in_channels...") return MemoryEfficientAttnBlock(in_channels) - elif type == "memory-efficient-cross-attn": + elif attn_type == "memory-efficient-cross-attn": attn_kwargs["query_dim"] = in_channels return MemoryEfficientCrossAttentionWrapper(**attn_kwargs) elif attn_type == "none":