23 Commits
Author SHA1 Message Date
Rei Koshka 38238ea475 Merge pull request #10 from ComfyNodePRs/licence-update
Update PyProject Toml - License
2024-08-11 01:24:01 +03:00
snomiao 16c88765fd chore(licence-update): Update PyProject Toml - License 2024-07-31 13:43:24 +00:00
Rei Koshka 0785d73e38 Bump version to 0.1.4 2024-07-27 00:19:12 +03:00
Rei Koshka 70cb308c80 Merge pull request #9 from mira-6/bf16-fix
Ensure that q, k, and v dtypes match.
2024-07-27 00:15:38 +03:00
Fox Rayside c39aad681a Merge pull request #1 from mira-6/mira-6-patch-1
Update attention_couple.py
2024-07-25 12:47:10 -04:00
Fox Rayside 6dc99ad241 Update attention_couple.py
Ensure all dtypes match.
2024-07-25 12:45:38 -04:00
Rei Koshka 49e0628e73 Bump version at Comfy Registry configuration to 0.1.3 2024-07-17 01:23:23 +03:00
Rei Koshka d6d788b9ee GH-7 Revert attempt to fix prompt size difference failure 2024-07-17 01:10:07 +03:00
Rei Koshka 4a315ab588 Merge pull request #5 from ComfyNodePRs/publish
Add Github Action for Publishing to Comfy Registry
2024-07-17 00:44:51 +03:00
Rei Koshka 5222fce211 Make publishing to Comfy Registry triggering only on pushing tags 2024-07-17 00:44:24 +03:00
Rei Koshka 8a1d27f028 Merge pull request #4 from ComfyNodePRs/pyproject
Add pyproject.toml for Custom Node Registry
2024-07-17 00:39:07 +03:00
Rei Koshka 3b56ea0413 Set up publishing to Comfy Registry at pyproject.toml 2024-07-17 00:37:22 +03:00
Rei Koshka 29e7a80f35 Set up publishing to Comfy Registry at publish.yml 2024-07-17 00:35:26 +03:00
Rei Koshka d9a4d4aa7c Merge pull request #6 from Danand/fix/prompts-size-difference-failure
GH-3 Try to fix prompts difference failure
2024-07-04 01:22:04 +03:00
snomiao 9f79598370 chore(pyproject): Add pyproject.toml for Custom Node Registry 2024-06-14 06:41:34 +00:00
snomiao 0c61a34a0f chore(publish): Add Github Action for Publishing to Comfy Registry 2024-06-14 06:41:34 +00:00
Rei Koshka 0be0cfb6ef GH-3 Try to fix prompts difference failure
Removes some code which causes failure. Removing doesn't ruin simple workflow at this point.
2024-05-08 02:06:38 +03:00
Rei Koshka ec637689ad Fix missing image in workflow comparison 2024-04-07 00:04:24 +03:00
Rei Koshka 6449e0bfa8 Merge remote-tracking branch 'laksjdjf/main' 2024-04-06 23:45:15 +03:00
Rei Koshka 03218a70a7 Add .DS_Store to .gitignore 2024-04-06 23:41:58 +03:00
laksjdjf 144961511b Update README.md 2024-03-25 12:38:55 +09:00
laksjdjf f513400fdc Update attention_couple.py 2023-12-07 15:54:20 +09:00
Rei Koshka 095a5c11c8 Fix calculation of mask bounds for vertical orientation 2023-11-23 01:48:18 +03:00
6 changed files with 42 additions and 4 deletions
+20
View File
@@ -0,0 +1,20 @@
name: Publish to Comfy registry
on:
workflow_dispatch:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
paths:
- "pyproject.toml"
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@main
with:
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
+1
View File
@@ -1,2 +1,3 @@
**/__pycache__/
*.log
**/.DS_Store
+5 -1
View File
@@ -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:
@@ -141,6 +141,10 @@ class AttentionCouple:
k = torch.cat([k[i].unsqueeze(0).repeat(b,1,1) for i in range(length)], dim=0)
v = torch.cat([v[i].unsqueeze(0).repeat(b,1,1) for i in range(length)], dim=0)
if k.dtype != q_target.dtype or v.dtype != q_target.dtype:
# Ensure all dtypes match
k = k.to(q_target.dtype)
v = v.to(q_target.dtype)
qkv = optimized_attention(q_target, k, v, extra_options["n_heads"])
qkv = qkv * masks
qkv = qkv.view(length, b, -1, module.heads * module.dim_head).sum(dim=0)
+1 -1
View File
@@ -62,7 +62,7 @@ class ComfyCouple:
mask_rect_second_width = width_first
mask_rect_second_height = height
elif orientation == "vertical":
height_first = int(width * center)
height_first = int(height * center)
mask_rect_first_x = 0
mask_rect_first_y = height_first
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 391 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

+13
View File
@@ -0,0 +1,13 @@
[project]
name = "comfyui-comfycouple"
description = "If you want to draw two different characters together without blending their features, so you could try to check out this custom node."
version = "0.1.4"
license = { text = "GNU General Public License v3.0" }
[project.urls]
Repository = "https://github.com/Danand/ComfyUI-ComfyCouple"
[tool.comfy]
PublisherId = "rei---"
DisplayName = "ComfyUI-ComfyCouple"
Icon = ""