From f513400fdce6569404ae258f6160c8929cef0a80 Mon Sep 17 00:00:00 2001 From: laksjdjf Date: Thu, 7 Dec 2023 15:54:20 +0900 Subject: [PATCH 1/2] Update attention_couple.py --- attention_couple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attention_couple.py b/attention_couple.py index b512ed2..af3067d 100644 --- a/attention_couple.py +++ b/attention_couple.py @@ -88,7 +88,7 @@ class AttentionCouple: if not self.sdxl: for id in [1,2,4,5,7,8]: # id of input_blocks that have cross attention set_model_patch_replace(new_model, self.make_patch(new_model.model.diffusion_model.input_blocks[id][1].transformer_blocks[0].attn2), ("input", id)) - set_model_patch_replace(new_model, self.make_patch(new_model.model.diffusion_model.middle_block[1].transformer_blocks[0].attn2), ("middle", id)) + set_model_patch_replace(new_model, self.make_patch(new_model.model.diffusion_model.middle_block[1].transformer_blocks[0].attn2), ("middle", 0)) for id in [3,4,5,6,7,8,9,10,11]: # id of output_blocks that have cross attention set_model_patch_replace(new_model, self.make_patch(new_model.model.diffusion_model.output_blocks[id][1].transformer_blocks[0].attn2), ("output", id)) else: From 144961511bec26d3880bfe2c1a7f1c187a077f4f Mon Sep 17 00:00:00 2001 From: laksjdjf Date: Mon, 25 Mar 2024 12:38:55 +0900 Subject: [PATCH 2/2] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f611032..de9dba2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # attention-couple-ComfyUI +このプロジェクトはこちらへ移動しました。 +->https://github.com/laksjdjf/cgem156-ComfyUI/tree/main/scripts/attention_couple + プロンプトの領域指定を行うカスタムノードです。ComfyUIにはlatent coupleベースの領域指定法が存在しますが、こちらはUNet内のAttention層で領域分けします。 # 使い方