From 2e471071af48e19867cfa522d2def44c24785c50 Mon Sep 17 00:00:00 2001 From: Forkoz <59298527+Ph0rk0z@users.noreply.github.com> Date: Sun, 8 Oct 2023 18:16:48 +0000 Subject: [PATCH] Update llama_attn_hijack.py (#4231) --- modules/llama_attn_hijack.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/llama_attn_hijack.py b/modules/llama_attn_hijack.py index 925cdaa3..e4d1ceab 100644 --- a/modules/llama_attn_hijack.py +++ b/modules/llama_attn_hijack.py @@ -17,6 +17,7 @@ if shared.args.xformers: def hijack_llama_attention(): + import transformers.models.llama.modeling_llama if shared.args.xformers: transformers.models.llama.modeling_llama.LlamaAttention.forward = xformers_forward logger.info("Replaced attention with xformers_attention")