TiledAttentionCouple is a custom node for ComfyUI that enables Attention Coupling across horizontal or vertical tiles. It allows fine(r)-grained control of prompts across different sections of the image. This is especially useful in scenarios where multiple subjects or themes need to coexist in an image without blending them.
- 1.3 - Added optional tile shuffling.
- 1.2 - Added integration for Impact Pack detailers.
- 1.1 - Improved return names and error feedback.
- 1.0 - Initial release.
Navigate to your ComfyUI custom_nodes directory:
cd /path/to/comfyui/custom_nodes
Clone the repository:
git clone https://github.com/Deathspike/ComfyUI-TiledAttentionCouple
Restart ComfyUI to load the new nodes.
Follow these steps to integrate Tiled Attention Couple into your workflow:
- Replace positive and negative prompt with Tiled Attention Couple (Prompt).
- Add Tiled Attention Couple. Match
widthandheightproperties to output. - Connect Tiled Attention Couple (Prompt) to Tiled Attention Couple.
- Connect Tiled Attention Couple with an input model and clip.
- Use Tiled Attention Couple output model and conditionings.
For Impact Pack integration with FaceDetailer, follow these additional steps:
- Add Tiled Attention Couple (Impact Pack Detailer).
- Connect Tiled Attention Couple (Impact Pack Detailer) to FaceDetailer
detailer_hook. - Connect Tiled Attention Couple (Prompt) to Tiled Attention Couple (Impact Pack Detailer).
- Connect Tiled Attention Couple (Impact Pack Detailer) with an input model and clip.
TiledAttentionCouple slices the image into horizontal or vertical tiles based on your chosen division and orientation. The division is a comma-seperated string representing each tile, where each number represents the relative size of that specific tile:
1,1→ two equally-sized tiles.1,2→ two tiles, the second is twice as large as the first.1,1,1→ three equally-sized tiles.
The orientation determines how the tiles are divided: horizontal places tiles side by side (left to right), while vertical stacks them on top of each other (top to bottom):
1,2horizontal → right tile is twice as large as the left tile.1,2vertical → bottom tile is twice as large as the top tile.
Prompts start with a common prompt that applies to the entire image. After this, you can add tile prompts by separating them with the keyword BREAK. Each BREAK corresponds to a tile in sequential order, from left to right (for horizontal) or top to bottom (for vertical).
All previews come with ComfyUI workflows for reference and reproducibility. The showcased results were generated using my NanoMix v13 model.
2girls, side-by-side,
masterpiece, best quality,
BREAK
takamachi nanoha, short twintails,
red dress,
BREAK
fate testarossa, straight hair,
blue dress,
The common prompt 2girls, side-by-side, masterpiece, best quality is applied to the entire image. Using a division of 1,1 and horizontal orientation, the left tile receives the tile prompt takamachi nanoha, short twintails, red dress, while the right tile receives fate testarossa, straight hair, blue dress:
3girls, side-by-side,
masterpiece, best quality,
BREAK
takamachi nanoha, short twintails,
red dress,
BREAK
fate testarossa, straight hair,
blue dress,
BREAK
yagami hayate,
white dress,
The common prompt 3girls, side-by-side, masterpiece, best quality is applied to the entire image. Using a division of 1,1,1 and horizontal orientation, the left tile receives the tile prompt takamachi nanoha, short twintails, red dress, the middle tile receives fate testarossa, straight hair, blue dress, while the right tile receives yagami hayate, white dress:
2girls,
maid, cafe,
masterpiece, best quality,
BREAK
takamachi nanoha, short twintails,
light smile,
BREAK
fate testarossa, straight hair,
nose blush,
The common prompt 2girls, maid, cafe, masterpiece, best quality is applied to the entire image. Using a division of 1,1 and horizontal orientation, the left tile receives the tile prompt takamachi nanoha, short twintails, light smile, while the right tile receives fate testarossa, straight hair, nose blush. Faces are then improved with FaceDetailer:
3girls, side-by-side, upper body,
blue sky,
masterpiece, best quality,
BREAK
fate testarossa, straight hair,
blue dress,
nose blush, averting eyes,
BREAK
takamachi nanoha, short twintails,
red dress,
closed eyes,
BREAK
yagami hayate,
white dress,
naughty face, smug,
The common prompt 3girls, side-by-side, upper body, blue sky, masterpiece, best quality is applied to the entire image. Using a division of 1,0.75,1 and horizontal orientation, the left tile receives the tile prompt fate testarossa, straight hair, blue dress, nose blush, averting eyes, the middle tile receives takamachi nanoha, short twintails, red dress, closed eyes, while the right tile receives yagami hayate, white dress, naughty face, smug:
If you enjoy TiledAttentionCouple, check out more of my work:
- 👉 Civitai: https://civitai.com/user/Deathspike
- 🛠️ GitHub: https://github.com/Deathspike
Got questions or want to show off something you made with TiledAttentionCouple?
- 💬 Join our anime Discord. I’m @Deathspike, and I’d love to hear from you!
"Every tile begins with the foundation laid by others."
- @laksjdjf/attention-couple-ComfyUI for Attention Couple implementation.
- @Danand/ComfyUI-ComfyCouple for inspiration on using masks for tiles.
- @hako-mikan/sd-webui-regional-prompter for inspiration on tile configuration.



