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?

This commit is contained in:
sachit3022 2024-05-18 19:43:05 -04:00
parent cf1d67a6fd
commit 8b6e99fbdd

View file

@ -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":