gartajackhats1985 commited on
Commit
deb4eee
·
verified ·
1 Parent(s): f004f3b

Upload 40 files

Browse files
Files changed (40) hide show
  1. ComfyUI_IPAdapter_plus/.github/FUNDING.yml +4 -0
  2. ComfyUI_IPAdapter_plus/.github/workflows/publish.yml +21 -0
  3. ComfyUI_IPAdapter_plus/.gitignore +4 -0
  4. ComfyUI_IPAdapter_plus/CrossAttentionPatch.py +209 -0
  5. ComfyUI_IPAdapter_plus/IPAdapterPlus.py +2013 -0
  6. ComfyUI_IPAdapter_plus/LICENSE +674 -0
  7. ComfyUI_IPAdapter_plus/NODES.md +54 -0
  8. ComfyUI_IPAdapter_plus/README.md +184 -0
  9. ComfyUI_IPAdapter_plus/__init__.py +19 -0
  10. ComfyUI_IPAdapter_plus/__pycache__/CrossAttentionPatch.cpython-312.pyc +0 -0
  11. ComfyUI_IPAdapter_plus/__pycache__/IPAdapterPlus.cpython-312.pyc +0 -0
  12. ComfyUI_IPAdapter_plus/__pycache__/__init__.cpython-312.pyc +0 -0
  13. ComfyUI_IPAdapter_plus/__pycache__/image_proj_models.cpython-312.pyc +0 -0
  14. ComfyUI_IPAdapter_plus/__pycache__/utils.cpython-312.pyc +0 -0
  15. ComfyUI_IPAdapter_plus/examples/IPAdapter_FaceIDv2_Kolors.json +852 -0
  16. ComfyUI_IPAdapter_plus/examples/demo_workflow.jpg +0 -0
  17. ComfyUI_IPAdapter_plus/examples/ipadapter_advanced.json +619 -0
  18. ComfyUI_IPAdapter_plus/examples/ipadapter_clipvision_enhancer.json +918 -0
  19. ComfyUI_IPAdapter_plus/examples/ipadapter_combine_embeds.json +1542 -0
  20. ComfyUI_IPAdapter_plus/examples/ipadapter_cosxl_edit.json +1624 -0
  21. ComfyUI_IPAdapter_plus/examples/ipadapter_faceid.json +566 -0
  22. ComfyUI_IPAdapter_plus/examples/ipadapter_faceid_batch.json +1023 -0
  23. ComfyUI_IPAdapter_plus/examples/ipadapter_ideal_faceid_config.json +728 -0
  24. ComfyUI_IPAdapter_plus/examples/ipadapter_kolors.json +680 -0
  25. ComfyUI_IPAdapter_plus/examples/ipadapter_negative_image.json +956 -0
  26. ComfyUI_IPAdapter_plus/examples/ipadapter_noise_injection.json +677 -0
  27. ComfyUI_IPAdapter_plus/examples/ipadapter_portrait.json +567 -0
  28. ComfyUI_IPAdapter_plus/examples/ipadapter_precise_composition.json +861 -0
  29. ComfyUI_IPAdapter_plus/examples/ipadapter_precise_weight_type.json +965 -0
  30. ComfyUI_IPAdapter_plus/examples/ipadapter_regional_conditioning.json +1512 -0
  31. ComfyUI_IPAdapter_plus/examples/ipadapter_simple.json +546 -0
  32. ComfyUI_IPAdapter_plus/examples/ipadapter_style_composition.json +612 -0
  33. ComfyUI_IPAdapter_plus/examples/ipadapter_tiled.json +583 -0
  34. ComfyUI_IPAdapter_plus/examples/ipadapter_weight_types.json +1738 -0
  35. ComfyUI_IPAdapter_plus/examples/ipadapter_weighted_embeds.json +836 -0
  36. ComfyUI_IPAdapter_plus/examples/ipadapter_weights.json +764 -0
  37. ComfyUI_IPAdapter_plus/image_proj_models.py +275 -0
  38. ComfyUI_IPAdapter_plus/models/legacy_directory_do_not_use.txt +0 -0
  39. ComfyUI_IPAdapter_plus/pyproject.toml +14 -0
  40. ComfyUI_IPAdapter_plus/utils.py +388 -0
ComfyUI_IPAdapter_plus/.github/FUNDING.yml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # These are supported funding model platforms
2
+
3
+ github: cubiq
4
+ custom: ['https://www.paypal.com/paypalme/matt3o']
ComfyUI_IPAdapter_plus/.github/workflows/publish.yml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Publish to Comfy registry
2
+ on:
3
+ workflow_dispatch:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - "pyproject.toml"
9
+
10
+ jobs:
11
+ publish-node:
12
+ name: Publish Custom Node to registry
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Check out code
16
+ uses: actions/checkout@v4
17
+ - name: Publish Custom Node
18
+ uses: Comfy-Org/publish-node-action@main
19
+ with:
20
+ ## Add your own personal access token to your Github Repository secrets and reference it here.
21
+ personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
ComfyUI_IPAdapter_plus/.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ /__pycache__/
2
+ /models/*.bin
3
+ /models/*.safetensors
4
+ .directory
ComfyUI_IPAdapter_plus/CrossAttentionPatch.py ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import math
3
+ import torch.nn.functional as F
4
+ from comfy.ldm.modules.attention import optimized_attention
5
+ from .utils import tensor_to_size
6
+
7
+ class Attn2Replace:
8
+ def __init__(self, callback=None, **kwargs):
9
+ self.callback = [callback]
10
+ self.kwargs = [kwargs]
11
+
12
+ def add(self, callback, **kwargs):
13
+ self.callback.append(callback)
14
+ self.kwargs.append(kwargs)
15
+
16
+ for key, value in kwargs.items():
17
+ setattr(self, key, value)
18
+
19
+ def __call__(self, q, k, v, extra_options):
20
+ dtype = q.dtype
21
+ out = optimized_attention(q, k, v, extra_options["n_heads"])
22
+ sigma = extra_options["sigmas"].detach().cpu()[0].item() if 'sigmas' in extra_options else 999999999.9
23
+
24
+ for i, callback in enumerate(self.callback):
25
+ if sigma <= self.kwargs[i]["sigma_start"] and sigma >= self.kwargs[i]["sigma_end"]:
26
+ out = out + callback(out, q, k, v, extra_options, **self.kwargs[i])
27
+
28
+ return out.to(dtype=dtype)
29
+
30
+ def ipadapter_attention(out, q, k, v, extra_options, module_key='', ipadapter=None, weight=1.0, cond=None, cond_alt=None, uncond=None, weight_type="linear", mask=None, sigma_start=0.0, sigma_end=1.0, unfold_batch=False, embeds_scaling='V only', **kwargs):
31
+ dtype = q.dtype
32
+ cond_or_uncond = extra_options["cond_or_uncond"]
33
+ block_type = extra_options["block"][0]
34
+ #block_id = extra_options["block"][1]
35
+ t_idx = extra_options["transformer_index"]
36
+ layers = 11 if '101_to_k_ip' in ipadapter.ip_layers.to_kvs else 16
37
+ k_key = module_key + "_to_k_ip"
38
+ v_key = module_key + "_to_v_ip"
39
+
40
+ # extra options for AnimateDiff
41
+ ad_params = extra_options['ad_params'] if "ad_params" in extra_options else None
42
+
43
+ b = q.shape[0]
44
+ seq_len = q.shape[1]
45
+ batch_prompt = b // len(cond_or_uncond)
46
+ _, _, oh, ow = extra_options["original_shape"]
47
+
48
+ if weight_type == 'ease in':
49
+ weight = weight * (0.05 + 0.95 * (1 - t_idx / layers))
50
+ elif weight_type == 'ease out':
51
+ weight = weight * (0.05 + 0.95 * (t_idx / layers))
52
+ elif weight_type == 'ease in-out':
53
+ weight = weight * (0.05 + 0.95 * (1 - abs(t_idx - (layers/2)) / (layers/2)))
54
+ elif weight_type == 'reverse in-out':
55
+ weight = weight * (0.05 + 0.95 * (abs(t_idx - (layers/2)) / (layers/2)))
56
+ elif weight_type == 'weak input' and block_type == 'input':
57
+ weight = weight * 0.2
58
+ elif weight_type == 'weak middle' and block_type == 'middle':
59
+ weight = weight * 0.2
60
+ elif weight_type == 'weak output' and block_type == 'output':
61
+ weight = weight * 0.2
62
+ elif weight_type == 'strong middle' and (block_type == 'input' or block_type == 'output'):
63
+ weight = weight * 0.2
64
+ elif isinstance(weight, dict):
65
+ if t_idx not in weight:
66
+ return 0
67
+
68
+ if weight_type == "style transfer precise":
69
+ if layers == 11 and t_idx == 3:
70
+ uncond = cond
71
+ cond = cond * 0
72
+ elif layers == 16 and (t_idx == 4 or t_idx == 5):
73
+ uncond = cond
74
+ cond = cond * 0
75
+ elif weight_type == "composition precise":
76
+ if layers == 11 and t_idx != 3:
77
+ uncond = cond
78
+ cond = cond * 0
79
+ elif layers == 16 and (t_idx != 4 and t_idx != 5):
80
+ uncond = cond
81
+ cond = cond * 0
82
+
83
+ weight = weight[t_idx]
84
+
85
+ if cond_alt is not None and t_idx in cond_alt:
86
+ cond = cond_alt[t_idx]
87
+ del cond_alt
88
+
89
+ if unfold_batch:
90
+ # Check AnimateDiff context window
91
+ if ad_params is not None and ad_params["sub_idxs"] is not None:
92
+ if isinstance(weight, torch.Tensor):
93
+ weight = tensor_to_size(weight, ad_params["full_length"])
94
+ weight = torch.Tensor(weight[ad_params["sub_idxs"]])
95
+ if torch.all(weight == 0):
96
+ return 0
97
+ weight = weight.repeat(len(cond_or_uncond), 1, 1) # repeat for cond and uncond
98
+ elif weight == 0:
99
+ return 0
100
+
101
+ # if image length matches or exceeds full_length get sub_idx images
102
+ if cond.shape[0] >= ad_params["full_length"]:
103
+ cond = torch.Tensor(cond[ad_params["sub_idxs"]])
104
+ uncond = torch.Tensor(uncond[ad_params["sub_idxs"]])
105
+ # otherwise get sub_idxs images
106
+ else:
107
+ cond = tensor_to_size(cond, ad_params["full_length"])
108
+ uncond = tensor_to_size(uncond, ad_params["full_length"])
109
+ cond = cond[ad_params["sub_idxs"]]
110
+ uncond = uncond[ad_params["sub_idxs"]]
111
+ else:
112
+ if isinstance(weight, torch.Tensor):
113
+ weight = tensor_to_size(weight, batch_prompt)
114
+ if torch.all(weight == 0):
115
+ return 0
116
+ weight = weight.repeat(len(cond_or_uncond), 1, 1) # repeat for cond and uncond
117
+ elif weight == 0:
118
+ return 0
119
+
120
+ cond = tensor_to_size(cond, batch_prompt)
121
+ uncond = tensor_to_size(uncond, batch_prompt)
122
+
123
+ k_cond = ipadapter.ip_layers.to_kvs[k_key](cond)
124
+ k_uncond = ipadapter.ip_layers.to_kvs[k_key](uncond)
125
+ v_cond = ipadapter.ip_layers.to_kvs[v_key](cond)
126
+ v_uncond = ipadapter.ip_layers.to_kvs[v_key](uncond)
127
+ else:
128
+ # TODO: should we always convert the weights to a tensor?
129
+ if isinstance(weight, torch.Tensor):
130
+ weight = tensor_to_size(weight, batch_prompt)
131
+ if torch.all(weight == 0):
132
+ return 0
133
+ weight = weight.repeat(len(cond_or_uncond), 1, 1) # repeat for cond and uncond
134
+ elif weight == 0:
135
+ return 0
136
+
137
+ k_cond = ipadapter.ip_layers.to_kvs[k_key](cond).repeat(batch_prompt, 1, 1)
138
+ k_uncond = ipadapter.ip_layers.to_kvs[k_key](uncond).repeat(batch_prompt, 1, 1)
139
+ v_cond = ipadapter.ip_layers.to_kvs[v_key](cond).repeat(batch_prompt, 1, 1)
140
+ v_uncond = ipadapter.ip_layers.to_kvs[v_key](uncond).repeat(batch_prompt, 1, 1)
141
+
142
+ if len(cond_or_uncond) == 3: # TODO: cosxl, I need to check this
143
+ ip_k = torch.cat([(k_cond, k_uncond, k_cond)[i] for i in cond_or_uncond], dim=0)
144
+ ip_v = torch.cat([(v_cond, v_uncond, v_cond)[i] for i in cond_or_uncond], dim=0)
145
+ else:
146
+ ip_k = torch.cat([(k_cond, k_uncond)[i] for i in cond_or_uncond], dim=0)
147
+ ip_v = torch.cat([(v_cond, v_uncond)[i] for i in cond_or_uncond], dim=0)
148
+
149
+ if embeds_scaling == 'K+mean(V) w/ C penalty':
150
+ scaling = float(ip_k.shape[2]) / 1280.0
151
+ weight = weight * scaling
152
+ ip_k = ip_k * weight
153
+ ip_v_mean = torch.mean(ip_v, dim=1, keepdim=True)
154
+ ip_v = (ip_v - ip_v_mean) + ip_v_mean * weight
155
+ out_ip = optimized_attention(q, ip_k, ip_v, extra_options["n_heads"])
156
+ del ip_v_mean
157
+ elif embeds_scaling == 'K+V w/ C penalty':
158
+ scaling = float(ip_k.shape[2]) / 1280.0
159
+ weight = weight * scaling
160
+ ip_k = ip_k * weight
161
+ ip_v = ip_v * weight
162
+ out_ip = optimized_attention(q, ip_k, ip_v, extra_options["n_heads"])
163
+ elif embeds_scaling == 'K+V':
164
+ ip_k = ip_k * weight
165
+ ip_v = ip_v * weight
166
+ out_ip = optimized_attention(q, ip_k, ip_v, extra_options["n_heads"])
167
+ else:
168
+ #ip_v = ip_v * weight
169
+ out_ip = optimized_attention(q, ip_k, ip_v, extra_options["n_heads"])
170
+ out_ip = out_ip * weight # I'm doing this to get the same results as before
171
+
172
+ if mask is not None:
173
+ mask_h = oh / math.sqrt(oh * ow / seq_len)
174
+ mask_h = int(mask_h) + int((seq_len % int(mask_h)) != 0)
175
+ mask_w = seq_len // mask_h
176
+
177
+ # check if using AnimateDiff and sliding context window
178
+ if (mask.shape[0] > 1 and ad_params is not None and ad_params["sub_idxs"] is not None):
179
+ # if mask length matches or exceeds full_length, get sub_idx masks
180
+ if mask.shape[0] >= ad_params["full_length"]:
181
+ mask = torch.Tensor(mask[ad_params["sub_idxs"]])
182
+ mask = F.interpolate(mask.unsqueeze(1), size=(mask_h, mask_w), mode="bilinear").squeeze(1)
183
+ else:
184
+ mask = F.interpolate(mask.unsqueeze(1), size=(mask_h, mask_w), mode="bilinear").squeeze(1)
185
+ mask = tensor_to_size(mask, ad_params["full_length"])
186
+ mask = mask[ad_params["sub_idxs"]]
187
+ else:
188
+ mask = F.interpolate(mask.unsqueeze(1), size=(mask_h, mask_w), mode="bilinear").squeeze(1)
189
+ mask = tensor_to_size(mask, batch_prompt)
190
+
191
+ mask = mask.repeat(len(cond_or_uncond), 1, 1)
192
+ mask = mask.view(mask.shape[0], -1, 1).repeat(1, 1, out.shape[2])
193
+
194
+ # covers cases where extreme aspect ratios can cause the mask to have a wrong size
195
+ mask_len = mask_h * mask_w
196
+ if mask_len < seq_len:
197
+ pad_len = seq_len - mask_len
198
+ pad1 = pad_len // 2
199
+ pad2 = pad_len - pad1
200
+ mask = F.pad(mask, (0, 0, pad1, pad2), value=0.0)
201
+ elif mask_len > seq_len:
202
+ crop_start = (mask_len - seq_len) // 2
203
+ mask = mask[:, crop_start:crop_start+seq_len, :]
204
+
205
+ out_ip = out_ip * mask
206
+
207
+ #out = out + out_ip
208
+
209
+ return out_ip.to(dtype=dtype)
ComfyUI_IPAdapter_plus/IPAdapterPlus.py ADDED
@@ -0,0 +1,2013 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import os
3
+ import math
4
+ import folder_paths
5
+
6
+ import comfy.model_management as model_management
7
+ from node_helpers import conditioning_set_values
8
+ from comfy.clip_vision import load as load_clip_vision
9
+ from comfy.sd import load_lora_for_models
10
+ import comfy.utils
11
+
12
+ import torch.nn as nn
13
+ from PIL import Image
14
+ try:
15
+ import torchvision.transforms.v2 as T
16
+ except ImportError:
17
+ import torchvision.transforms as T
18
+
19
+ from .image_proj_models import MLPProjModel, MLPProjModelFaceId, ProjModelFaceIdPlus, Resampler, ImageProjModel
20
+ from .CrossAttentionPatch import Attn2Replace, ipadapter_attention
21
+ from .utils import (
22
+ encode_image_masked,
23
+ tensor_to_size,
24
+ contrast_adaptive_sharpening,
25
+ tensor_to_image,
26
+ image_to_tensor,
27
+ ipadapter_model_loader,
28
+ insightface_loader,
29
+ get_clipvision_file,
30
+ get_ipadapter_file,
31
+ get_lora_file,
32
+ )
33
+
34
+ # set the models directory
35
+ if "ipadapter" not in folder_paths.folder_names_and_paths:
36
+ current_paths = [os.path.join(folder_paths.models_dir, "ipadapter")]
37
+ else:
38
+ current_paths, _ = folder_paths.folder_names_and_paths["ipadapter"]
39
+ folder_paths.folder_names_and_paths["ipadapter"] = (current_paths, folder_paths.supported_pt_extensions)
40
+
41
+ WEIGHT_TYPES = ["linear", "ease in", "ease out", 'ease in-out', 'reverse in-out', 'weak input', 'weak output', 'weak middle', 'strong middle', 'style transfer', 'composition', 'strong style transfer', 'style and composition', 'style transfer precise', 'composition precise']
42
+
43
+ """
44
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45
+ Main IPAdapter Class
46
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47
+ """
48
+ class IPAdapter(nn.Module):
49
+ def __init__(self, ipadapter_model, cross_attention_dim=1024, output_cross_attention_dim=1024, clip_embeddings_dim=1024, clip_extra_context_tokens=4, is_sdxl=False, is_plus=False, is_full=False, is_faceid=False, is_portrait_unnorm=False, is_kwai_kolors=False, encoder_hid_proj=None, weight_kolors=1.0):
50
+ super().__init__()
51
+
52
+ self.clip_embeddings_dim = clip_embeddings_dim
53
+ self.cross_attention_dim = cross_attention_dim
54
+ self.output_cross_attention_dim = output_cross_attention_dim
55
+ self.clip_extra_context_tokens = clip_extra_context_tokens
56
+ self.is_sdxl = is_sdxl
57
+ self.is_full = is_full
58
+ self.is_plus = is_plus
59
+ self.is_portrait_unnorm = is_portrait_unnorm
60
+ self.is_kwai_kolors = is_kwai_kolors
61
+
62
+ if is_faceid and not is_portrait_unnorm:
63
+ self.image_proj_model = self.init_proj_faceid()
64
+ elif is_full:
65
+ self.image_proj_model = self.init_proj_full()
66
+ elif is_plus or is_portrait_unnorm:
67
+ self.image_proj_model = self.init_proj_plus()
68
+ else:
69
+ self.image_proj_model = self.init_proj()
70
+
71
+ self.image_proj_model.load_state_dict(ipadapter_model["image_proj"])
72
+ self.ip_layers = To_KV(ipadapter_model["ip_adapter"], encoder_hid_proj=encoder_hid_proj, weight_kolors=weight_kolors)
73
+
74
+ def init_proj(self):
75
+ image_proj_model = ImageProjModel(
76
+ cross_attention_dim=self.cross_attention_dim,
77
+ clip_embeddings_dim=self.clip_embeddings_dim,
78
+ clip_extra_context_tokens=self.clip_extra_context_tokens
79
+ )
80
+ return image_proj_model
81
+
82
+ def init_proj_plus(self):
83
+ image_proj_model = Resampler(
84
+ dim=self.cross_attention_dim,
85
+ depth=4,
86
+ dim_head=64,
87
+ heads=20 if self.is_sdxl and not self.is_kwai_kolors else 12,
88
+ num_queries=self.clip_extra_context_tokens,
89
+ embedding_dim=self.clip_embeddings_dim,
90
+ output_dim=self.output_cross_attention_dim,
91
+ ff_mult=4
92
+ )
93
+ return image_proj_model
94
+
95
+ def init_proj_full(self):
96
+ image_proj_model = MLPProjModel(
97
+ cross_attention_dim=self.cross_attention_dim,
98
+ clip_embeddings_dim=self.clip_embeddings_dim
99
+ )
100
+ return image_proj_model
101
+
102
+ def init_proj_faceid(self):
103
+ if self.is_plus:
104
+ image_proj_model = ProjModelFaceIdPlus(
105
+ cross_attention_dim=self.cross_attention_dim,
106
+ id_embeddings_dim=512,
107
+ clip_embeddings_dim=self.clip_embeddings_dim,
108
+ num_tokens=self.clip_extra_context_tokens,
109
+ )
110
+ else:
111
+ image_proj_model = MLPProjModelFaceId(
112
+ cross_attention_dim=self.cross_attention_dim,
113
+ id_embeddings_dim=512,
114
+ num_tokens=self.clip_extra_context_tokens,
115
+ )
116
+ return image_proj_model
117
+
118
+ @torch.inference_mode()
119
+ def get_image_embeds(self, clip_embed, clip_embed_zeroed, batch_size):
120
+ torch_device = model_management.get_torch_device()
121
+ intermediate_device = model_management.intermediate_device()
122
+
123
+ if batch_size == 0:
124
+ batch_size = clip_embed.shape[0]
125
+ intermediate_device = torch_device
126
+ elif batch_size > clip_embed.shape[0]:
127
+ batch_size = clip_embed.shape[0]
128
+
129
+ clip_embed = torch.split(clip_embed, batch_size, dim=0)
130
+ clip_embed_zeroed = torch.split(clip_embed_zeroed, batch_size, dim=0)
131
+
132
+ image_prompt_embeds = []
133
+ uncond_image_prompt_embeds = []
134
+
135
+ for ce, cez in zip(clip_embed, clip_embed_zeroed):
136
+ image_prompt_embeds.append(self.image_proj_model(ce.to(torch_device)).to(intermediate_device))
137
+ uncond_image_prompt_embeds.append(self.image_proj_model(cez.to(torch_device)).to(intermediate_device))
138
+
139
+ del clip_embed, clip_embed_zeroed
140
+
141
+ image_prompt_embeds = torch.cat(image_prompt_embeds, dim=0)
142
+ uncond_image_prompt_embeds = torch.cat(uncond_image_prompt_embeds, dim=0)
143
+
144
+ torch.cuda.empty_cache()
145
+
146
+ #image_prompt_embeds = self.image_proj_model(clip_embed)
147
+ #uncond_image_prompt_embeds = self.image_proj_model(clip_embed_zeroed)
148
+ return image_prompt_embeds, uncond_image_prompt_embeds
149
+
150
+ @torch.inference_mode()
151
+ def get_image_embeds_faceid_plus(self, face_embed, clip_embed, s_scale, shortcut, batch_size):
152
+ torch_device = model_management.get_torch_device()
153
+ intermediate_device = model_management.intermediate_device()
154
+
155
+ if batch_size == 0:
156
+ batch_size = clip_embed.shape[0]
157
+ intermediate_device = torch_device
158
+ elif batch_size > clip_embed.shape[0]:
159
+ batch_size = clip_embed.shape[0]
160
+
161
+ face_embed_batch = torch.split(face_embed, batch_size, dim=0)
162
+ clip_embed_batch = torch.split(clip_embed, batch_size, dim=0)
163
+
164
+ embeds = []
165
+ for face_embed, clip_embed in zip(face_embed_batch, clip_embed_batch):
166
+ embeds.append(self.image_proj_model(face_embed.to(torch_device), clip_embed.to(torch_device), scale=s_scale, shortcut=shortcut).to(intermediate_device))
167
+
168
+ embeds = torch.cat(embeds, dim=0)
169
+ del face_embed_batch, clip_embed_batch
170
+ torch.cuda.empty_cache()
171
+ #embeds = self.image_proj_model(face_embed, clip_embed, scale=s_scale, shortcut=shortcut)
172
+ return embeds
173
+
174
+ class To_KV(nn.Module):
175
+ def __init__(self, state_dict, encoder_hid_proj=None, weight_kolors=1.0):
176
+ super().__init__()
177
+
178
+ if encoder_hid_proj is not None:
179
+ hid_proj = nn.Linear(encoder_hid_proj["weight"].shape[1], encoder_hid_proj["weight"].shape[0], bias=True)
180
+ hid_proj.weight.data = encoder_hid_proj["weight"] * weight_kolors
181
+ hid_proj.bias.data = encoder_hid_proj["bias"] * weight_kolors
182
+
183
+ self.to_kvs = nn.ModuleDict()
184
+ for key, value in state_dict.items():
185
+ if encoder_hid_proj is not None:
186
+ linear_proj = nn.Linear(value.shape[1], value.shape[0], bias=False)
187
+ linear_proj.weight.data = value
188
+ self.to_kvs[key.replace(".weight", "").replace(".", "_")] = nn.Sequential(hid_proj, linear_proj)
189
+ else:
190
+ self.to_kvs[key.replace(".weight", "").replace(".", "_")] = nn.Linear(value.shape[1], value.shape[0], bias=False)
191
+ self.to_kvs[key.replace(".weight", "").replace(".", "_")].weight.data = value
192
+
193
+ def set_model_patch_replace(model, patch_kwargs, key):
194
+ to = model.model_options["transformer_options"].copy()
195
+ if "patches_replace" not in to:
196
+ to["patches_replace"] = {}
197
+ else:
198
+ to["patches_replace"] = to["patches_replace"].copy()
199
+
200
+ if "attn2" not in to["patches_replace"]:
201
+ to["patches_replace"]["attn2"] = {}
202
+ else:
203
+ to["patches_replace"]["attn2"] = to["patches_replace"]["attn2"].copy()
204
+
205
+ if key not in to["patches_replace"]["attn2"]:
206
+ to["patches_replace"]["attn2"][key] = Attn2Replace(ipadapter_attention, **patch_kwargs)
207
+ model.model_options["transformer_options"] = to
208
+ else:
209
+ to["patches_replace"]["attn2"][key].add(ipadapter_attention, **patch_kwargs)
210
+
211
+ def ipadapter_execute(model,
212
+ ipadapter,
213
+ clipvision,
214
+ insightface=None,
215
+ image=None,
216
+ image_composition=None,
217
+ image_negative=None,
218
+ weight=1.0,
219
+ weight_composition=1.0,
220
+ weight_faceidv2=None,
221
+ weight_kolors=1.0,
222
+ weight_type="linear",
223
+ combine_embeds="concat",
224
+ start_at=0.0,
225
+ end_at=1.0,
226
+ attn_mask=None,
227
+ pos_embed=None,
228
+ neg_embed=None,
229
+ unfold_batch=False,
230
+ embeds_scaling='V only',
231
+ layer_weights=None,
232
+ encode_batch_size=0,
233
+ style_boost=None,
234
+ composition_boost=None,
235
+ enhance_tiles=1,
236
+ enhance_ratio=1.0,):
237
+ device = model_management.get_torch_device()
238
+ dtype = model_management.unet_dtype()
239
+ if dtype not in [torch.float32, torch.float16, torch.bfloat16]:
240
+ dtype = torch.float16 if model_management.should_use_fp16() else torch.float32
241
+
242
+ is_full = "proj.3.weight" in ipadapter["image_proj"]
243
+ is_portrait_unnorm = "portraitunnorm" in ipadapter
244
+ is_plus = (is_full or "latents" in ipadapter["image_proj"] or "perceiver_resampler.proj_in.weight" in ipadapter["image_proj"]) and not is_portrait_unnorm
245
+ output_cross_attention_dim = ipadapter["ip_adapter"]["1.to_k_ip.weight"].shape[1]
246
+ is_sdxl = output_cross_attention_dim == 2048
247
+ is_kwai_kolors_faceid = "perceiver_resampler.layers.0.0.to_out.weight" in ipadapter["image_proj"] and ipadapter["image_proj"]["perceiver_resampler.layers.0.0.to_out.weight"].shape[0] == 4096
248
+ is_faceidv2 = "faceidplusv2" in ipadapter or is_kwai_kolors_faceid
249
+ is_kwai_kolors = (is_sdxl and "layers.0.0.to_out.weight" in ipadapter["image_proj"] and ipadapter["image_proj"]["layers.0.0.to_out.weight"].shape[0] == 2048) or is_kwai_kolors_faceid
250
+ is_portrait = "proj.2.weight" in ipadapter["image_proj"] and not "proj.3.weight" in ipadapter["image_proj"] and not "0.to_q_lora.down.weight" in ipadapter["ip_adapter"] and not is_kwai_kolors_faceid
251
+ is_faceid = is_portrait or "0.to_q_lora.down.weight" in ipadapter["ip_adapter"] or is_portrait_unnorm or is_kwai_kolors_faceid
252
+
253
+ if is_faceid and not insightface:
254
+ raise Exception("insightface model is required for FaceID models")
255
+
256
+ if is_faceidv2:
257
+ weight_faceidv2 = weight_faceidv2 if weight_faceidv2 is not None else weight*2
258
+
259
+ if is_kwai_kolors_faceid:
260
+ cross_attention_dim = 4096
261
+ elif is_kwai_kolors:
262
+ cross_attention_dim = 2048
263
+ elif (is_plus and is_sdxl and not is_faceid) or is_portrait_unnorm:
264
+ cross_attention_dim = 1280
265
+ else:
266
+ cross_attention_dim = output_cross_attention_dim
267
+
268
+ if is_kwai_kolors_faceid:
269
+ clip_extra_context_tokens = 6
270
+ elif (is_plus and not is_faceid) or is_portrait or is_portrait_unnorm:
271
+ clip_extra_context_tokens = 16
272
+ else:
273
+ clip_extra_context_tokens = 4
274
+
275
+ if image is not None and image.shape[1] != image.shape[2]:
276
+ print("\033[33mINFO: the IPAdapter reference image is not a square, CLIPImageProcessor will resize and crop it at the center. If the main focus of the picture is not in the middle the result might not be what you are expecting.\033[0m")
277
+
278
+ if isinstance(weight, list):
279
+ weight = torch.tensor(weight).unsqueeze(-1).unsqueeze(-1).to(device, dtype=dtype) if unfold_batch else weight[0]
280
+
281
+ if style_boost is not None:
282
+ weight_type = "style transfer precise"
283
+ elif composition_boost is not None:
284
+ weight_type = "composition precise"
285
+
286
+ # special weight types
287
+ if layer_weights is not None and layer_weights != '':
288
+ weight = { int(k): float(v)*weight for k, v in [x.split(":") for x in layer_weights.split(",")] }
289
+ weight_type = weight_type if weight_type == "style transfer precise" or weight_type == "composition precise" else "linear"
290
+ elif weight_type == "style transfer":
291
+ weight = { 6:weight } if is_sdxl else { 0:weight, 1:weight, 2:weight, 3:weight, 9:weight, 10:weight, 11:weight, 12:weight, 13:weight, 14:weight, 15:weight }
292
+ elif weight_type == "composition":
293
+ weight = { 3:weight } if is_sdxl else { 4:weight*0.25, 5:weight }
294
+ elif weight_type == "strong style transfer":
295
+ if is_sdxl:
296
+ weight = { 0:weight, 1:weight, 2:weight, 4:weight, 5:weight, 6:weight, 7:weight, 8:weight, 9:weight, 10:weight }
297
+ else:
298
+ weight = { 0:weight, 1:weight, 2:weight, 3:weight, 6:weight, 7:weight, 8:weight, 9:weight, 10:weight, 11:weight, 12:weight, 13:weight, 14:weight, 15:weight }
299
+ elif weight_type == "style and composition":
300
+ if is_sdxl:
301
+ weight = { 3:weight_composition, 6:weight }
302
+ else:
303
+ weight = { 0:weight, 1:weight, 2:weight, 3:weight, 4:weight_composition*0.25, 5:weight_composition, 9:weight, 10:weight, 11:weight, 12:weight, 13:weight, 14:weight, 15:weight }
304
+ elif weight_type == "strong style and composition":
305
+ if is_sdxl:
306
+ weight = { 0:weight, 1:weight, 2:weight, 3:weight_composition, 4:weight, 5:weight, 6:weight, 7:weight, 8:weight, 9:weight, 10:weight }
307
+ else:
308
+ weight = { 0:weight, 1:weight, 2:weight, 3:weight, 4:weight_composition, 5:weight_composition, 6:weight, 7:weight, 8:weight, 9:weight, 10:weight, 11:weight, 12:weight, 13:weight, 14:weight, 15:weight }
309
+ elif weight_type == "style transfer precise":
310
+ weight_composition = style_boost if style_boost is not None else weight
311
+ if is_sdxl:
312
+ weight = { 3:weight_composition, 6:weight }
313
+ else:
314
+ weight = { 0:weight, 1:weight, 2:weight, 3:weight, 4:weight_composition*0.25, 5:weight_composition, 9:weight, 10:weight, 11:weight, 12:weight, 13:weight, 14:weight, 15:weight }
315
+ elif weight_type == "composition precise":
316
+ weight_composition = weight
317
+ weight = composition_boost if composition_boost is not None else weight
318
+ if is_sdxl:
319
+ weight = { 0:weight*.1, 1:weight*.1, 2:weight*.1, 3:weight_composition, 4:weight*.1, 5:weight*.1, 6:weight, 7:weight*.1, 8:weight*.1, 9:weight*.1, 10:weight*.1 }
320
+ else:
321
+ weight = { 0:weight, 1:weight, 2:weight, 3:weight, 4:weight_composition*0.25, 5:weight_composition, 6:weight*.1, 7:weight*.1, 8:weight*.1, 9:weight, 10:weight, 11:weight, 12:weight, 13:weight, 14:weight, 15:weight }
322
+
323
+ clipvision_size = 224 if not is_kwai_kolors else 336
324
+
325
+ img_comp_cond_embeds = None
326
+ face_cond_embeds = None
327
+ if is_faceid:
328
+ if insightface is None:
329
+ raise Exception("Insightface model is required for FaceID models")
330
+
331
+ from insightface.utils import face_align
332
+
333
+ insightface.det_model.input_size = (640,640) # reset the detection size
334
+ image_iface = tensor_to_image(image)
335
+ face_cond_embeds = []
336
+ image = []
337
+
338
+ for i in range(image_iface.shape[0]):
339
+ for size in [(size, size) for size in range(640, 256, -64)]:
340
+ insightface.det_model.input_size = size # TODO: hacky but seems to be working
341
+ face = insightface.get(image_iface[i])
342
+ if face:
343
+ if not is_portrait_unnorm:
344
+ face_cond_embeds.append(torch.from_numpy(face[0].normed_embedding).unsqueeze(0))
345
+ else:
346
+ face_cond_embeds.append(torch.from_numpy(face[0].embedding).unsqueeze(0))
347
+ image.append(image_to_tensor(face_align.norm_crop(image_iface[i], landmark=face[0].kps, image_size=336 if is_kwai_kolors_faceid else 256 if is_sdxl else 224)))
348
+
349
+ if 640 not in size:
350
+ print(f"\033[33mINFO: InsightFace detection resolution lowered to {size}.\033[0m")
351
+ break
352
+ else:
353
+ raise Exception('InsightFace: No face detected.')
354
+ face_cond_embeds = torch.stack(face_cond_embeds).to(device, dtype=dtype)
355
+ image = torch.stack(image)
356
+ del image_iface, face
357
+
358
+ if image is not None:
359
+ img_cond_embeds = encode_image_masked(clipvision, image, batch_size=encode_batch_size, tiles=enhance_tiles, ratio=enhance_ratio, clipvision_size=clipvision_size)
360
+ if image_composition is not None:
361
+ img_comp_cond_embeds = encode_image_masked(clipvision, image_composition, batch_size=encode_batch_size, tiles=enhance_tiles, ratio=enhance_ratio, clipvision_size=clipvision_size)
362
+
363
+ if is_plus:
364
+ img_cond_embeds = img_cond_embeds.penultimate_hidden_states
365
+ image_negative = image_negative if image_negative is not None else torch.zeros([1, clipvision_size, clipvision_size, 3])
366
+ img_uncond_embeds = encode_image_masked(clipvision, image_negative, batch_size=encode_batch_size, clipvision_size=clipvision_size).penultimate_hidden_states
367
+ if image_composition is not None:
368
+ img_comp_cond_embeds = img_comp_cond_embeds.penultimate_hidden_states
369
+ else:
370
+ img_cond_embeds = img_cond_embeds.image_embeds if not is_faceid else face_cond_embeds
371
+ if image_negative is not None and not is_faceid:
372
+ img_uncond_embeds = encode_image_masked(clipvision, image_negative, batch_size=encode_batch_size, clipvision_size=clipvision_size).image_embeds
373
+ else:
374
+ img_uncond_embeds = torch.zeros_like(img_cond_embeds)
375
+ if image_composition is not None:
376
+ img_comp_cond_embeds = img_comp_cond_embeds.image_embeds
377
+ del image_negative, image_composition
378
+
379
+ image = None if not is_faceid else image # if it's face_id we need the cropped face for later
380
+ elif pos_embed is not None:
381
+ img_cond_embeds = pos_embed
382
+
383
+ if neg_embed is not None:
384
+ img_uncond_embeds = neg_embed
385
+ else:
386
+ if is_plus:
387
+ img_uncond_embeds = encode_image_masked(clipvision, torch.zeros([1, clipvision_size, clipvision_size, 3]), clipvision_size=clipvision_size).penultimate_hidden_states
388
+ else:
389
+ img_uncond_embeds = torch.zeros_like(img_cond_embeds)
390
+ del pos_embed, neg_embed
391
+ else:
392
+ raise Exception("Images or Embeds are required")
393
+
394
+ # ensure that cond and uncond have the same batch size
395
+ img_uncond_embeds = tensor_to_size(img_uncond_embeds, img_cond_embeds.shape[0])
396
+
397
+ img_cond_embeds = img_cond_embeds.to(device, dtype=dtype)
398
+ img_uncond_embeds = img_uncond_embeds.to(device, dtype=dtype)
399
+ if img_comp_cond_embeds is not None:
400
+ img_comp_cond_embeds = img_comp_cond_embeds.to(device, dtype=dtype)
401
+
402
+ # combine the embeddings if needed
403
+ if combine_embeds != "concat" and img_cond_embeds.shape[0] > 1 and not unfold_batch:
404
+ if combine_embeds == "add":
405
+ img_cond_embeds = torch.sum(img_cond_embeds, dim=0).unsqueeze(0)
406
+ if face_cond_embeds is not None:
407
+ face_cond_embeds = torch.sum(face_cond_embeds, dim=0).unsqueeze(0)
408
+ if img_comp_cond_embeds is not None:
409
+ img_comp_cond_embeds = torch.sum(img_comp_cond_embeds, dim=0).unsqueeze(0)
410
+ elif combine_embeds == "subtract":
411
+ img_cond_embeds = img_cond_embeds[0] - torch.mean(img_cond_embeds[1:], dim=0)
412
+ img_cond_embeds = img_cond_embeds.unsqueeze(0)
413
+ if face_cond_embeds is not None:
414
+ face_cond_embeds = face_cond_embeds[0] - torch.mean(face_cond_embeds[1:], dim=0)
415
+ face_cond_embeds = face_cond_embeds.unsqueeze(0)
416
+ if img_comp_cond_embeds is not None:
417
+ img_comp_cond_embeds = img_comp_cond_embeds[0] - torch.mean(img_comp_cond_embeds[1:], dim=0)
418
+ img_comp_cond_embeds = img_comp_cond_embeds.unsqueeze(0)
419
+ elif combine_embeds == "average":
420
+ img_cond_embeds = torch.mean(img_cond_embeds, dim=0).unsqueeze(0)
421
+ if face_cond_embeds is not None:
422
+ face_cond_embeds = torch.mean(face_cond_embeds, dim=0).unsqueeze(0)
423
+ if img_comp_cond_embeds is not None:
424
+ img_comp_cond_embeds = torch.mean(img_comp_cond_embeds, dim=0).unsqueeze(0)
425
+ elif combine_embeds == "norm average":
426
+ img_cond_embeds = torch.mean(img_cond_embeds / torch.norm(img_cond_embeds, dim=0, keepdim=True), dim=0).unsqueeze(0)
427
+ if face_cond_embeds is not None:
428
+ face_cond_embeds = torch.mean(face_cond_embeds / torch.norm(face_cond_embeds, dim=0, keepdim=True), dim=0).unsqueeze(0)
429
+ if img_comp_cond_embeds is not None:
430
+ img_comp_cond_embeds = torch.mean(img_comp_cond_embeds / torch.norm(img_comp_cond_embeds, dim=0, keepdim=True), dim=0).unsqueeze(0)
431
+ img_uncond_embeds = img_uncond_embeds[0].unsqueeze(0) # TODO: better strategy for uncond could be to average them
432
+
433
+ if attn_mask is not None:
434
+ attn_mask = attn_mask.to(device, dtype=dtype)
435
+
436
+ encoder_hid_proj = None
437
+
438
+ if is_kwai_kolors_faceid and hasattr(model.model, "diffusion_model") and hasattr(model.model.diffusion_model, "encoder_hid_proj"):
439
+ encoder_hid_proj = model.model.diffusion_model.encoder_hid_proj.state_dict()
440
+
441
+ ipa = IPAdapter(
442
+ ipadapter,
443
+ cross_attention_dim=cross_attention_dim,
444
+ output_cross_attention_dim=output_cross_attention_dim,
445
+ clip_embeddings_dim=img_cond_embeds.shape[-1],
446
+ clip_extra_context_tokens=clip_extra_context_tokens,
447
+ is_sdxl=is_sdxl,
448
+ is_plus=is_plus,
449
+ is_full=is_full,
450
+ is_faceid=is_faceid,
451
+ is_portrait_unnorm=is_portrait_unnorm,
452
+ is_kwai_kolors=is_kwai_kolors,
453
+ encoder_hid_proj=encoder_hid_proj,
454
+ weight_kolors=weight_kolors
455
+ ).to(device, dtype=dtype)
456
+
457
+ if is_faceid and is_plus:
458
+ cond = ipa.get_image_embeds_faceid_plus(face_cond_embeds, img_cond_embeds, weight_faceidv2, is_faceidv2, encode_batch_size)
459
+ # TODO: check if noise helps with the uncond face embeds
460
+ uncond = ipa.get_image_embeds_faceid_plus(torch.zeros_like(face_cond_embeds), img_uncond_embeds, weight_faceidv2, is_faceidv2, encode_batch_size)
461
+ else:
462
+ cond, uncond = ipa.get_image_embeds(img_cond_embeds, img_uncond_embeds, encode_batch_size)
463
+ if img_comp_cond_embeds is not None:
464
+ cond_comp = ipa.get_image_embeds(img_comp_cond_embeds, img_uncond_embeds, encode_batch_size)[0]
465
+
466
+ cond = cond.to(device, dtype=dtype)
467
+ uncond = uncond.to(device, dtype=dtype)
468
+
469
+ cond_alt = None
470
+ if img_comp_cond_embeds is not None:
471
+ cond_alt = { 3: cond_comp.to(device, dtype=dtype) }
472
+
473
+ del img_cond_embeds, img_uncond_embeds, img_comp_cond_embeds, face_cond_embeds
474
+
475
+ sigma_start = model.get_model_object("model_sampling").percent_to_sigma(start_at)
476
+ sigma_end = model.get_model_object("model_sampling").percent_to_sigma(end_at)
477
+
478
+ patch_kwargs = {
479
+ "ipadapter": ipa,
480
+ "weight": weight,
481
+ "cond": cond,
482
+ "cond_alt": cond_alt,
483
+ "uncond": uncond,
484
+ "weight_type": weight_type,
485
+ "mask": attn_mask,
486
+ "sigma_start": sigma_start,
487
+ "sigma_end": sigma_end,
488
+ "unfold_batch": unfold_batch,
489
+ "embeds_scaling": embeds_scaling,
490
+ }
491
+
492
+ number = 0
493
+ if not is_sdxl:
494
+ for id in [1,2,4,5,7,8]: # id of input_blocks that have cross attention
495
+ patch_kwargs["module_key"] = str(number*2+1)
496
+ set_model_patch_replace(model, patch_kwargs, ("input", id))
497
+ number += 1
498
+ for id in [3,4,5,6,7,8,9,10,11]: # id of output_blocks that have cross attention
499
+ patch_kwargs["module_key"] = str(number*2+1)
500
+ set_model_patch_replace(model, patch_kwargs, ("output", id))
501
+ number += 1
502
+ patch_kwargs["module_key"] = str(number*2+1)
503
+ set_model_patch_replace(model, patch_kwargs, ("middle", 1))
504
+ else:
505
+ for id in [4,5,7,8]: # id of input_blocks that have cross attention
506
+ block_indices = range(2) if id in [4, 5] else range(10) # transformer_depth
507
+ for index in block_indices:
508
+ patch_kwargs["module_key"] = str(number*2+1)
509
+ set_model_patch_replace(model, patch_kwargs, ("input", id, index))
510
+ number += 1
511
+ for id in range(6): # id of output_blocks that have cross attention
512
+ block_indices = range(2) if id in [3, 4, 5] else range(10) # transformer_depth
513
+ for index in block_indices:
514
+ patch_kwargs["module_key"] = str(number*2+1)
515
+ set_model_patch_replace(model, patch_kwargs, ("output", id, index))
516
+ number += 1
517
+ for index in range(10):
518
+ patch_kwargs["module_key"] = str(number*2+1)
519
+ set_model_patch_replace(model, patch_kwargs, ("middle", 1, index))
520
+ number += 1
521
+
522
+ return (model, image)
523
+
524
+ """
525
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
526
+ Loaders
527
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
528
+ """
529
+ class IPAdapterUnifiedLoader:
530
+ def __init__(self):
531
+ self.lora = None
532
+ self.clipvision = { "file": None, "model": None }
533
+ self.ipadapter = { "file": None, "model": None }
534
+ self.insightface = { "provider": None, "model": None }
535
+
536
+ @classmethod
537
+ def INPUT_TYPES(s):
538
+ return {"required": {
539
+ "model": ("MODEL", ),
540
+ "preset": (['LIGHT - SD1.5 only (low strength)', 'STANDARD (medium strength)', 'VIT-G (medium strength)', 'PLUS (high strength)', 'PLUS FACE (portraits)', 'FULL FACE - SD1.5 only (portraits stronger)'], ),
541
+ },
542
+ "optional": {
543
+ "ipadapter": ("IPADAPTER", ),
544
+ }}
545
+
546
+ RETURN_TYPES = ("MODEL", "IPADAPTER", )
547
+ RETURN_NAMES = ("model", "ipadapter", )
548
+ FUNCTION = "load_models"
549
+ CATEGORY = "ipadapter"
550
+
551
+ def load_models(self, model, preset, lora_strength=0.0, provider="CPU", ipadapter=None):
552
+ pipeline = { "clipvision": { 'file': None, 'model': None }, "ipadapter": { 'file': None, 'model': None }, "insightface": { 'provider': None, 'model': None } }
553
+ if ipadapter is not None:
554
+ pipeline = ipadapter
555
+
556
+ # 1. Load the clipvision model
557
+ clipvision_file = get_clipvision_file(preset)
558
+ if clipvision_file is None:
559
+ raise Exception("ClipVision model not found.")
560
+
561
+ if clipvision_file != self.clipvision['file']:
562
+ if clipvision_file != pipeline['clipvision']['file']:
563
+ self.clipvision['file'] = clipvision_file
564
+ self.clipvision['model'] = load_clip_vision(clipvision_file)
565
+ print(f"\033[33mINFO: Clip Vision model loaded from {clipvision_file}\033[0m")
566
+ else:
567
+ self.clipvision = pipeline['clipvision']
568
+
569
+ # 2. Load the ipadapter model
570
+ is_sdxl = isinstance(model.model, (comfy.model_base.SDXL, comfy.model_base.SDXLRefiner, comfy.model_base.SDXL_instructpix2pix))
571
+ ipadapter_file, is_insightface, lora_pattern = get_ipadapter_file(preset, is_sdxl)
572
+ if ipadapter_file is None:
573
+ raise Exception("IPAdapter model not found.")
574
+
575
+ if ipadapter_file != self.ipadapter['file']:
576
+ if pipeline['ipadapter']['file'] != ipadapter_file:
577
+ self.ipadapter['file'] = ipadapter_file
578
+ self.ipadapter['model'] = ipadapter_model_loader(ipadapter_file)
579
+ print(f"\033[33mINFO: IPAdapter model loaded from {ipadapter_file}\033[0m")
580
+ else:
581
+ self.ipadapter = pipeline['ipadapter']
582
+
583
+ # 3. Load the lora model if needed
584
+ if lora_pattern is not None:
585
+ lora_file = get_lora_file(lora_pattern)
586
+ lora_model = None
587
+ if lora_file is None:
588
+ raise Exception("LoRA model not found.")
589
+
590
+ if self.lora is not None:
591
+ if lora_file == self.lora['file']:
592
+ lora_model = self.lora['model']
593
+ else:
594
+ self.lora = None
595
+ torch.cuda.empty_cache()
596
+
597
+ if lora_model is None:
598
+ lora_model = comfy.utils.load_torch_file(lora_file, safe_load=True)
599
+ self.lora = { 'file': lora_file, 'model': lora_model }
600
+ print(f"\033[33mINFO: LoRA model loaded from {lora_file}\033[0m")
601
+
602
+ if lora_strength > 0:
603
+ model, _ = load_lora_for_models(model, None, lora_model, lora_strength, 0)
604
+
605
+ # 4. Load the insightface model if needed
606
+ if is_insightface:
607
+ if provider != self.insightface['provider']:
608
+ if pipeline['insightface']['provider'] != provider:
609
+ self.insightface['provider'] = provider
610
+ self.insightface['model'] = insightface_loader(provider)
611
+ print(f"\033[33mINFO: InsightFace model loaded with {provider} provider\033[0m")
612
+ else:
613
+ self.insightface = pipeline['insightface']
614
+
615
+ return (model, { 'clipvision': self.clipvision, 'ipadapter': self.ipadapter, 'insightface': self.insightface }, )
616
+
617
+ class IPAdapterUnifiedLoaderFaceID(IPAdapterUnifiedLoader):
618
+ @classmethod
619
+ def INPUT_TYPES(s):
620
+ return {"required": {
621
+ "model": ("MODEL", ),
622
+ "preset": (['FACEID', 'FACEID PLUS - SD1.5 only', 'FACEID PLUS V2', 'FACEID PORTRAIT (style transfer)', 'FACEID PORTRAIT UNNORM - SDXL only (strong)'], ),
623
+ "lora_strength": ("FLOAT", { "default": 0.6, "min": 0, "max": 1, "step": 0.01 }),
624
+ "provider": (["CPU", "CUDA", "ROCM", "DirectML", "OpenVINO", "CoreML"], ),
625
+ },
626
+ "optional": {
627
+ "ipadapter": ("IPADAPTER", ),
628
+ }}
629
+
630
+ RETURN_NAMES = ("MODEL", "ipadapter", )
631
+ CATEGORY = "ipadapter/faceid"
632
+
633
+ class IPAdapterUnifiedLoaderCommunity(IPAdapterUnifiedLoader):
634
+ @classmethod
635
+ def INPUT_TYPES(s):
636
+ return {"required": {
637
+ "model": ("MODEL", ),
638
+ "preset": (['Composition', 'Kolors'], ),
639
+ },
640
+ "optional": {
641
+ "ipadapter": ("IPADAPTER", ),
642
+ }}
643
+
644
+ CATEGORY = "ipadapter/loaders"
645
+
646
+ class IPAdapterModelLoader:
647
+ @classmethod
648
+ def INPUT_TYPES(s):
649
+ return {"required": { "ipadapter_file": (folder_paths.get_filename_list("ipadapter"), )}}
650
+
651
+ RETURN_TYPES = ("IPADAPTER",)
652
+ FUNCTION = "load_ipadapter_model"
653
+ CATEGORY = "ipadapter/loaders"
654
+
655
+ def load_ipadapter_model(self, ipadapter_file):
656
+ ipadapter_file = folder_paths.get_full_path("ipadapter", ipadapter_file)
657
+ return (ipadapter_model_loader(ipadapter_file),)
658
+
659
+ class IPAdapterInsightFaceLoader:
660
+ @classmethod
661
+ def INPUT_TYPES(s):
662
+ return {
663
+ "required": {
664
+ "provider": (["CPU", "CUDA", "ROCM"], ),
665
+ "model_name": (['buffalo_l', 'antelopev2'], )
666
+ },
667
+ }
668
+
669
+ RETURN_TYPES = ("INSIGHTFACE",)
670
+ FUNCTION = "load_insightface"
671
+ CATEGORY = "ipadapter/loaders"
672
+
673
+ def load_insightface(self, provider, model_name):
674
+ return (insightface_loader(provider, model_name=model_name),)
675
+
676
+ """
677
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
678
+ Main Apply Nodes
679
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
680
+ """
681
+ class IPAdapterSimple:
682
+ @classmethod
683
+ def INPUT_TYPES(s):
684
+ return {
685
+ "required": {
686
+ "model": ("MODEL", ),
687
+ "ipadapter": ("IPADAPTER", ),
688
+ "image": ("IMAGE",),
689
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 3, "step": 0.05 }),
690
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
691
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
692
+ "weight_type": (['standard', 'prompt is more important', 'style transfer'], ),
693
+ },
694
+ "optional": {
695
+ "attn_mask": ("MASK",),
696
+ }
697
+ }
698
+
699
+ RETURN_TYPES = ("MODEL",)
700
+ FUNCTION = "apply_ipadapter"
701
+ CATEGORY = "ipadapter"
702
+
703
+ def apply_ipadapter(self, model, ipadapter, image, weight, start_at, end_at, weight_type, attn_mask=None):
704
+ if weight_type.startswith("style"):
705
+ weight_type = "style transfer"
706
+ elif weight_type == "prompt is more important":
707
+ weight_type = "ease out"
708
+ else:
709
+ weight_type = "linear"
710
+
711
+ ipa_args = {
712
+ "image": image,
713
+ "weight": weight,
714
+ "start_at": start_at,
715
+ "end_at": end_at,
716
+ "attn_mask": attn_mask,
717
+ "weight_type": weight_type,
718
+ "insightface": ipadapter['insightface']['model'] if 'insightface' in ipadapter else None,
719
+ }
720
+
721
+ if 'ipadapter' not in ipadapter:
722
+ raise Exception("IPAdapter model not present in the pipeline. Please load the models with the IPAdapterUnifiedLoader node.")
723
+ if 'clipvision' not in ipadapter:
724
+ raise Exception("CLIPVision model not present in the pipeline. Please load the models with the IPAdapterUnifiedLoader node.")
725
+
726
+ return ipadapter_execute(model.clone(), ipadapter['ipadapter']['model'], ipadapter['clipvision']['model'], **ipa_args)
727
+
728
+ class IPAdapterAdvanced:
729
+ def __init__(self):
730
+ self.unfold_batch = False
731
+
732
+ @classmethod
733
+ def INPUT_TYPES(s):
734
+ return {
735
+ "required": {
736
+ "model": ("MODEL", ),
737
+ "ipadapter": ("IPADAPTER", ),
738
+ "image": ("IMAGE",),
739
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 5, "step": 0.05 }),
740
+ "weight_type": (WEIGHT_TYPES, ),
741
+ "combine_embeds": (["concat", "add", "subtract", "average", "norm average"],),
742
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
743
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
744
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
745
+ },
746
+ "optional": {
747
+ "image_negative": ("IMAGE",),
748
+ "attn_mask": ("MASK",),
749
+ "clip_vision": ("CLIP_VISION",),
750
+ }
751
+ }
752
+
753
+ RETURN_TYPES = ("MODEL",)
754
+ FUNCTION = "apply_ipadapter"
755
+ CATEGORY = "ipadapter"
756
+
757
+ def apply_ipadapter(self, model, ipadapter, start_at=0.0, end_at=1.0, weight=1.0, weight_style=1.0, weight_composition=1.0, expand_style=False, weight_type="linear", combine_embeds="concat", weight_faceidv2=None, image=None, image_style=None, image_composition=None, image_negative=None, clip_vision=None, attn_mask=None, insightface=None, embeds_scaling='V only', layer_weights=None, ipadapter_params=None, encode_batch_size=0, style_boost=None, composition_boost=None, enhance_tiles=1, enhance_ratio=1.0, weight_kolors=1.0):
758
+ is_sdxl = isinstance(model.model, (comfy.model_base.SDXL, comfy.model_base.SDXLRefiner, comfy.model_base.SDXL_instructpix2pix))
759
+
760
+ if 'ipadapter' in ipadapter:
761
+ ipadapter_model = ipadapter['ipadapter']['model']
762
+ clip_vision = clip_vision if clip_vision is not None else ipadapter['clipvision']['model']
763
+ else:
764
+ ipadapter_model = ipadapter
765
+
766
+ if clip_vision is None:
767
+ raise Exception("Missing CLIPVision model.")
768
+
769
+ if image_style is not None: # we are doing style + composition transfer
770
+ if not is_sdxl:
771
+ raise Exception("Style + Composition transfer is only available for SDXL models at the moment.") # TODO: check feasibility for SD1.5 models
772
+
773
+ image = image_style
774
+ weight = weight_style
775
+ if image_composition is None:
776
+ image_composition = image_style
777
+
778
+ weight_type = "strong style and composition" if expand_style else "style and composition"
779
+ if ipadapter_params is not None: # we are doing batch processing
780
+ image = ipadapter_params['image']
781
+ attn_mask = ipadapter_params['attn_mask']
782
+ weight = ipadapter_params['weight']
783
+ weight_type = ipadapter_params['weight_type']
784
+ start_at = ipadapter_params['start_at']
785
+ end_at = ipadapter_params['end_at']
786
+ else:
787
+ # at this point weight can be a list from the batch-weight or a single float
788
+ weight = [weight]
789
+
790
+ image = image if isinstance(image, list) else [image]
791
+
792
+ work_model = model.clone()
793
+
794
+ for i in range(len(image)):
795
+ if image[i] is None:
796
+ continue
797
+
798
+ ipa_args = {
799
+ "image": image[i],
800
+ "image_composition": image_composition,
801
+ "image_negative": image_negative,
802
+ "weight": weight[i],
803
+ "weight_composition": weight_composition,
804
+ "weight_faceidv2": weight_faceidv2,
805
+ "weight_type": weight_type if not isinstance(weight_type, list) else weight_type[i],
806
+ "combine_embeds": combine_embeds,
807
+ "start_at": start_at if not isinstance(start_at, list) else start_at[i],
808
+ "end_at": end_at if not isinstance(end_at, list) else end_at[i],
809
+ "attn_mask": attn_mask if not isinstance(attn_mask, list) else attn_mask[i],
810
+ "unfold_batch": self.unfold_batch,
811
+ "embeds_scaling": embeds_scaling,
812
+ "insightface": insightface if insightface is not None else ipadapter['insightface']['model'] if 'insightface' in ipadapter else None,
813
+ "layer_weights": layer_weights,
814
+ "encode_batch_size": encode_batch_size,
815
+ "style_boost": style_boost,
816
+ "composition_boost": composition_boost,
817
+ "enhance_tiles": enhance_tiles,
818
+ "enhance_ratio": enhance_ratio,
819
+ "weight_kolors": weight_kolors,
820
+ }
821
+
822
+ work_model, face_image = ipadapter_execute(work_model, ipadapter_model, clip_vision, **ipa_args)
823
+
824
+ del ipadapter
825
+ return (work_model, face_image, )
826
+
827
+ class IPAdapterBatch(IPAdapterAdvanced):
828
+ def __init__(self):
829
+ self.unfold_batch = True
830
+
831
+ @classmethod
832
+ def INPUT_TYPES(s):
833
+ return {
834
+ "required": {
835
+ "model": ("MODEL", ),
836
+ "ipadapter": ("IPADAPTER", ),
837
+ "image": ("IMAGE",),
838
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 5, "step": 0.05 }),
839
+ "weight_type": (WEIGHT_TYPES, ),
840
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
841
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
842
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
843
+ "encode_batch_size": ("INT", { "default": 0, "min": 0, "max": 4096 }),
844
+ },
845
+ "optional": {
846
+ "image_negative": ("IMAGE",),
847
+ "attn_mask": ("MASK",),
848
+ "clip_vision": ("CLIP_VISION",),
849
+ }
850
+ }
851
+
852
+ class IPAdapterStyleComposition(IPAdapterAdvanced):
853
+ @classmethod
854
+ def INPUT_TYPES(s):
855
+ return {
856
+ "required": {
857
+ "model": ("MODEL", ),
858
+ "ipadapter": ("IPADAPTER", ),
859
+ "image_style": ("IMAGE",),
860
+ "image_composition": ("IMAGE",),
861
+ "weight_style": ("FLOAT", { "default": 1.0, "min": -1, "max": 5, "step": 0.05 }),
862
+ "weight_composition": ("FLOAT", { "default": 1.0, "min": -1, "max": 5, "step": 0.05 }),
863
+ "expand_style": ("BOOLEAN", { "default": False }),
864
+ "combine_embeds": (["concat", "add", "subtract", "average", "norm average"], {"default": "average"}),
865
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
866
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
867
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
868
+ },
869
+ "optional": {
870
+ "image_negative": ("IMAGE",),
871
+ "attn_mask": ("MASK",),
872
+ "clip_vision": ("CLIP_VISION",),
873
+ }
874
+ }
875
+
876
+ CATEGORY = "ipadapter/style_composition"
877
+
878
+ class IPAdapterStyleCompositionBatch(IPAdapterStyleComposition):
879
+ def __init__(self):
880
+ self.unfold_batch = True
881
+
882
+ @classmethod
883
+ def INPUT_TYPES(s):
884
+ return {
885
+ "required": {
886
+ "model": ("MODEL", ),
887
+ "ipadapter": ("IPADAPTER", ),
888
+ "image_style": ("IMAGE",),
889
+ "image_composition": ("IMAGE",),
890
+ "weight_style": ("FLOAT", { "default": 1.0, "min": -1, "max": 5, "step": 0.05 }),
891
+ "weight_composition": ("FLOAT", { "default": 1.0, "min": -1, "max": 5, "step": 0.05 }),
892
+ "expand_style": ("BOOLEAN", { "default": False }),
893
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
894
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
895
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
896
+ },
897
+ "optional": {
898
+ "image_negative": ("IMAGE",),
899
+ "attn_mask": ("MASK",),
900
+ "clip_vision": ("CLIP_VISION",),
901
+ }
902
+ }
903
+
904
+ class IPAdapterFaceID(IPAdapterAdvanced):
905
+ @classmethod
906
+ def INPUT_TYPES(s):
907
+ return {
908
+ "required": {
909
+ "model": ("MODEL", ),
910
+ "ipadapter": ("IPADAPTER", ),
911
+ "image": ("IMAGE",),
912
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 3, "step": 0.05 }),
913
+ "weight_faceidv2": ("FLOAT", { "default": 1.0, "min": -1, "max": 5.0, "step": 0.05 }),
914
+ "weight_type": (WEIGHT_TYPES, ),
915
+ "combine_embeds": (["concat", "add", "subtract", "average", "norm average"],),
916
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
917
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
918
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
919
+ },
920
+ "optional": {
921
+ "image_negative": ("IMAGE",),
922
+ "attn_mask": ("MASK",),
923
+ "clip_vision": ("CLIP_VISION",),
924
+ "insightface": ("INSIGHTFACE",),
925
+ }
926
+ }
927
+
928
+ CATEGORY = "ipadapter/faceid"
929
+ RETURN_TYPES = ("MODEL","IMAGE",)
930
+ RETURN_NAMES = ("MODEL", "face_image", )
931
+
932
+ class IPAAdapterFaceIDBatch(IPAdapterFaceID):
933
+ def __init__(self):
934
+ self.unfold_batch = True
935
+
936
+ class IPAdapterFaceIDKolors(IPAdapterAdvanced):
937
+ @classmethod
938
+ def INPUT_TYPES(s):
939
+ return {
940
+ "required": {
941
+ "model": ("MODEL", ),
942
+ "ipadapter": ("IPADAPTER", ),
943
+ "image": ("IMAGE",),
944
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 3, "step": 0.05 }),
945
+ "weight_faceidv2": ("FLOAT", { "default": 1.0, "min": -1, "max": 5.0, "step": 0.05 }),
946
+ "weight_kolors": ("FLOAT", { "default": 1.0, "min": -1, "max": 5.0, "step": 0.05 }),
947
+ "weight_type": (WEIGHT_TYPES, ),
948
+ "combine_embeds": (["concat", "add", "subtract", "average", "norm average"],),
949
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
950
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
951
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
952
+ },
953
+ "optional": {
954
+ "image_negative": ("IMAGE",),
955
+ "attn_mask": ("MASK",),
956
+ "clip_vision": ("CLIP_VISION",),
957
+ "insightface": ("INSIGHTFACE",),
958
+ }
959
+ }
960
+
961
+ CATEGORY = "ipadapter/faceid"
962
+ RETURN_TYPES = ("MODEL","IMAGE",)
963
+ RETURN_NAMES = ("MODEL", "face_image", )
964
+
965
+ class IPAdapterTiled:
966
+ def __init__(self):
967
+ self.unfold_batch = False
968
+
969
+ @classmethod
970
+ def INPUT_TYPES(s):
971
+ return {
972
+ "required": {
973
+ "model": ("MODEL", ),
974
+ "ipadapter": ("IPADAPTER", ),
975
+ "image": ("IMAGE",),
976
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 3, "step": 0.05 }),
977
+ "weight_type": (WEIGHT_TYPES, ),
978
+ "combine_embeds": (["concat", "add", "subtract", "average", "norm average"],),
979
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
980
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
981
+ "sharpening": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.05 }),
982
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
983
+ },
984
+ "optional": {
985
+ "image_negative": ("IMAGE",),
986
+ "attn_mask": ("MASK",),
987
+ "clip_vision": ("CLIP_VISION",),
988
+ }
989
+ }
990
+
991
+ RETURN_TYPES = ("MODEL", "IMAGE", "MASK", )
992
+ RETURN_NAMES = ("MODEL", "tiles", "masks", )
993
+ FUNCTION = "apply_tiled"
994
+ CATEGORY = "ipadapter/tiled"
995
+
996
+ def apply_tiled(self, model, ipadapter, image, weight, weight_type, start_at, end_at, sharpening, combine_embeds="concat", image_negative=None, attn_mask=None, clip_vision=None, embeds_scaling='V only', encode_batch_size=0):
997
+ # 1. Select the models
998
+ if 'ipadapter' in ipadapter:
999
+ ipadapter_model = ipadapter['ipadapter']['model']
1000
+ clip_vision = clip_vision if clip_vision is not None else ipadapter['clipvision']['model']
1001
+ else:
1002
+ ipadapter_model = ipadapter
1003
+ clip_vision = clip_vision
1004
+
1005
+ if clip_vision is None:
1006
+ raise Exception("Missing CLIPVision model.")
1007
+
1008
+ del ipadapter
1009
+
1010
+ # 2. Extract the tiles
1011
+ tile_size = 256 # I'm using 256 instead of 224 as it is more likely divisible by the latent size, it will be downscaled to 224 by the clip vision encoder
1012
+ _, oh, ow, _ = image.shape
1013
+ if attn_mask is None:
1014
+ attn_mask = torch.ones([1, oh, ow], dtype=image.dtype, device=image.device)
1015
+
1016
+ image = image.permute([0,3,1,2])
1017
+ attn_mask = attn_mask.unsqueeze(1)
1018
+ # the mask should have the same proportions as the reference image and the latent
1019
+ attn_mask = T.Resize((oh, ow), interpolation=T.InterpolationMode.BICUBIC, antialias=True)(attn_mask)
1020
+
1021
+ # if the image is almost a square, we crop it to a square
1022
+ if oh / ow > 0.75 and oh / ow < 1.33:
1023
+ # crop the image to a square
1024
+ image = T.CenterCrop(min(oh, ow))(image)
1025
+ resize = (tile_size*2, tile_size*2)
1026
+
1027
+ attn_mask = T.CenterCrop(min(oh, ow))(attn_mask)
1028
+ # otherwise resize the smallest side and the other proportionally
1029
+ else:
1030
+ resize = (int(tile_size * ow / oh), tile_size) if oh < ow else (tile_size, int(tile_size * oh / ow))
1031
+
1032
+ # using PIL for better results
1033
+ imgs = []
1034
+ for img in image:
1035
+ img = T.ToPILImage()(img)
1036
+ img = img.resize(resize, resample=Image.Resampling['LANCZOS'])
1037
+ imgs.append(T.ToTensor()(img))
1038
+ image = torch.stack(imgs)
1039
+ del imgs, img
1040
+
1041
+ # we don't need a high quality resize for the mask
1042
+ attn_mask = T.Resize(resize[::-1], interpolation=T.InterpolationMode.BICUBIC, antialias=True)(attn_mask)
1043
+
1044
+ # we allow a maximum of 4 tiles
1045
+ if oh / ow > 4 or oh / ow < 0.25:
1046
+ crop = (tile_size, tile_size*4) if oh < ow else (tile_size*4, tile_size)
1047
+ image = T.CenterCrop(crop)(image)
1048
+ attn_mask = T.CenterCrop(crop)(attn_mask)
1049
+
1050
+ attn_mask = attn_mask.squeeze(1)
1051
+
1052
+ if sharpening > 0:
1053
+ image = contrast_adaptive_sharpening(image, sharpening)
1054
+
1055
+ image = image.permute([0,2,3,1])
1056
+
1057
+ _, oh, ow, _ = image.shape
1058
+
1059
+ # find the number of tiles for each side
1060
+ tiles_x = math.ceil(ow / tile_size)
1061
+ tiles_y = math.ceil(oh / tile_size)
1062
+ overlap_x = max(0, (tiles_x * tile_size - ow) / (tiles_x - 1 if tiles_x > 1 else 1))
1063
+ overlap_y = max(0, (tiles_y * tile_size - oh) / (tiles_y - 1 if tiles_y > 1 else 1))
1064
+
1065
+ base_mask = torch.zeros([attn_mask.shape[0], oh, ow], dtype=image.dtype, device=image.device)
1066
+
1067
+ # extract all the tiles from the image and create the masks
1068
+ tiles = []
1069
+ masks = []
1070
+ for y in range(tiles_y):
1071
+ for x in range(tiles_x):
1072
+ start_x = int(x * (tile_size - overlap_x))
1073
+ start_y = int(y * (tile_size - overlap_y))
1074
+ tiles.append(image[:, start_y:start_y+tile_size, start_x:start_x+tile_size, :])
1075
+ mask = base_mask.clone()
1076
+ mask[:, start_y:start_y+tile_size, start_x:start_x+tile_size] = attn_mask[:, start_y:start_y+tile_size, start_x:start_x+tile_size]
1077
+ masks.append(mask)
1078
+ del mask
1079
+
1080
+ # 3. Apply the ipadapter to each group of tiles
1081
+ model = model.clone()
1082
+ for i in range(len(tiles)):
1083
+ ipa_args = {
1084
+ "image": tiles[i],
1085
+ "image_negative": image_negative,
1086
+ "weight": weight,
1087
+ "weight_type": weight_type,
1088
+ "combine_embeds": combine_embeds,
1089
+ "start_at": start_at,
1090
+ "end_at": end_at,
1091
+ "attn_mask": masks[i],
1092
+ "unfold_batch": self.unfold_batch,
1093
+ "embeds_scaling": embeds_scaling,
1094
+ "encode_batch_size": encode_batch_size,
1095
+ }
1096
+ # apply the ipadapter to the model without cloning it
1097
+ model, _ = ipadapter_execute(model, ipadapter_model, clip_vision, **ipa_args)
1098
+
1099
+ return (model, torch.cat(tiles), torch.cat(masks), )
1100
+
1101
+ class IPAdapterTiledBatch(IPAdapterTiled):
1102
+ def __init__(self):
1103
+ self.unfold_batch = True
1104
+
1105
+ @classmethod
1106
+ def INPUT_TYPES(s):
1107
+ return {
1108
+ "required": {
1109
+ "model": ("MODEL", ),
1110
+ "ipadapter": ("IPADAPTER", ),
1111
+ "image": ("IMAGE",),
1112
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 3, "step": 0.05 }),
1113
+ "weight_type": (WEIGHT_TYPES, ),
1114
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1115
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1116
+ "sharpening": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.05 }),
1117
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
1118
+ "encode_batch_size": ("INT", { "default": 0, "min": 0, "max": 4096 }),
1119
+ },
1120
+ "optional": {
1121
+ "image_negative": ("IMAGE",),
1122
+ "attn_mask": ("MASK",),
1123
+ "clip_vision": ("CLIP_VISION",),
1124
+ }
1125
+ }
1126
+
1127
+ class IPAdapterEmbeds:
1128
+ def __init__(self):
1129
+ self.unfold_batch = False
1130
+
1131
+ @classmethod
1132
+ def INPUT_TYPES(s):
1133
+ return {
1134
+ "required": {
1135
+ "model": ("MODEL", ),
1136
+ "ipadapter": ("IPADAPTER", ),
1137
+ "pos_embed": ("EMBEDS",),
1138
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 3, "step": 0.05 }),
1139
+ "weight_type": (WEIGHT_TYPES, ),
1140
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1141
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1142
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
1143
+ },
1144
+ "optional": {
1145
+ "neg_embed": ("EMBEDS",),
1146
+ "attn_mask": ("MASK",),
1147
+ "clip_vision": ("CLIP_VISION",),
1148
+ }
1149
+ }
1150
+
1151
+ RETURN_TYPES = ("MODEL",)
1152
+ FUNCTION = "apply_ipadapter"
1153
+ CATEGORY = "ipadapter/embeds"
1154
+
1155
+ def apply_ipadapter(self, model, ipadapter, pos_embed, weight, weight_type, start_at, end_at, neg_embed=None, attn_mask=None, clip_vision=None, embeds_scaling='V only'):
1156
+ ipa_args = {
1157
+ "pos_embed": pos_embed,
1158
+ "neg_embed": neg_embed,
1159
+ "weight": weight,
1160
+ "weight_type": weight_type,
1161
+ "start_at": start_at,
1162
+ "end_at": end_at,
1163
+ "attn_mask": attn_mask,
1164
+ "embeds_scaling": embeds_scaling,
1165
+ "unfold_batch": self.unfold_batch,
1166
+ }
1167
+
1168
+ if 'ipadapter' in ipadapter:
1169
+ ipadapter_model = ipadapter['ipadapter']['model']
1170
+ clip_vision = clip_vision if clip_vision is not None else ipadapter['clipvision']['model']
1171
+ else:
1172
+ ipadapter_model = ipadapter
1173
+ clip_vision = clip_vision
1174
+
1175
+ if clip_vision is None and neg_embed is None:
1176
+ raise Exception("Missing CLIPVision model.")
1177
+
1178
+ del ipadapter
1179
+
1180
+ return ipadapter_execute(model.clone(), ipadapter_model, clip_vision, **ipa_args)
1181
+
1182
+ class IPAdapterEmbedsBatch(IPAdapterEmbeds):
1183
+ def __init__(self):
1184
+ self.unfold_batch = True
1185
+
1186
+ class IPAdapterMS(IPAdapterAdvanced):
1187
+ @classmethod
1188
+ def INPUT_TYPES(s):
1189
+ return {
1190
+ "required": {
1191
+ "model": ("MODEL", ),
1192
+ "ipadapter": ("IPADAPTER", ),
1193
+ "image": ("IMAGE",),
1194
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 5, "step": 0.05 }),
1195
+ "weight_faceidv2": ("FLOAT", { "default": 1.0, "min": -1, "max": 5.0, "step": 0.05 }),
1196
+ "weight_type": (WEIGHT_TYPES, ),
1197
+ "combine_embeds": (["concat", "add", "subtract", "average", "norm average"],),
1198
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1199
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1200
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
1201
+ "layer_weights": ("STRING", { "default": "", "multiline": True }),
1202
+ },
1203
+ "optional": {
1204
+ "image_negative": ("IMAGE",),
1205
+ "attn_mask": ("MASK",),
1206
+ "clip_vision": ("CLIP_VISION",),
1207
+ "insightface": ("INSIGHTFACE",),
1208
+ }
1209
+ }
1210
+
1211
+ CATEGORY = "ipadapter/dev"
1212
+
1213
+ class IPAdapterClipVisionEnhancer(IPAdapterAdvanced):
1214
+ @classmethod
1215
+ def INPUT_TYPES(s):
1216
+ return {
1217
+ "required": {
1218
+ "model": ("MODEL", ),
1219
+ "ipadapter": ("IPADAPTER", ),
1220
+ "image": ("IMAGE",),
1221
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 5, "step": 0.05 }),
1222
+ "weight_type": (WEIGHT_TYPES, ),
1223
+ "combine_embeds": (["concat", "add", "subtract", "average", "norm average"],),
1224
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1225
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1226
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
1227
+ "enhance_tiles": ("INT", { "default": 2, "min": 1, "max": 16 }),
1228
+ "enhance_ratio": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.05 }),
1229
+ },
1230
+ "optional": {
1231
+ "image_negative": ("IMAGE",),
1232
+ "attn_mask": ("MASK",),
1233
+ "clip_vision": ("CLIP_VISION",),
1234
+ }
1235
+ }
1236
+
1237
+ CATEGORY = "ipadapter/dev"
1238
+
1239
+ class IPAdapterClipVisionEnhancerBatch(IPAdapterClipVisionEnhancer):
1240
+ def __init__(self):
1241
+ self.unfold_batch = True
1242
+
1243
+ @classmethod
1244
+ def INPUT_TYPES(s):
1245
+ return {
1246
+ "required": {
1247
+ "model": ("MODEL", ),
1248
+ "ipadapter": ("IPADAPTER", ),
1249
+ "image": ("IMAGE",),
1250
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 5, "step": 0.05 }),
1251
+ "weight_type": (WEIGHT_TYPES, ),
1252
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1253
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1254
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
1255
+ "enhance_tiles": ("INT", { "default": 2, "min": 1, "max": 16 }),
1256
+ "enhance_ratio": ("FLOAT", { "default": 0.5, "min": 0.0, "max": 1.0, "step": 0.05 }),
1257
+ "encode_batch_size": ("INT", { "default": 0, "min": 0, "max": 4096 }),
1258
+ },
1259
+ "optional": {
1260
+ "image_negative": ("IMAGE",),
1261
+ "attn_mask": ("MASK",),
1262
+ "clip_vision": ("CLIP_VISION",),
1263
+ }
1264
+ }
1265
+
1266
+ class IPAdapterFromParams(IPAdapterAdvanced):
1267
+ @classmethod
1268
+ def INPUT_TYPES(s):
1269
+ return {
1270
+ "required": {
1271
+ "model": ("MODEL", ),
1272
+ "ipadapter": ("IPADAPTER", ),
1273
+ "ipadapter_params": ("IPADAPTER_PARAMS", ),
1274
+ "combine_embeds": (["concat", "add", "subtract", "average", "norm average"],),
1275
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
1276
+ },
1277
+ "optional": {
1278
+ "image_negative": ("IMAGE",),
1279
+ "clip_vision": ("CLIP_VISION",),
1280
+ }
1281
+ }
1282
+
1283
+ CATEGORY = "ipadapter/params"
1284
+
1285
+ class IPAdapterPreciseStyleTransfer(IPAdapterAdvanced):
1286
+ @classmethod
1287
+ def INPUT_TYPES(s):
1288
+ return {
1289
+ "required": {
1290
+ "model": ("MODEL", ),
1291
+ "ipadapter": ("IPADAPTER", ),
1292
+ "image": ("IMAGE",),
1293
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 5, "step": 0.05 }),
1294
+ "style_boost": ("FLOAT", { "default": 1.0, "min": -5, "max": 5, "step": 0.05 }),
1295
+ "combine_embeds": (["concat", "add", "subtract", "average", "norm average"],),
1296
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1297
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1298
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
1299
+ },
1300
+ "optional": {
1301
+ "image_negative": ("IMAGE",),
1302
+ "attn_mask": ("MASK",),
1303
+ "clip_vision": ("CLIP_VISION",),
1304
+ }
1305
+ }
1306
+
1307
+ class IPAdapterPreciseStyleTransferBatch(IPAdapterPreciseStyleTransfer):
1308
+ def __init__(self):
1309
+ self.unfold_batch = True
1310
+
1311
+ class IPAdapterPreciseComposition(IPAdapterAdvanced):
1312
+ @classmethod
1313
+ def INPUT_TYPES(s):
1314
+ return {
1315
+ "required": {
1316
+ "model": ("MODEL", ),
1317
+ "ipadapter": ("IPADAPTER", ),
1318
+ "image": ("IMAGE",),
1319
+ "weight": ("FLOAT", { "default": 1.0, "min": -1, "max": 5, "step": 0.05 }),
1320
+ "composition_boost": ("FLOAT", { "default": 0.0, "min": -5, "max": 5, "step": 0.05 }),
1321
+ "combine_embeds": (["concat", "add", "subtract", "average", "norm average"],),
1322
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1323
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1324
+ "embeds_scaling": (['V only', 'K+V', 'K+V w/ C penalty', 'K+mean(V) w/ C penalty'], ),
1325
+ },
1326
+ "optional": {
1327
+ "image_negative": ("IMAGE",),
1328
+ "attn_mask": ("MASK",),
1329
+ "clip_vision": ("CLIP_VISION",),
1330
+ }
1331
+ }
1332
+
1333
+ class IPAdapterPreciseCompositionBatch(IPAdapterPreciseComposition):
1334
+ def __init__(self):
1335
+ self.unfold_batch = True
1336
+
1337
+ """
1338
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1339
+ Helpers
1340
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1341
+ """
1342
+ class IPAdapterEncoder:
1343
+ @classmethod
1344
+ def INPUT_TYPES(s):
1345
+ return {"required": {
1346
+ "ipadapter": ("IPADAPTER",),
1347
+ "image": ("IMAGE",),
1348
+ "weight": ("FLOAT", { "default": 1.0, "min": -1.0, "max": 3.0, "step": 0.01 }),
1349
+ },
1350
+ "optional": {
1351
+ "mask": ("MASK",),
1352
+ "clip_vision": ("CLIP_VISION",),
1353
+ }
1354
+ }
1355
+
1356
+ RETURN_TYPES = ("EMBEDS", "EMBEDS",)
1357
+ RETURN_NAMES = ("pos_embed", "neg_embed",)
1358
+ FUNCTION = "encode"
1359
+ CATEGORY = "ipadapter/embeds"
1360
+
1361
+ def encode(self, ipadapter, image, weight, mask=None, clip_vision=None):
1362
+ if 'ipadapter' in ipadapter:
1363
+ ipadapter_model = ipadapter['ipadapter']['model']
1364
+ clip_vision = clip_vision if clip_vision is not None else ipadapter['clipvision']['model']
1365
+ else:
1366
+ ipadapter_model = ipadapter
1367
+ clip_vision = clip_vision
1368
+
1369
+ if clip_vision is None:
1370
+ raise Exception("Missing CLIPVision model.")
1371
+
1372
+ is_plus = "proj.3.weight" in ipadapter_model["image_proj"] or "latents" in ipadapter_model["image_proj"] or "perceiver_resampler.proj_in.weight" in ipadapter_model["image_proj"]
1373
+ is_kwai_kolors = is_plus and "layers.0.0.to_out.weight" in ipadapter_model["image_proj"] and ipadapter_model["image_proj"]["layers.0.0.to_out.weight"].shape[0] == 2048
1374
+
1375
+ clipvision_size = 224 if not is_kwai_kolors else 336
1376
+
1377
+ # resize and crop the mask to 224x224
1378
+ if mask is not None and mask.shape[1:3] != torch.Size([clipvision_size, clipvision_size]):
1379
+ mask = mask.unsqueeze(1)
1380
+ transforms = T.Compose([
1381
+ T.CenterCrop(min(mask.shape[2], mask.shape[3])),
1382
+ T.Resize((clipvision_size, clipvision_size), interpolation=T.InterpolationMode.BICUBIC, antialias=True),
1383
+ ])
1384
+ mask = transforms(mask).squeeze(1)
1385
+ #mask = T.Resize((image.shape[1], image.shape[2]), interpolation=T.InterpolationMode.BICUBIC, antialias=True)(mask.unsqueeze(1)).squeeze(1)
1386
+
1387
+ img_cond_embeds = encode_image_masked(clip_vision, image, mask, clipvision_size=clipvision_size)
1388
+
1389
+ if is_plus:
1390
+ img_cond_embeds = img_cond_embeds.penultimate_hidden_states
1391
+ img_uncond_embeds = encode_image_masked(clip_vision, torch.zeros([1, clipvision_size, clipvision_size, 3]), clipvision_size=clipvision_size).penultimate_hidden_states
1392
+ else:
1393
+ img_cond_embeds = img_cond_embeds.image_embeds
1394
+ img_uncond_embeds = torch.zeros_like(img_cond_embeds)
1395
+
1396
+ if weight != 1:
1397
+ img_cond_embeds = img_cond_embeds * weight
1398
+
1399
+ return (img_cond_embeds, img_uncond_embeds, )
1400
+
1401
+ class IPAdapterCombineEmbeds:
1402
+ @classmethod
1403
+ def INPUT_TYPES(s):
1404
+ return {"required": {
1405
+ "embed1": ("EMBEDS",),
1406
+ "method": (["concat", "add", "subtract", "average", "norm average", "max", "min"], ),
1407
+ },
1408
+ "optional": {
1409
+ "embed2": ("EMBEDS",),
1410
+ "embed3": ("EMBEDS",),
1411
+ "embed4": ("EMBEDS",),
1412
+ "embed5": ("EMBEDS",),
1413
+ }}
1414
+
1415
+ RETURN_TYPES = ("EMBEDS",)
1416
+ FUNCTION = "batch"
1417
+ CATEGORY = "ipadapter/embeds"
1418
+
1419
+ def batch(self, embed1, method, embed2=None, embed3=None, embed4=None, embed5=None):
1420
+ if method=='concat' and embed2 is None and embed3 is None and embed4 is None and embed5 is None:
1421
+ return (embed1, )
1422
+
1423
+ embeds = [embed1, embed2, embed3, embed4, embed5]
1424
+ embeds = [embed for embed in embeds if embed is not None]
1425
+ embeds = torch.cat(embeds, dim=0)
1426
+
1427
+ if method == "add":
1428
+ embeds = torch.sum(embeds, dim=0).unsqueeze(0)
1429
+ elif method == "subtract":
1430
+ embeds = embeds[0] - torch.mean(embeds[1:], dim=0)
1431
+ embeds = embeds.unsqueeze(0)
1432
+ elif method == "average":
1433
+ embeds = torch.mean(embeds, dim=0).unsqueeze(0)
1434
+ elif method == "norm average":
1435
+ embeds = torch.mean(embeds / torch.norm(embeds, dim=0, keepdim=True), dim=0).unsqueeze(0)
1436
+ elif method == "max":
1437
+ embeds = torch.max(embeds, dim=0).values.unsqueeze(0)
1438
+ elif method == "min":
1439
+ embeds = torch.min(embeds, dim=0).values.unsqueeze(0)
1440
+
1441
+ return (embeds, )
1442
+
1443
+ class IPAdapterNoise:
1444
+ @classmethod
1445
+ def INPUT_TYPES(s):
1446
+ return {
1447
+ "required": {
1448
+ "type": (["fade", "dissolve", "gaussian", "shuffle"], ),
1449
+ "strength": ("FLOAT", { "default": 1.0, "min": 0, "max": 1, "step": 0.05 }),
1450
+ "blur": ("INT", { "default": 0, "min": 0, "max": 32, "step": 1 }),
1451
+ },
1452
+ "optional": {
1453
+ "image_optional": ("IMAGE",),
1454
+ }
1455
+ }
1456
+
1457
+ RETURN_TYPES = ("IMAGE",)
1458
+ FUNCTION = "make_noise"
1459
+ CATEGORY = "ipadapter/utils"
1460
+
1461
+ def make_noise(self, type, strength, blur, image_optional=None):
1462
+ if image_optional is None:
1463
+ image = torch.zeros([1, 224, 224, 3])
1464
+ else:
1465
+ transforms = T.Compose([
1466
+ T.CenterCrop(min(image_optional.shape[1], image_optional.shape[2])),
1467
+ T.Resize((224, 224), interpolation=T.InterpolationMode.BICUBIC, antialias=True),
1468
+ ])
1469
+ image = transforms(image_optional.permute([0,3,1,2])).permute([0,2,3,1])
1470
+
1471
+ seed = int(torch.sum(image).item()) % 1000000007 # hash the image to get a seed, grants predictability
1472
+ torch.manual_seed(seed)
1473
+
1474
+ if type == "fade":
1475
+ noise = torch.rand_like(image)
1476
+ noise = image * (1 - strength) + noise * strength
1477
+ elif type == "dissolve":
1478
+ mask = (torch.rand_like(image) < strength).float()
1479
+ noise = torch.rand_like(image)
1480
+ noise = image * (1-mask) + noise * mask
1481
+ elif type == "gaussian":
1482
+ noise = torch.randn_like(image) * strength
1483
+ noise = image + noise
1484
+ elif type == "shuffle":
1485
+ transforms = T.Compose([
1486
+ T.ElasticTransform(alpha=75.0, sigma=(1-strength)*3.5),
1487
+ T.RandomVerticalFlip(p=1.0),
1488
+ T.RandomHorizontalFlip(p=1.0),
1489
+ ])
1490
+ image = transforms(image.permute([0,3,1,2])).permute([0,2,3,1])
1491
+ noise = torch.randn_like(image) * (strength*0.75)
1492
+ noise = image * (1-noise) + noise
1493
+
1494
+ del image
1495
+ noise = torch.clamp(noise, 0, 1)
1496
+
1497
+ if blur > 0:
1498
+ if blur % 2 == 0:
1499
+ blur += 1
1500
+ noise = T.functional.gaussian_blur(noise.permute([0,3,1,2]), blur).permute([0,2,3,1])
1501
+
1502
+ return (noise, )
1503
+
1504
+ class PrepImageForClipVision:
1505
+ @classmethod
1506
+ def INPUT_TYPES(s):
1507
+ return {"required": {
1508
+ "image": ("IMAGE",),
1509
+ "interpolation": (["LANCZOS", "BICUBIC", "HAMMING", "BILINEAR", "BOX", "NEAREST"],),
1510
+ "crop_position": (["top", "bottom", "left", "right", "center", "pad"],),
1511
+ "sharpening": ("FLOAT", {"default": 0.0, "min": 0, "max": 1, "step": 0.05}),
1512
+ },
1513
+ }
1514
+
1515
+ RETURN_TYPES = ("IMAGE",)
1516
+ FUNCTION = "prep_image"
1517
+
1518
+ CATEGORY = "ipadapter/utils"
1519
+
1520
+ def prep_image(self, image, interpolation="LANCZOS", crop_position="center", sharpening=0.0):
1521
+ size = (224, 224)
1522
+ _, oh, ow, _ = image.shape
1523
+ output = image.permute([0,3,1,2])
1524
+
1525
+ if crop_position == "pad":
1526
+ if oh != ow:
1527
+ if oh > ow:
1528
+ pad = (oh - ow) // 2
1529
+ pad = (pad, 0, pad, 0)
1530
+ elif ow > oh:
1531
+ pad = (ow - oh) // 2
1532
+ pad = (0, pad, 0, pad)
1533
+ output = T.functional.pad(output, pad, fill=0)
1534
+ else:
1535
+ crop_size = min(oh, ow)
1536
+ x = (ow-crop_size) // 2
1537
+ y = (oh-crop_size) // 2
1538
+ if "top" in crop_position:
1539
+ y = 0
1540
+ elif "bottom" in crop_position:
1541
+ y = oh-crop_size
1542
+ elif "left" in crop_position:
1543
+ x = 0
1544
+ elif "right" in crop_position:
1545
+ x = ow-crop_size
1546
+
1547
+ x2 = x+crop_size
1548
+ y2 = y+crop_size
1549
+
1550
+ output = output[:, :, y:y2, x:x2]
1551
+
1552
+ imgs = []
1553
+ for img in output:
1554
+ img = T.ToPILImage()(img) # using PIL for better results
1555
+ img = img.resize(size, resample=Image.Resampling[interpolation])
1556
+ imgs.append(T.ToTensor()(img))
1557
+ output = torch.stack(imgs, dim=0)
1558
+ del imgs, img
1559
+
1560
+ if sharpening > 0:
1561
+ output = contrast_adaptive_sharpening(output, sharpening)
1562
+
1563
+ output = output.permute([0,2,3,1])
1564
+
1565
+ return (output, )
1566
+
1567
+ class IPAdapterSaveEmbeds:
1568
+ def __init__(self):
1569
+ self.output_dir = folder_paths.get_output_directory()
1570
+
1571
+ @classmethod
1572
+ def INPUT_TYPES(s):
1573
+ return {"required": {
1574
+ "embeds": ("EMBEDS",),
1575
+ "filename_prefix": ("STRING", {"default": "IP_embeds"})
1576
+ },
1577
+ }
1578
+
1579
+ RETURN_TYPES = ()
1580
+ FUNCTION = "save"
1581
+ OUTPUT_NODE = True
1582
+ CATEGORY = "ipadapter/embeds"
1583
+
1584
+ def save(self, embeds, filename_prefix):
1585
+ full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir)
1586
+ file = f"{filename}_{counter:05}.ipadpt"
1587
+ file = os.path.join(full_output_folder, file)
1588
+
1589
+ torch.save(embeds, file)
1590
+ return (None, )
1591
+
1592
+ class IPAdapterLoadEmbeds:
1593
+ @classmethod
1594
+ def INPUT_TYPES(s):
1595
+ input_dir = folder_paths.get_input_directory()
1596
+ files = [os.path.relpath(os.path.join(root, file), input_dir) for root, dirs, files in os.walk(input_dir) for file in files if file.endswith('.ipadpt')]
1597
+ return {"required": {"embeds": [sorted(files), ]}, }
1598
+
1599
+ RETURN_TYPES = ("EMBEDS", )
1600
+ FUNCTION = "load"
1601
+ CATEGORY = "ipadapter/embeds"
1602
+
1603
+ def load(self, embeds):
1604
+ path = folder_paths.get_annotated_filepath(embeds)
1605
+ return (torch.load(path).cpu(), )
1606
+
1607
+ class IPAdapterWeights:
1608
+ @classmethod
1609
+ def INPUT_TYPES(s):
1610
+ return {"required": {
1611
+ "weights": ("STRING", {"default": '1.0, 0.0', "multiline": True }),
1612
+ "timing": (["custom", "linear", "ease_in_out", "ease_in", "ease_out", "random"], { "default": "linear" } ),
1613
+ "frames": ("INT", {"default": 0, "min": 0, "max": 9999, "step": 1 }),
1614
+ "start_frame": ("INT", {"default": 0, "min": 0, "max": 9999, "step": 1 }),
1615
+ "end_frame": ("INT", {"default": 9999, "min": 0, "max": 9999, "step": 1 }),
1616
+ "add_starting_frames": ("INT", {"default": 0, "min": 0, "max": 9999, "step": 1 }),
1617
+ "add_ending_frames": ("INT", {"default": 0, "min": 0, "max": 9999, "step": 1 }),
1618
+ "method": (["full batch", "shift batches", "alternate batches"], { "default": "full batch" }),
1619
+ }, "optional": {
1620
+ "image": ("IMAGE",),
1621
+ }
1622
+ }
1623
+
1624
+ RETURN_TYPES = ("FLOAT", "FLOAT", "INT", "IMAGE", "IMAGE", "WEIGHTS_STRATEGY")
1625
+ RETURN_NAMES = ("weights", "weights_invert", "total_frames", "image_1", "image_2", "weights_strategy")
1626
+ FUNCTION = "weights"
1627
+ CATEGORY = "ipadapter/weights"
1628
+
1629
+ def weights(self, weights='', timing='custom', frames=0, start_frame=0, end_frame=9999, add_starting_frames=0, add_ending_frames=0, method='full batch', weights_strategy=None, image=None):
1630
+ import random
1631
+
1632
+ frame_count = image.shape[0] if image is not None else 0
1633
+ if weights_strategy is not None:
1634
+ weights = weights_strategy["weights"]
1635
+ timing = weights_strategy["timing"]
1636
+ frames = weights_strategy["frames"]
1637
+ start_frame = weights_strategy["start_frame"]
1638
+ end_frame = weights_strategy["end_frame"]
1639
+ add_starting_frames = weights_strategy["add_starting_frames"]
1640
+ add_ending_frames = weights_strategy["add_ending_frames"]
1641
+ method = weights_strategy["method"]
1642
+ frame_count = weights_strategy["frame_count"]
1643
+ else:
1644
+ weights_strategy = {
1645
+ "weights": weights,
1646
+ "timing": timing,
1647
+ "frames": frames,
1648
+ "start_frame": start_frame,
1649
+ "end_frame": end_frame,
1650
+ "add_starting_frames": add_starting_frames,
1651
+ "add_ending_frames": add_ending_frames,
1652
+ "method": method,
1653
+ "frame_count": frame_count,
1654
+ }
1655
+
1656
+ # convert the string to a list of floats separated by commas or newlines
1657
+ weights = weights.replace("\n", ",")
1658
+ weights = [float(weight) for weight in weights.split(",") if weight.strip() != ""]
1659
+
1660
+ if timing != "custom":
1661
+ frames = max(frames, 2)
1662
+ start = 0.0
1663
+ end = 1.0
1664
+
1665
+ if len(weights) > 0:
1666
+ start = weights[0]
1667
+ end = weights[-1]
1668
+
1669
+ weights = []
1670
+
1671
+ end_frame = min(end_frame, frames)
1672
+ duration = end_frame - start_frame
1673
+ if start_frame > 0:
1674
+ weights.extend([start] * start_frame)
1675
+
1676
+ for i in range(duration):
1677
+ n = duration - 1
1678
+ if timing == "linear":
1679
+ weights.append(start + (end - start) * i / n)
1680
+ elif timing == "ease_in_out":
1681
+ weights.append(start + (end - start) * (1 - math.cos(i / n * math.pi)) / 2)
1682
+ elif timing == "ease_in":
1683
+ weights.append(start + (end - start) * math.sin(i / n * math.pi / 2))
1684
+ elif timing == "ease_out":
1685
+ weights.append(start + (end - start) * (1 - math.cos(i / n * math.pi / 2)))
1686
+ elif timing == "random":
1687
+ weights.append(random.uniform(start, end))
1688
+
1689
+ weights[-1] = end if timing != "random" else weights[-1]
1690
+ if end_frame < frames:
1691
+ weights.extend([end] * (frames - end_frame))
1692
+
1693
+ if len(weights) == 0:
1694
+ weights = [0.0]
1695
+
1696
+ frames = len(weights)
1697
+
1698
+ # repeat the images for cross fade
1699
+ image_1 = None
1700
+ image_2 = None
1701
+
1702
+ # Calculate the min and max of the weights
1703
+ min_weight = min(weights)
1704
+ max_weight = max(weights)
1705
+
1706
+ if image is not None:
1707
+
1708
+ if "shift" in method:
1709
+ image_1 = image[:-1]
1710
+ image_2 = image[1:]
1711
+
1712
+ weights = weights * image_1.shape[0]
1713
+ image_1 = image_1.repeat_interleave(frames, 0)
1714
+ image_2 = image_2.repeat_interleave(frames, 0)
1715
+ elif "alternate" in method:
1716
+ image_1 = image[::2].repeat_interleave(2, 0)
1717
+ image_1 = image_1[1:]
1718
+ image_2 = image[1::2].repeat_interleave(2, 0)
1719
+
1720
+ # Invert the weights relative to their own range
1721
+ mew_weights = weights + [max_weight - (w - min_weight) for w in weights]
1722
+
1723
+ mew_weights = mew_weights * (image_1.shape[0] // 2)
1724
+ if image.shape[0] % 2:
1725
+ image_1 = image_1[:-1]
1726
+ else:
1727
+ image_2 = image_2[:-1]
1728
+ mew_weights = mew_weights + weights
1729
+
1730
+ weights = mew_weights
1731
+ image_1 = image_1.repeat_interleave(frames, 0)
1732
+ image_2 = image_2.repeat_interleave(frames, 0)
1733
+ else:
1734
+ weights = weights * image.shape[0]
1735
+ image_1 = image.repeat_interleave(frames, 0)
1736
+
1737
+ # add starting and ending frames
1738
+ if add_starting_frames > 0:
1739
+ weights = [weights[0]] * add_starting_frames + weights
1740
+ image_1 = torch.cat([image[:1].repeat(add_starting_frames, 1, 1, 1), image_1], dim=0)
1741
+ if image_2 is not None:
1742
+ image_2 = torch.cat([image[:1].repeat(add_starting_frames, 1, 1, 1), image_2], dim=0)
1743
+ if add_ending_frames > 0:
1744
+ weights = weights + [weights[-1]] * add_ending_frames
1745
+ image_1 = torch.cat([image_1, image[-1:].repeat(add_ending_frames, 1, 1, 1)], dim=0)
1746
+ if image_2 is not None:
1747
+ image_2 = torch.cat([image_2, image[-1:].repeat(add_ending_frames, 1, 1, 1)], dim=0)
1748
+
1749
+ # reverse the weights array
1750
+ weights_invert = weights[::-1]
1751
+
1752
+ frame_count = len(weights)
1753
+
1754
+ return (weights, weights_invert, frame_count, image_1, image_2, weights_strategy,)
1755
+
1756
+ class IPAdapterWeightsFromStrategy(IPAdapterWeights):
1757
+ @classmethod
1758
+ def INPUT_TYPES(s):
1759
+ return {"required": {
1760
+ "weights_strategy": ("WEIGHTS_STRATEGY",),
1761
+ }, "optional": {
1762
+ "image": ("IMAGE",),
1763
+ }
1764
+ }
1765
+
1766
+ class IPAdapterPromptScheduleFromWeightsStrategy():
1767
+ @classmethod
1768
+ def INPUT_TYPES(s):
1769
+ return {"required": {
1770
+ "weights_strategy": ("WEIGHTS_STRATEGY",),
1771
+ "prompt": ("STRING", {"default": "", "multiline": True }),
1772
+ }}
1773
+
1774
+ RETURN_TYPES = ("STRING",)
1775
+ RETURN_NAMES = ("prompt_schedule", )
1776
+ FUNCTION = "prompt_schedule"
1777
+ CATEGORY = "ipadapter/weights"
1778
+
1779
+ def prompt_schedule(self, weights_strategy, prompt=""):
1780
+ frames = weights_strategy["frames"]
1781
+ add_starting_frames = weights_strategy["add_starting_frames"]
1782
+ add_ending_frames = weights_strategy["add_ending_frames"]
1783
+ frame_count = weights_strategy["frame_count"]
1784
+
1785
+ out = ""
1786
+
1787
+ prompt = [p for p in prompt.split("\n") if p.strip() != ""]
1788
+
1789
+ if len(prompt) > 0 and frame_count > 0:
1790
+ # prompt_pos must be the same size as the image batch
1791
+ if len(prompt) > frame_count:
1792
+ prompt = prompt[:frame_count]
1793
+ elif len(prompt) < frame_count:
1794
+ prompt += [prompt[-1]] * (frame_count - len(prompt))
1795
+
1796
+ if add_starting_frames > 0:
1797
+ out += f"\"0\": \"{prompt[0]}\",\n"
1798
+ for i in range(frame_count):
1799
+ out += f"\"{i * frames + add_starting_frames}\": \"{prompt[i]}\",\n"
1800
+ if add_ending_frames > 0:
1801
+ out += f"\"{frame_count * frames + add_starting_frames}\": \"{prompt[-1]}\",\n"
1802
+
1803
+ return (out, )
1804
+
1805
+ class IPAdapterCombineWeights:
1806
+ @classmethod
1807
+ def INPUT_TYPES(s):
1808
+ return {
1809
+ "required": {
1810
+ "weights_1": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.05 }),
1811
+ "weights_2": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.05 }),
1812
+ }}
1813
+ RETURN_TYPES = ("FLOAT", "INT")
1814
+ RETURN_NAMES = ("weights", "count")
1815
+ FUNCTION = "combine"
1816
+ CATEGORY = "ipadapter/utils"
1817
+
1818
+ def combine(self, weights_1, weights_2):
1819
+ if not isinstance(weights_1, list):
1820
+ weights_1 = [weights_1]
1821
+ if not isinstance(weights_2, list):
1822
+ weights_2 = [weights_2]
1823
+ weights = weights_1 + weights_2
1824
+
1825
+ return (weights, len(weights), )
1826
+
1827
+ class IPAdapterRegionalConditioning:
1828
+ @classmethod
1829
+ def INPUT_TYPES(s):
1830
+ return {"required": {
1831
+ #"set_cond_area": (["default", "mask bounds"],),
1832
+ "image": ("IMAGE",),
1833
+ "image_weight": ("FLOAT", { "default": 1.0, "min": -1.0, "max": 3.0, "step": 0.05 }),
1834
+ "prompt_weight": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 10.0, "step": 0.05 }),
1835
+ "weight_type": (WEIGHT_TYPES, ),
1836
+ "start_at": ("FLOAT", { "default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1837
+ "end_at": ("FLOAT", { "default": 1.0, "min": 0.0, "max": 1.0, "step": 0.001 }),
1838
+ }, "optional": {
1839
+ "mask": ("MASK",),
1840
+ "positive": ("CONDITIONING",),
1841
+ "negative": ("CONDITIONING",),
1842
+ }}
1843
+
1844
+ RETURN_TYPES = ("IPADAPTER_PARAMS", "CONDITIONING", "CONDITIONING", )
1845
+ RETURN_NAMES = ("IPADAPTER_PARAMS", "POSITIVE", "NEGATIVE")
1846
+ FUNCTION = "conditioning"
1847
+
1848
+ CATEGORY = "ipadapter/params"
1849
+
1850
+ def conditioning(self, image, image_weight, prompt_weight, weight_type, start_at, end_at, mask=None, positive=None, negative=None):
1851
+ set_area_to_bounds = False #if set_cond_area == "default" else True
1852
+
1853
+ if mask is not None:
1854
+ if positive is not None:
1855
+ positive = conditioning_set_values(positive, {"mask": mask, "set_area_to_bounds": set_area_to_bounds, "mask_strength": prompt_weight})
1856
+ if negative is not None:
1857
+ negative = conditioning_set_values(negative, {"mask": mask, "set_area_to_bounds": set_area_to_bounds, "mask_strength": prompt_weight})
1858
+
1859
+ ipadapter_params = {
1860
+ "image": [image],
1861
+ "attn_mask": [mask],
1862
+ "weight": [image_weight],
1863
+ "weight_type": [weight_type],
1864
+ "start_at": [start_at],
1865
+ "end_at": [end_at],
1866
+ }
1867
+
1868
+ return (ipadapter_params, positive, negative, )
1869
+
1870
+ class IPAdapterCombineParams:
1871
+ @classmethod
1872
+ def INPUT_TYPES(s):
1873
+ return {"required": {
1874
+ "params_1": ("IPADAPTER_PARAMS",),
1875
+ "params_2": ("IPADAPTER_PARAMS",),
1876
+ }, "optional": {
1877
+ "params_3": ("IPADAPTER_PARAMS",),
1878
+ "params_4": ("IPADAPTER_PARAMS",),
1879
+ "params_5": ("IPADAPTER_PARAMS",),
1880
+ }}
1881
+
1882
+ RETURN_TYPES = ("IPADAPTER_PARAMS",)
1883
+ FUNCTION = "combine"
1884
+ CATEGORY = "ipadapter/params"
1885
+
1886
+ def combine(self, params_1, params_2, params_3=None, params_4=None, params_5=None):
1887
+ ipadapter_params = {
1888
+ "image": params_1["image"] + params_2["image"],
1889
+ "attn_mask": params_1["attn_mask"] + params_2["attn_mask"],
1890
+ "weight": params_1["weight"] + params_2["weight"],
1891
+ "weight_type": params_1["weight_type"] + params_2["weight_type"],
1892
+ "start_at": params_1["start_at"] + params_2["start_at"],
1893
+ "end_at": params_1["end_at"] + params_2["end_at"],
1894
+ }
1895
+
1896
+ if params_3 is not None:
1897
+ ipadapter_params["image"] += params_3["image"]
1898
+ ipadapter_params["attn_mask"] += params_3["attn_mask"]
1899
+ ipadapter_params["weight"] += params_3["weight"]
1900
+ ipadapter_params["weight_type"] += params_3["weight_type"]
1901
+ ipadapter_params["start_at"] += params_3["start_at"]
1902
+ ipadapter_params["end_at"] += params_3["end_at"]
1903
+ if params_4 is not None:
1904
+ ipadapter_params["image"] += params_4["image"]
1905
+ ipadapter_params["attn_mask"] += params_4["attn_mask"]
1906
+ ipadapter_params["weight"] += params_4["weight"]
1907
+ ipadapter_params["weight_type"] += params_4["weight_type"]
1908
+ ipadapter_params["start_at"] += params_4["start_at"]
1909
+ ipadapter_params["end_at"] += params_4["end_at"]
1910
+ if params_5 is not None:
1911
+ ipadapter_params["image"] += params_5["image"]
1912
+ ipadapter_params["attn_mask"] += params_5["attn_mask"]
1913
+ ipadapter_params["weight"] += params_5["weight"]
1914
+ ipadapter_params["weight_type"] += params_5["weight_type"]
1915
+ ipadapter_params["start_at"] += params_5["start_at"]
1916
+ ipadapter_params["end_at"] += params_5["end_at"]
1917
+
1918
+ return (ipadapter_params, )
1919
+
1920
+ """
1921
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1922
+ Register
1923
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1924
+ """
1925
+ NODE_CLASS_MAPPINGS = {
1926
+ # Main Apply Nodes
1927
+ "IPAdapter": IPAdapterSimple,
1928
+ "IPAdapterAdvanced": IPAdapterAdvanced,
1929
+ "IPAdapterBatch": IPAdapterBatch,
1930
+ "IPAdapterFaceID": IPAdapterFaceID,
1931
+ "IPAdapterFaceIDKolors": IPAdapterFaceIDKolors,
1932
+ "IPAAdapterFaceIDBatch": IPAAdapterFaceIDBatch,
1933
+ "IPAdapterTiled": IPAdapterTiled,
1934
+ "IPAdapterTiledBatch": IPAdapterTiledBatch,
1935
+ "IPAdapterEmbeds": IPAdapterEmbeds,
1936
+ "IPAdapterEmbedsBatch": IPAdapterEmbedsBatch,
1937
+ "IPAdapterStyleComposition": IPAdapterStyleComposition,
1938
+ "IPAdapterStyleCompositionBatch": IPAdapterStyleCompositionBatch,
1939
+ "IPAdapterMS": IPAdapterMS,
1940
+ "IPAdapterClipVisionEnhancer": IPAdapterClipVisionEnhancer,
1941
+ "IPAdapterClipVisionEnhancerBatch": IPAdapterClipVisionEnhancerBatch,
1942
+ "IPAdapterFromParams": IPAdapterFromParams,
1943
+ "IPAdapterPreciseStyleTransfer": IPAdapterPreciseStyleTransfer,
1944
+ "IPAdapterPreciseStyleTransferBatch": IPAdapterPreciseStyleTransferBatch,
1945
+ "IPAdapterPreciseComposition": IPAdapterPreciseComposition,
1946
+ "IPAdapterPreciseCompositionBatch": IPAdapterPreciseCompositionBatch,
1947
+
1948
+ # Loaders
1949
+ "IPAdapterUnifiedLoader": IPAdapterUnifiedLoader,
1950
+ "IPAdapterUnifiedLoaderFaceID": IPAdapterUnifiedLoaderFaceID,
1951
+ "IPAdapterModelLoader": IPAdapterModelLoader,
1952
+ "IPAdapterInsightFaceLoader": IPAdapterInsightFaceLoader,
1953
+ "IPAdapterUnifiedLoaderCommunity": IPAdapterUnifiedLoaderCommunity,
1954
+
1955
+ # Helpers
1956
+ "IPAdapterEncoder": IPAdapterEncoder,
1957
+ "IPAdapterCombineEmbeds": IPAdapterCombineEmbeds,
1958
+ "IPAdapterNoise": IPAdapterNoise,
1959
+ "PrepImageForClipVision": PrepImageForClipVision,
1960
+ "IPAdapterSaveEmbeds": IPAdapterSaveEmbeds,
1961
+ "IPAdapterLoadEmbeds": IPAdapterLoadEmbeds,
1962
+ "IPAdapterWeights": IPAdapterWeights,
1963
+ "IPAdapterCombineWeights": IPAdapterCombineWeights,
1964
+ "IPAdapterWeightsFromStrategy": IPAdapterWeightsFromStrategy,
1965
+ "IPAdapterPromptScheduleFromWeightsStrategy": IPAdapterPromptScheduleFromWeightsStrategy,
1966
+ "IPAdapterRegionalConditioning": IPAdapterRegionalConditioning,
1967
+ "IPAdapterCombineParams": IPAdapterCombineParams,
1968
+ }
1969
+
1970
+ NODE_DISPLAY_NAME_MAPPINGS = {
1971
+ # Main Apply Nodes
1972
+ "IPAdapter": "IPAdapter",
1973
+ "IPAdapterAdvanced": "IPAdapter Advanced",
1974
+ "IPAdapterBatch": "IPAdapter Batch (Adv.)",
1975
+ "IPAdapterFaceID": "IPAdapter FaceID",
1976
+ "IPAdapterFaceIDKolors": "IPAdapter FaceID Kolors",
1977
+ "IPAAdapterFaceIDBatch": "IPAdapter FaceID Batch",
1978
+ "IPAdapterTiled": "IPAdapter Tiled",
1979
+ "IPAdapterTiledBatch": "IPAdapter Tiled Batch",
1980
+ "IPAdapterEmbeds": "IPAdapter Embeds",
1981
+ "IPAdapterEmbedsBatch": "IPAdapter Embeds Batch",
1982
+ "IPAdapterStyleComposition": "IPAdapter Style & Composition SDXL",
1983
+ "IPAdapterStyleCompositionBatch": "IPAdapter Style & Composition Batch SDXL",
1984
+ "IPAdapterMS": "IPAdapter Mad Scientist",
1985
+ "IPAdapterClipVisionEnhancer": "IPAdapter ClipVision Enhancer",
1986
+ "IPAdapterClipVisionEnhancerBatch": "IPAdapter ClipVision Enhancer Batch",
1987
+ "IPAdapterFromParams": "IPAdapter from Params",
1988
+ "IPAdapterPreciseStyleTransfer": "IPAdapter Precise Style Transfer",
1989
+ "IPAdapterPreciseStyleTransferBatch": "IPAdapter Precise Style Transfer Batch",
1990
+ "IPAdapterPreciseComposition": "IPAdapter Precise Composition",
1991
+ "IPAdapterPreciseCompositionBatch": "IPAdapter Precise Composition Batch",
1992
+
1993
+ # Loaders
1994
+ "IPAdapterUnifiedLoader": "IPAdapter Unified Loader",
1995
+ "IPAdapterUnifiedLoaderFaceID": "IPAdapter Unified Loader FaceID",
1996
+ "IPAdapterModelLoader": "IPAdapter Model Loader",
1997
+ "IPAdapterInsightFaceLoader": "IPAdapter InsightFace Loader",
1998
+ "IPAdapterUnifiedLoaderCommunity": "IPAdapter Unified Loader Community",
1999
+
2000
+ # Helpers
2001
+ "IPAdapterEncoder": "IPAdapter Encoder",
2002
+ "IPAdapterCombineEmbeds": "IPAdapter Combine Embeds",
2003
+ "IPAdapterNoise": "IPAdapter Noise",
2004
+ "PrepImageForClipVision": "Prep Image For ClipVision",
2005
+ "IPAdapterSaveEmbeds": "IPAdapter Save Embeds",
2006
+ "IPAdapterLoadEmbeds": "IPAdapter Load Embeds",
2007
+ "IPAdapterWeights": "IPAdapter Weights",
2008
+ "IPAdapterWeightsFromStrategy": "IPAdapter Weights From Strategy",
2009
+ "IPAdapterPromptScheduleFromWeightsStrategy": "Prompt Schedule From Weights Strategy",
2010
+ "IPAdapterCombineWeights": "IPAdapter Combine Weights",
2011
+ "IPAdapterRegionalConditioning": "IPAdapter Regional Conditioning",
2012
+ "IPAdapterCombineParams": "IPAdapter Combine Params",
2013
+ }
ComfyUI_IPAdapter_plus/LICENSE ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ <one line to give the program's name and a brief idea of what it does.>
635
+ Copyright (C) <year> <name of author>
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ <program> Copyright (C) <year> <name of author>
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <https://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
+ <https://www.gnu.org/licenses/why-not-lgpl.html>.
ComfyUI_IPAdapter_plus/NODES.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Nodes reference
2
+
3
+ Below I'm trying to document all the nodes. It's still very incomplete, be sure to check back later.
4
+
5
+ ## Loaders
6
+
7
+ ### :knot: IPAdapter Unified Loader
8
+
9
+ Loads the full stack of models needed for IPAdapter to function. The returned object will contain information regarding the **ipadapter** and **clip vision models**.
10
+
11
+ Multiple unified loaders should always be daisy chained through the `ipadapter` in/out. **Failing to do so will cause all models to be loaded twice.** For **the first** unified loader the `ipadapter` input **should never be connected**.
12
+
13
+ #### Inputs
14
+ - **model**, main ComfyUI model pipeline
15
+
16
+ #### Optional Inputs
17
+ - **ipadapter**, it's important to note that this is optional and used exclusively to daisy chain unified loaders. **The `ipadapter` input is never connected in the first `IPAdapter Unified Loader` of the chain.**
18
+
19
+ #### Outputs
20
+ - **model**, the model pipeline is used exclusively for configuration, the model comes out of this node untouched and it can be considered a reroute. Note that this is different from the Unified Loader FaceID that actually alters the model with a LoRA.
21
+ - **ipadapter**, connect this to any ipadater node. Each node will automatically detect if the `ipadapter` object contains the full stack of models or just one (like in the case [IPAdapter Model Loader](#ipadapter-model-loader)).
22
+
23
+ ### :knot: IPAdapter Model Loader
24
+
25
+ Loads the IPAdapter model only. The returned object will be the IPAdapter model contrary to the [Unified loader](#ipadapter-unified-loader) that contains the full stack of models.
26
+
27
+ #### Configuration parameters
28
+ - **ipadapter_file**, the main IPAdapter model. It must be located into `ComfyUI/models/ipadapter` or in any path specified in the `extra_model_paths.yaml` configuration file.
29
+
30
+ #### Outputs
31
+ - **IPADAPTER**, contains the loaded model only. Note that `IPADAPTER` will have a different structure when loaded by the [Unified Loader](#ipadapter-unified-loader).
32
+
33
+ ## Main IPAdapter Apply Nodes
34
+
35
+ ### :knot: IPAdapter Advanced
36
+
37
+ This node contains all the options to fine tune the IPAdapter models. It is a drop in replacement for the old `IPAdapter Apply` that is no longer available. If you have an old workflow, delete the existing `IPadapter Apply` node, add `IPAdapter Advanced` and connect all the pipes as before.
38
+
39
+ #### Inputs
40
+ - **model**, main model pipeline.
41
+ - **ipadapter**, the IPAdapter model. It can be connected to the [IPAdapter Model Loader](#ipadapter-model-loader) or any of the Unified Loaders. If a Unified loader is used anywhere in the workflow and you don't need a different model, it's always adviced to reuse the previous `ipadapter` pipeline.
42
+ - **image**, the reference image used to generate the positive conditioning. It should be a square image, other aspect ratios are automatically cropped in the center.
43
+
44
+ #### Optional inputs
45
+ - **image_negative**, image used to generate the negative conditioning. This is optional and normally handled by the code. It is possible to send noise or actually any image to instruct the model about what we don't want to see in the composition.
46
+ - **attn_mask**, a mask that will be applied during the image generation. **The mask should have the same size or at least the same aspect ratio of the latent**. The mask will define the area of influence of the IPAdapter models on the final image. Black zones won't be affected, white zones will get maximum influence. It can be a grayscale mask.
47
+ - **clip_vision**, this is optional if using any of the Unified loaders. If using the [IPAdapter Model Loader](#knot-ipadapter-model-loader) you also have to provide the clip vision model with a `Load CLIP Vision` node.
48
+
49
+ #### Configuration parameters
50
+ - **weight**, weight of the IPAdapter model. For `linear` `weight_type` (the default), a good starting point is 0.8. If you use other weight types you can experiment with higher values.
51
+ - **weight_type**, this is how the IPAdapter is applied to the UNet block. For example `ease-in` means that the input blocks have higher weight than the output ones. `week input` means that the whole input block has lower weight. `style transfer (SDXL)` only works with SDXL and it's a very powerful tool to tranfer only the style of an image but not its content. This parameter hugely impacts how the composition reacts to the text prompting.
52
+ - **combine_embeds**, when sending more than one reference image the embeddings can be sent one after the other (`concat`) or combined in various ways. For low spec GPUs it is adviced to `average` the embeds if you send multiple images. `subtract` subtracts the embeddings of the second image to the first; in case of 3 or more images they are averaged and subtracted to the first.
53
+ - **start_at/end_at**, this is the timestepping. Defines at what percentage point of the generation to start applying the IPAdapter model. The initial steps are the most important so if you start later (eg: `start_at=0.3`) the generated image will have a very light conditioning.
54
+ - **embeds_scaling**, the way the IPAdapter models are applied to the K,V. This parameter has a small impact on how the model reacts to text prompting. `K+mean(V) w/ C penalty` grants good quality at high weights (>1.0) without burning the image.
ComfyUI_IPAdapter_plus/README.md ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ComfyUI IPAdapter plus
2
+ [ComfyUI](https://github.com/comfyanonymous/ComfyUI) reference implementation for [IPAdapter](https://github.com/tencent-ailab/IP-Adapter/) models.
3
+
4
+ The IPAdapter are very powerful models for image-to-image conditioning. The subject or even just the style of the reference image(s) can be easily transferred to a generation. Think of it as a 1-image lora.
5
+
6
+ # Sponsorship
7
+
8
+ <div align="center">
9
+
10
+ **[:heart: Github Sponsor](https://github.com/sponsors/cubiq) | [:coin: Paypal](https://paypal.me/matt3o)**
11
+
12
+ </div>
13
+
14
+ If you like my work and wish to see updates and new features please consider sponsoring my projects.
15
+
16
+ - [ComfyUI IPAdapter Plus](https://github.com/cubiq/ComfyUI_IPAdapter_plus)
17
+ - [ComfyUI InstantID (Native)](https://github.com/cubiq/ComfyUI_InstantID)
18
+ - [ComfyUI Essentials](https://github.com/cubiq/ComfyUI_essentials)
19
+ - [ComfyUI FaceAnalysis](https://github.com/cubiq/ComfyUI_FaceAnalysis)
20
+
21
+ Not to mention the documentation and videos tutorials. Check my **ComfyUI Advanced Understanding** videos on YouTube for example, [part 1](https://www.youtube.com/watch?v=_C7kR2TFIX0) and [part 2](https://www.youtube.com/watch?v=ijqXnW_9gzc)
22
+
23
+ The only way to keep the code open and free is by sponsoring its development. The more sponsorships the more time I can dedicate to my open source projects.
24
+
25
+ Please consider a [Github Sponsorship](https://github.com/sponsors/cubiq) or [PayPal donation](https://paypal.me/matt3o) (Matteo "matt3o" Spinelli). For sponsorships of $50+, let me know if you'd like to be mentioned in this readme file, you can find me on [Discord](https://latent.vision/discord) or _matt3o :snail: gmail.com_.
26
+
27
+ ## Important updates
28
+
29
+ **2024/09/13**: Fixed a nasty bug in the middle block patching that we are carrying around since the beginning. Unfortunately the generated images won't be exactly the same as before. Anyway the middle block doesn't have a huge impact, so it shouldn't be a big deal. It does **not** impact Style or Composition transfer, only linear generations. I do not generally report on small bug fixes but this one may cause different results so I thought it's worth mentioning.
30
+
31
+ **2024/08/02**: Support for Kolors FaceIDv2. Please check the [example workflow](./examples/IPAdapter_FaceIDv2_Kolors.json) for best practices.
32
+
33
+ **2024/07/26**: Added support for image batches and animation to the ClipVision Enhancer.
34
+
35
+ **2024/07/18**: Support for Kolors.
36
+
37
+ **2024/07/17**: Added experimental ClipVision Enhancer node. It was somehow inspired by the [Scaling on Scales](https://arxiv.org/pdf/2403.13043) paper but the implementation is a bit different. The new IPAdapterClipVisionEnhancer tries to catch small details by tiling the embeds (instead of the image in the pixel space), the result is a slightly higher resolution visual embedding with no cost of performance.
38
+
39
+ **2024/07/11**: Added experimental Precise composition (layout) transfer. It's not as good as style. `embeds_scaling` has a huge impact. Start with strength 0.8 and boost 0.3 in SDXL and 0.6 boost 0.35 in SD1.5.
40
+
41
+ **2024/06/28**: Added the `IPAdapter Precise Style Transfer` node. Increase the `style_boost` option to lower the bleeding of the composition layer. **Important:** works better in SDXL, start with a style_boost of 2; for SD1.5 try to increase the weight a little over 1.0 and set the style_boost to a value between -1 and +1, starting with 0.
42
+
43
+ **2024/06/22**: Added `style transfer precise`, offers less bleeding of the embeds between the style and composition layers. It is sometimes better than the standard style transfer especially if the reference image is very different from the generated image. Works better in SDXL than SD1.5.
44
+
45
+ **2024/05/21**: Improved memory allocation when `encode_batch_size`. Useful mostly for very long animations.
46
+
47
+ **2024/05/02**: Add `encode_batch_size` to the Advanced batch node. This can be useful for animations with a lot of frames to reduce the VRAM usage during the image encoding. Please note that results will be slightly different based on the batch size.
48
+
49
+ **2024/04/27**: Refactored the IPAdapterWeights mostly useful for AnimateDiff animations.
50
+
51
+ **2024/04/21**: Added Regional Conditioning nodes to simplify attention masking and masked text conditioning.
52
+
53
+ **2024/04/16**: Added support for the new SDXL portrait unnorm model (link below). It's very strong and tends to ignore the text conditioning. Lower the CFG to 3-4 or use a RescaleCFG node.
54
+
55
+ *(Older updates removed for readability)*
56
+
57
+ ## Example workflows
58
+
59
+ The [examples directory](./examples/) has many workflows that cover all IPAdapter functionalities.
60
+
61
+ ![IPAdapter Example workflow](./examples/demo_workflow.jpg)
62
+
63
+ ## Video Tutorials
64
+
65
+ <a href="https://youtu.be/_JzDcgKgghY" target="_blank">
66
+ <img src="https://img.youtube.com/vi/_JzDcgKgghY/hqdefault.jpg" alt="Watch the video" />
67
+ </a>
68
+
69
+ - **:star: [New IPAdapter features](https://youtu.be/_JzDcgKgghY)**
70
+ - **:art: [IPAdapter Style and Composition](https://www.youtube.com/watch?v=czcgJnoDVd4)**
71
+
72
+ The following videos are about the previous version of IPAdapter, but they still contain valuable information.
73
+
74
+ :nerd_face: [Basic usage video](https://youtu.be/7m9ZZFU3HWo), :rocket: [Advanced features video](https://www.youtube.com/watch?v=mJQ62ly7jrg), :japanese_goblin: [Attention Masking video](https://www.youtube.com/watch?v=vqG1VXKteQg), :movie_camera: [Animation Features video](https://www.youtube.com/watch?v=ddYbhv3WgWw)
75
+
76
+ ## Installation
77
+
78
+ Download or git clone this repository inside `ComfyUI/custom_nodes/` directory or use the Manager. IPAdapter always requires the latest version of ComfyUI. If something doesn't work be sure to upgrade. Beware that the automatic update of the manager sometimes doesn't work and you may need to upgrade manually.
79
+
80
+ There's now a *Unified Model Loader*, for it to work you need to name the files exactly as described below. The legacy loaders work with any file name but you have to select them manually. The models can be placed into sub-directories.
81
+
82
+ Remember you can also use any custom location setting an `ipadapter` entry in the `extra_model_paths.yaml` file.
83
+
84
+ - `/ComfyUI/models/clip_vision`
85
+ - [CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors), download and rename
86
+ - [CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors), download and rename
87
+ - [clip-vit-large-patch14-336.bin](https://huggingface.co/Kwai-Kolors/Kolors-IP-Adapter-Plus/resolve/main/image_encoder/pytorch_model.bin), download and rename only for Kolors models
88
+ - `/ComfyUI/models/ipadapter`, create it if not present
89
+ - [ip-adapter_sd15.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15.safetensors), Basic model, average strength
90
+ - [ip-adapter_sd15_light_v11.bin](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_light_v11.bin), Light impact model
91
+ - [ip-adapter-plus_sd15.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus_sd15.safetensors), Plus model, very strong
92
+ - [ip-adapter-plus-face_sd15.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus-face_sd15.safetensors), Face model, portraits
93
+ - [ip-adapter-full-face_sd15.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-full-face_sd15.safetensors), Stronger face model, not necessarily better
94
+ - [ip-adapter_sd15_vit-G.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_vit-G.safetensors), Base model, **requires bigG clip vision encoder**
95
+ - [ip-adapter_sdxl_vit-h.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl_vit-h.safetensors), SDXL model
96
+ - [ip-adapter-plus_sdxl_vit-h.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus_sdxl_vit-h.safetensors), SDXL plus model
97
+ - [ip-adapter-plus-face_sdxl_vit-h.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus-face_sdxl_vit-h.safetensors), SDXL face model
98
+ - [ip-adapter_sdxl.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl.safetensors), vit-G SDXL model, **requires bigG clip vision encoder**
99
+ - **Deprecated** [ip-adapter_sd15_light.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_light.safetensors), v1.0 Light impact model
100
+
101
+ **FaceID** models require `insightface`, you need to install it in your ComfyUI environment. Check [this issue](https://github.com/cubiq/ComfyUI_IPAdapter_plus/issues/162) for help. Remember that most FaceID models also need a LoRA.
102
+
103
+ For the Unified Loader to work the files need to be named exactly as shown in the list below.
104
+
105
+ - `/ComfyUI/models/ipadapter`
106
+ - [ip-adapter-faceid_sd15.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sd15.bin), base FaceID model
107
+ - [ip-adapter-faceid-plusv2_sd15.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15.bin), FaceID plus v2
108
+ - [ip-adapter-faceid-portrait-v11_sd15.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait-v11_sd15.bin), text prompt style transfer for portraits
109
+ - [ip-adapter-faceid_sdxl.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sdxl.bin), SDXL base FaceID
110
+ - [ip-adapter-faceid-plusv2_sdxl.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sdxl.bin), SDXL plus v2
111
+ - [ip-adapter-faceid-portrait_sdxl.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sdxl.bin), SDXL text prompt style transfer
112
+ - [ip-adapter-faceid-portrait_sdxl_unnorm.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sdxl_unnorm.bin), very strong style transfer SDXL only
113
+ - **Deprecated** [ip-adapter-faceid-plus_sd15.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plus_sd15.bin), FaceID plus v1
114
+ - **Deprecated** [ip-adapter-faceid-portrait_sd15.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sd15.bin), v1 of the portrait model
115
+
116
+ Most FaceID models require a LoRA. If you use the `IPAdapter Unified Loader FaceID` it will be loaded automatically if you follow the naming convention. Otherwise you have to load them manually, be careful each FaceID model has to be paired with its own specific LoRA.
117
+
118
+ - `/ComfyUI/models/loras`
119
+ - [ip-adapter-faceid_sd15_lora.safetensors](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sd15_lora.safetensors)
120
+ - [ip-adapter-faceid-plusv2_sd15_lora.safetensors](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15_lora.safetensors)
121
+ - [ip-adapter-faceid_sdxl_lora.safetensors](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sdxl_lora.safetensors), SDXL FaceID LoRA
122
+ - [ip-adapter-faceid-plusv2_sdxl_lora.safetensors](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sdxl_lora.safetensors), SDXL plus v2 LoRA
123
+ - **Deprecated** [ip-adapter-faceid-plus_sd15_lora.safetensors](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plus_sd15_lora.safetensors), LoRA for the deprecated FaceID plus v1 model
124
+
125
+ All models can be found on [huggingface](https://huggingface.co/h94).
126
+
127
+ ### Community's models
128
+
129
+ The community has baked some interesting IPAdapter models.
130
+
131
+ - `/ComfyUI/models/ipadapter`
132
+ - [ip_plus_composition_sd15.safetensors](https://huggingface.co/ostris/ip-composition-adapter/resolve/main/ip_plus_composition_sd15.safetensors), general composition ignoring style and content, more about it [here](https://huggingface.co/ostris/ip-composition-adapter)
133
+ - [ip_plus_composition_sdxl.safetensors](https://huggingface.co/ostris/ip-composition-adapter/resolve/main/ip_plus_composition_sdxl.safetensors), SDXL version
134
+ - [Kolors-IP-Adapter-Plus.bin](https://huggingface.co/Kwai-Kolors/Kolors-IP-Adapter-Plus/resolve/main/ip_adapter_plus_general.bin?download=true), IPAdapter Plus for Kolors model
135
+ - [Kolors-IP-Adapter-FaceID-Plus.bin](https://huggingface.co/Kwai-Kolors/Kolors-IP-Adapter-FaceID-Plus/resolve/main/ipa-faceid-plus.bin?download=true), IPAdapter FaceIDv2 for Kolors model. **Note:** Kolors is trained on InsightFace **antelopev2** model, you need to [manually download it](https://huggingface.co/MonsterMMORPG/tools/tree/main) and place it inside the `models/inisghtface` directory.
136
+
137
+ if you know of other models please let me know and I will add them to the unified loader.
138
+
139
+ ## Generic suggestions
140
+
141
+ There are many workflows included in the [examples](./examples/) directory. Please check them before asking for support.
142
+
143
+ Usually it's a good idea to lower the `weight` to at least `0.8` and increase the number steps. To increase adherece to the prompt you may try to change the **weight type** in the `IPAdapter Advanced` node.
144
+
145
+ ## Nodes reference
146
+
147
+ I'm (slowly) documenting all nodes. Please check the [Nodes reference](./NODES.md).
148
+
149
+ ## Troubleshooting
150
+
151
+ Please check the [troubleshooting](https://github.com/cubiq/ComfyUI_IPAdapter_plus/issues/108) before posting a new issue. Also remember to check the previous closed issues.
152
+
153
+ ## Current sponsors
154
+
155
+ It's only thanks to generous sponsors that **the whole community** can enjoy open and free software. Please join me in thanking the following companies and individuals!
156
+
157
+ ### :trophy: Gold sponsors
158
+
159
+ [![Kaiber.ai](https://f.latent.vision/imgs/kaiber.png)](https://kaiber.ai/)&nbsp; &nbsp;[![InstaSD](https://f.latent.vision/imgs/instasd.png)](https://www.instasd.com/)
160
+
161
+ ### :tada: Silver sponsors
162
+
163
+ [![OperArt.ai](https://f.latent.vision/imgs/openart.png?r=1)](https://openart.ai/workflows)&nbsp; &nbsp;[![Finetuners](https://f.latent.vision/imgs/finetuners.png)](https://www.finetuners.ai/)&nbsp; &nbsp;[![Comfy.ICU](https://f.latent.vision/imgs/comfyicu.png?r=1)](https://comfy.icu/)
164
+
165
+ ### Other companies supporting my projects
166
+
167
+ - [RunComfy](https://www.runcomfy.com/) (ComfyUI Cloud)
168
+
169
+ ### Esteemed individuals
170
+
171
+ - [Øystein Ø. Olsen](https://github.com/FireNeslo)
172
+ - [Jack Gane](https://github.com/ganeJackS)
173
+ - [Nathan Shipley](https://www.nathanshipley.com/)
174
+ - [Dkdnzia](https://github.com/Dkdnzia)
175
+
176
+ [And all my public and private sponsors!](https://github.com/sponsors/cubiq)
177
+
178
+ ## Credits
179
+
180
+ - [IPAdapter](https://github.com/tencent-ailab/IP-Adapter/)
181
+ - [InstantStyle](https://github.com/InstantStyle/InstantStyle)
182
+ - [B-Lora](https://github.com/yardenfren1996/B-LoRA/)
183
+ - [ComfyUI](https://github.com/comfyanonymous/ComfyUI)
184
+ - [laksjdjf](https://github.com/laksjdjf/)
ComfyUI_IPAdapter_plus/__init__.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ ██▓ ██▓███ ▄▄▄ ▓█████▄ ▄▄▄ ██▓███ ▄▄▄█████▓▓█████ ██▀███
3
+ ▓██▒▓██░ ██▒▒████▄ ▒██▀ ██▌▒████▄ ▓██░ ██▒▓ ██▒ ▓▒▓█ ▀ ▓██ ▒ ██▒
4
+ ▒██▒▓██░ ██▓▒▒██ ▀█▄ ░██ █▌▒██ ▀█▄ ▓██░ ██▓▒▒ ▓██░ ▒░▒███ ▓██ ░▄█ ▒
5
+ ░██░▒██▄█▓▒ ▒░██▄▄▄▄██ ░▓█▄ ▌░██▄▄▄▄██ ▒██▄█▓▒ ▒░ ▓██▓ ░ ▒▓█ ▄ ▒██▀▀█▄
6
+ ░██░▒██▒ ░ ░ ▓█ ▓██▒░▒████▓ ▓█ ▓██▒▒██▒ ░ ░ ▒██▒ ░ ░▒████▒░██▓ ▒██▒
7
+ ░▓ ▒▓▒░ ░ ░ ▒▒ ▓▒█░ ▒▒▓ ▒ ▒▒ ▓▒█░▒▓▒░ ░ ░ ▒ ░░ ░░ ▒░ ░░ ▒▓ ░▒▓░
8
+ ▒ ░░▒ ░ ▒ ▒▒ ░ ░ ▒ ▒ ▒ ▒▒ ░░▒ ░ ░ ░ ░ ░ ░▒ ░ ▒░
9
+ ▒ ░░░ ░ ▒ ░ ░ ░ ░ ▒ ░░ ░ ░ ░░ ░
10
+ ░ ░ ░ ░ ░ ░ ░ ░ ░
11
+
12
+ · -—+ IPAdapter Plus Extension for ComfyUI +—- ·
13
+ Brought to you by Matteo "Matt3o/Cubiq" Spinelli
14
+ https://github.com/cubiq/ComfyUI_IPAdapter_plus/
15
+ """
16
+
17
+ from .IPAdapterPlus import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
18
+
19
+ __all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
ComfyUI_IPAdapter_plus/__pycache__/CrossAttentionPatch.cpython-312.pyc ADDED
Binary file (10.3 kB). View file
 
ComfyUI_IPAdapter_plus/__pycache__/IPAdapterPlus.cpython-312.pyc ADDED
Binary file (81.4 kB). View file
 
ComfyUI_IPAdapter_plus/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (2 kB). View file
 
ComfyUI_IPAdapter_plus/__pycache__/image_proj_models.cpython-312.pyc ADDED
Binary file (14 kB). View file
 
ComfyUI_IPAdapter_plus/__pycache__/utils.cpython-312.pyc ADDED
Binary file (19.7 kB). View file
 
ComfyUI_IPAdapter_plus/examples/IPAdapter_FaceIDv2_Kolors.json ADDED
@@ -0,0 +1,852 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 125,
3
+ "last_link_id": 214,
4
+ "nodes": [
5
+ {
6
+ "id": 97,
7
+ "type": "MZ_ChatGLM3_V2",
8
+ "pos": [
9
+ 1573,
10
+ 984
11
+ ],
12
+ "size": {
13
+ "0": 400,
14
+ "1": 200
15
+ },
16
+ "flags": {},
17
+ "order": 10,
18
+ "mode": 0,
19
+ "inputs": [
20
+ {
21
+ "name": "chatglm3_model",
22
+ "type": "CHATGLM3MODEL",
23
+ "link": 142,
24
+ "slot_index": 0
25
+ }
26
+ ],
27
+ "outputs": [
28
+ {
29
+ "name": "CONDITIONING",
30
+ "type": "CONDITIONING",
31
+ "links": [
32
+ 153
33
+ ],
34
+ "shape": 3,
35
+ "slot_index": 0
36
+ }
37
+ ],
38
+ "properties": {
39
+ "Node name for S&R": "MZ_ChatGLM3_V2"
40
+ },
41
+ "widgets_values": [
42
+ "blurry"
43
+ ]
44
+ },
45
+ {
46
+ "id": 76,
47
+ "type": "IPAdapterModelLoader",
48
+ "pos": [
49
+ 1240,
50
+ 1630
51
+ ],
52
+ "size": {
53
+ "0": 315,
54
+ "1": 58
55
+ },
56
+ "flags": {},
57
+ "order": 0,
58
+ "mode": 0,
59
+ "outputs": [
60
+ {
61
+ "name": "IPADAPTER",
62
+ "type": "IPADAPTER",
63
+ "links": [
64
+ 183
65
+ ],
66
+ "shape": 3,
67
+ "slot_index": 0
68
+ }
69
+ ],
70
+ "properties": {
71
+ "Node name for S&R": "IPAdapterModelLoader"
72
+ },
73
+ "widgets_values": [
74
+ "Kolors-IP-Adapter-FaceID-Plus.bin"
75
+ ]
76
+ },
77
+ {
78
+ "id": 93,
79
+ "type": "MZ_KolorsUNETLoaderV2",
80
+ "pos": [
81
+ 1240,
82
+ 1510
83
+ ],
84
+ "size": {
85
+ "0": 315,
86
+ "1": 58
87
+ },
88
+ "flags": {},
89
+ "order": 1,
90
+ "mode": 0,
91
+ "outputs": [
92
+ {
93
+ "name": "model",
94
+ "type": "MODEL",
95
+ "links": [
96
+ 185
97
+ ],
98
+ "shape": 3,
99
+ "slot_index": 0
100
+ }
101
+ ],
102
+ "properties": {
103
+ "Node name for S&R": "MZ_KolorsUNETLoaderV2"
104
+ },
105
+ "widgets_values": [
106
+ "diffusion_pytorch_model.fp16.safetensors"
107
+ ]
108
+ },
109
+ {
110
+ "id": 96,
111
+ "type": "MZ_ChatGLM3Loader",
112
+ "pos": [
113
+ 1161,
114
+ 938
115
+ ],
116
+ "size": {
117
+ "0": 315,
118
+ "1": 58
119
+ },
120
+ "flags": {},
121
+ "order": 2,
122
+ "mode": 0,
123
+ "outputs": [
124
+ {
125
+ "name": "chatglm3_model",
126
+ "type": "CHATGLM3MODEL",
127
+ "links": [
128
+ 141,
129
+ 142
130
+ ],
131
+ "shape": 3,
132
+ "slot_index": 0
133
+ }
134
+ ],
135
+ "properties": {
136
+ "Node name for S&R": "MZ_ChatGLM3Loader"
137
+ },
138
+ "widgets_values": [
139
+ "chatglm3-8bit.safetensors"
140
+ ]
141
+ },
142
+ {
143
+ "id": 94,
144
+ "type": "MZ_ChatGLM3_V2",
145
+ "pos": [
146
+ 1574,
147
+ 702
148
+ ],
149
+ "size": {
150
+ "0": 400,
151
+ "1": 200
152
+ },
153
+ "flags": {},
154
+ "order": 9,
155
+ "mode": 0,
156
+ "inputs": [
157
+ {
158
+ "name": "chatglm3_model",
159
+ "type": "CHATGLM3MODEL",
160
+ "link": 141,
161
+ "slot_index": 0
162
+ }
163
+ ],
164
+ "outputs": [
165
+ {
166
+ "name": "CONDITIONING",
167
+ "type": "CONDITIONING",
168
+ "links": [
169
+ 152
170
+ ],
171
+ "shape": 3,
172
+ "slot_index": 0
173
+ }
174
+ ],
175
+ "properties": {
176
+ "Node name for S&R": "MZ_ChatGLM3_V2"
177
+ },
178
+ "widgets_values": [
179
+ "closeup photo of a beautiful woman wearing cyberpunk clothing, in background a cyberpunk city, highly detailed, 4k"
180
+ ]
181
+ },
182
+ {
183
+ "id": 78,
184
+ "type": "CLIPVisionLoader",
185
+ "pos": [
186
+ 1239,
187
+ 1743
188
+ ],
189
+ "size": {
190
+ "0": 315,
191
+ "1": 58
192
+ },
193
+ "flags": {},
194
+ "order": 3,
195
+ "mode": 0,
196
+ "outputs": [
197
+ {
198
+ "name": "CLIP_VISION",
199
+ "type": "CLIP_VISION",
200
+ "links": [
201
+ 182
202
+ ],
203
+ "shape": 3,
204
+ "slot_index": 0
205
+ }
206
+ ],
207
+ "properties": {
208
+ "Node name for S&R": "CLIPVisionLoader"
209
+ },
210
+ "widgets_values": [
211
+ "clip-vit-large-patch14-336.bin"
212
+ ]
213
+ },
214
+ {
215
+ "id": 70,
216
+ "type": "VAELoader",
217
+ "pos": [
218
+ 2138,
219
+ 1291
220
+ ],
221
+ "size": {
222
+ "0": 315,
223
+ "1": 58
224
+ },
225
+ "flags": {},
226
+ "order": 4,
227
+ "mode": 0,
228
+ "outputs": [
229
+ {
230
+ "name": "VAE",
231
+ "type": "VAE",
232
+ "links": [
233
+ 156
234
+ ],
235
+ "shape": 3,
236
+ "slot_index": 0
237
+ }
238
+ ],
239
+ "properties": {
240
+ "Node name for S&R": "VAELoader"
241
+ },
242
+ "widgets_values": [
243
+ "sdxl_vae.safetensors"
244
+ ]
245
+ },
246
+ {
247
+ "id": 123,
248
+ "type": "IPAdapterNoise",
249
+ "pos": [
250
+ 1373,
251
+ 2032
252
+ ],
253
+ "size": {
254
+ "0": 315,
255
+ "1": 106
256
+ },
257
+ "flags": {},
258
+ "order": 5,
259
+ "mode": 0,
260
+ "inputs": [
261
+ {
262
+ "name": "image_optional",
263
+ "type": "IMAGE",
264
+ "link": null
265
+ }
266
+ ],
267
+ "outputs": [
268
+ {
269
+ "name": "IMAGE",
270
+ "type": "IMAGE",
271
+ "links": [
272
+ 207
273
+ ],
274
+ "shape": 3,
275
+ "slot_index": 0
276
+ }
277
+ ],
278
+ "properties": {
279
+ "Node name for S&R": "IPAdapterNoise"
280
+ },
281
+ "widgets_values": [
282
+ "gaussian",
283
+ 0.6,
284
+ 0
285
+ ]
286
+ },
287
+ {
288
+ "id": 99,
289
+ "type": "KSampler",
290
+ "pos": [
291
+ 2145,
292
+ 950
293
+ ],
294
+ "size": {
295
+ "0": 315,
296
+ "1": 262
297
+ },
298
+ "flags": {},
299
+ "order": 14,
300
+ "mode": 0,
301
+ "inputs": [
302
+ {
303
+ "name": "model",
304
+ "type": "MODEL",
305
+ "link": 186
306
+ },
307
+ {
308
+ "name": "positive",
309
+ "type": "CONDITIONING",
310
+ "link": 152
311
+ },
312
+ {
313
+ "name": "negative",
314
+ "type": "CONDITIONING",
315
+ "link": 153
316
+ },
317
+ {
318
+ "name": "latent_image",
319
+ "type": "LATENT",
320
+ "link": 154
321
+ }
322
+ ],
323
+ "outputs": [
324
+ {
325
+ "name": "LATENT",
326
+ "type": "LATENT",
327
+ "links": [
328
+ 155
329
+ ],
330
+ "shape": 3,
331
+ "slot_index": 0
332
+ }
333
+ ],
334
+ "properties": {
335
+ "Node name for S&R": "KSampler"
336
+ },
337
+ "widgets_values": [
338
+ 19,
339
+ "fixed",
340
+ 30,
341
+ 5,
342
+ "dpmpp_2m",
343
+ "karras",
344
+ 1
345
+ ]
346
+ },
347
+ {
348
+ "id": 114,
349
+ "type": "IPAdapterFaceIDKolors",
350
+ "pos": [
351
+ 1873,
352
+ 1716
353
+ ],
354
+ "size": {
355
+ "0": 262.18988037109375,
356
+ "1": 346
357
+ },
358
+ "flags": {},
359
+ "order": 13,
360
+ "mode": 0,
361
+ "inputs": [
362
+ {
363
+ "name": "model",
364
+ "type": "MODEL",
365
+ "link": 185
366
+ },
367
+ {
368
+ "name": "ipadapter",
369
+ "type": "IPADAPTER",
370
+ "link": 183
371
+ },
372
+ {
373
+ "name": "image",
374
+ "type": "IMAGE",
375
+ "link": 211
376
+ },
377
+ {
378
+ "name": "image_negative",
379
+ "type": "IMAGE",
380
+ "link": 207,
381
+ "slot_index": 3
382
+ },
383
+ {
384
+ "name": "attn_mask",
385
+ "type": "MASK",
386
+ "link": null
387
+ },
388
+ {
389
+ "name": "clip_vision",
390
+ "type": "CLIP_VISION",
391
+ "link": 182
392
+ },
393
+ {
394
+ "name": "insightface",
395
+ "type": "INSIGHTFACE",
396
+ "link": 181
397
+ }
398
+ ],
399
+ "outputs": [
400
+ {
401
+ "name": "MODEL",
402
+ "type": "MODEL",
403
+ "links": [
404
+ 186
405
+ ],
406
+ "shape": 3,
407
+ "slot_index": 0
408
+ },
409
+ {
410
+ "name": "face_image",
411
+ "type": "IMAGE",
412
+ "links": null,
413
+ "shape": 3
414
+ }
415
+ ],
416
+ "properties": {
417
+ "Node name for S&R": "IPAdapterFaceIDKolors"
418
+ },
419
+ "widgets_values": [
420
+ 1,
421
+ 0.9500000000000001,
422
+ 0.85,
423
+ "linear",
424
+ "average",
425
+ 0,
426
+ 1,
427
+ "V only"
428
+ ]
429
+ },
430
+ {
431
+ "id": 100,
432
+ "type": "VAEDecode",
433
+ "pos": [
434
+ 2530,
435
+ 958
436
+ ],
437
+ "size": {
438
+ "0": 140,
439
+ "1": 46
440
+ },
441
+ "flags": {},
442
+ "order": 15,
443
+ "mode": 0,
444
+ "inputs": [
445
+ {
446
+ "name": "samples",
447
+ "type": "LATENT",
448
+ "link": 155
449
+ },
450
+ {
451
+ "name": "vae",
452
+ "type": "VAE",
453
+ "link": 156
454
+ }
455
+ ],
456
+ "outputs": [
457
+ {
458
+ "name": "IMAGE",
459
+ "type": "IMAGE",
460
+ "links": [
461
+ 214
462
+ ],
463
+ "shape": 3,
464
+ "slot_index": 0
465
+ }
466
+ ],
467
+ "properties": {
468
+ "Node name for S&R": "VAEDecode"
469
+ }
470
+ },
471
+ {
472
+ "id": 101,
473
+ "type": "PreviewImage",
474
+ "pos": [
475
+ 2539,
476
+ 1094
477
+ ],
478
+ "size": {
479
+ "0": 844.5427856445312,
480
+ "1": 850.6759643554688
481
+ },
482
+ "flags": {},
483
+ "order": 16,
484
+ "mode": 0,
485
+ "inputs": [
486
+ {
487
+ "name": "images",
488
+ "type": "IMAGE",
489
+ "link": 214
490
+ }
491
+ ],
492
+ "properties": {
493
+ "Node name for S&R": "PreviewImage"
494
+ }
495
+ },
496
+ {
497
+ "id": 9,
498
+ "type": "EmptyLatentImage",
499
+ "pos": [
500
+ 1602,
501
+ 1256
502
+ ],
503
+ "size": {
504
+ "0": 368.5347900390625,
505
+ "1": 106
506
+ },
507
+ "flags": {},
508
+ "order": 6,
509
+ "mode": 0,
510
+ "outputs": [
511
+ {
512
+ "name": "LATENT",
513
+ "type": "LATENT",
514
+ "links": [
515
+ 154
516
+ ],
517
+ "shape": 3,
518
+ "label": "Latent"
519
+ }
520
+ ],
521
+ "properties": {
522
+ "Node name for S&R": "EmptyLatentImage"
523
+ },
524
+ "widgets_values": [
525
+ 1024,
526
+ 1024,
527
+ 1
528
+ ]
529
+ },
530
+ {
531
+ "id": 125,
532
+ "type": "ImageBatch",
533
+ "pos": [
534
+ 1608,
535
+ 1429
536
+ ],
537
+ "size": {
538
+ "0": 210,
539
+ "1": 46
540
+ },
541
+ "flags": {},
542
+ "order": 12,
543
+ "mode": 0,
544
+ "inputs": [
545
+ {
546
+ "name": "image1",
547
+ "type": "IMAGE",
548
+ "link": 210
549
+ },
550
+ {
551
+ "name": "image2",
552
+ "type": "IMAGE",
553
+ "link": 209
554
+ }
555
+ ],
556
+ "outputs": [
557
+ {
558
+ "name": "IMAGE",
559
+ "type": "IMAGE",
560
+ "links": [
561
+ 211
562
+ ],
563
+ "shape": 3,
564
+ "slot_index": 0
565
+ }
566
+ ],
567
+ "properties": {
568
+ "Node name for S&R": "ImageBatch"
569
+ }
570
+ },
571
+ {
572
+ "id": 124,
573
+ "type": "ImageRandomTransform+",
574
+ "pos": [
575
+ 1330,
576
+ 1319
577
+ ],
578
+ "size": {
579
+ "0": 210,
580
+ "1": 130
581
+ },
582
+ "flags": {},
583
+ "order": 11,
584
+ "mode": 0,
585
+ "inputs": [
586
+ {
587
+ "name": "image",
588
+ "type": "IMAGE",
589
+ "link": 208
590
+ }
591
+ ],
592
+ "outputs": [
593
+ {
594
+ "name": "IMAGE",
595
+ "type": "IMAGE",
596
+ "links": [
597
+ 209
598
+ ],
599
+ "shape": 3,
600
+ "slot_index": 0
601
+ }
602
+ ],
603
+ "properties": {
604
+ "Node name for S&R": "ImageRandomTransform+"
605
+ },
606
+ "widgets_values": [
607
+ 0,
608
+ "fixed",
609
+ 4,
610
+ 0.2
611
+ ]
612
+ },
613
+ {
614
+ "id": 77,
615
+ "type": "LoadImage",
616
+ "pos": [
617
+ 852,
618
+ 1317
619
+ ],
620
+ "size": {
621
+ "0": 318.49505615234375,
622
+ "1": 426.4323425292969
623
+ },
624
+ "flags": {},
625
+ "order": 7,
626
+ "mode": 0,
627
+ "outputs": [
628
+ {
629
+ "name": "IMAGE",
630
+ "type": "IMAGE",
631
+ "links": [
632
+ 208,
633
+ 210
634
+ ],
635
+ "shape": 3,
636
+ "slot_index": 0
637
+ },
638
+ {
639
+ "name": "MASK",
640
+ "type": "MASK",
641
+ "links": null,
642
+ "shape": 3
643
+ }
644
+ ],
645
+ "properties": {
646
+ "Node name for S&R": "LoadImage"
647
+ },
648
+ "widgets_values": [
649
+ "ferguson_4.jpg",
650
+ "image"
651
+ ]
652
+ },
653
+ {
654
+ "id": 90,
655
+ "type": "IPAdapterInsightFaceLoader",
656
+ "pos": [
657
+ 1238,
658
+ 1867
659
+ ],
660
+ "size": {
661
+ "0": 315,
662
+ "1": 82
663
+ },
664
+ "flags": {},
665
+ "order": 8,
666
+ "mode": 0,
667
+ "inputs": [
668
+ {
669
+ "name": "model_name",
670
+ "type": "buffalo_l",
671
+ "link": null
672
+ }
673
+ ],
674
+ "outputs": [
675
+ {
676
+ "name": "INSIGHTFACE",
677
+ "type": "INSIGHTFACE",
678
+ "links": [
679
+ 181
680
+ ],
681
+ "shape": 3,
682
+ "slot_index": 0
683
+ }
684
+ ],
685
+ "properties": {
686
+ "Node name for S&R": "IPAdapterInsightFaceLoader"
687
+ },
688
+ "widgets_values": [
689
+ "CPU",
690
+ "antelopev2"
691
+ ]
692
+ }
693
+ ],
694
+ "links": [
695
+ [
696
+ 141,
697
+ 96,
698
+ 0,
699
+ 94,
700
+ 0,
701
+ "CHATGLM3MODEL"
702
+ ],
703
+ [
704
+ 142,
705
+ 96,
706
+ 0,
707
+ 97,
708
+ 0,
709
+ "CHATGLM3MODEL"
710
+ ],
711
+ [
712
+ 152,
713
+ 94,
714
+ 0,
715
+ 99,
716
+ 1,
717
+ "CONDITIONING"
718
+ ],
719
+ [
720
+ 153,
721
+ 97,
722
+ 0,
723
+ 99,
724
+ 2,
725
+ "CONDITIONING"
726
+ ],
727
+ [
728
+ 154,
729
+ 9,
730
+ 0,
731
+ 99,
732
+ 3,
733
+ "LATENT"
734
+ ],
735
+ [
736
+ 155,
737
+ 99,
738
+ 0,
739
+ 100,
740
+ 0,
741
+ "LATENT"
742
+ ],
743
+ [
744
+ 156,
745
+ 70,
746
+ 0,
747
+ 100,
748
+ 1,
749
+ "VAE"
750
+ ],
751
+ [
752
+ 181,
753
+ 90,
754
+ 0,
755
+ 114,
756
+ 6,
757
+ "INSIGHTFACE"
758
+ ],
759
+ [
760
+ 182,
761
+ 78,
762
+ 0,
763
+ 114,
764
+ 5,
765
+ "CLIP_VISION"
766
+ ],
767
+ [
768
+ 183,
769
+ 76,
770
+ 0,
771
+ 114,
772
+ 1,
773
+ "IPADAPTER"
774
+ ],
775
+ [
776
+ 185,
777
+ 93,
778
+ 0,
779
+ 114,
780
+ 0,
781
+ "MODEL"
782
+ ],
783
+ [
784
+ 186,
785
+ 114,
786
+ 0,
787
+ 99,
788
+ 0,
789
+ "MODEL"
790
+ ],
791
+ [
792
+ 207,
793
+ 123,
794
+ 0,
795
+ 114,
796
+ 3,
797
+ "IMAGE"
798
+ ],
799
+ [
800
+ 208,
801
+ 77,
802
+ 0,
803
+ 124,
804
+ 0,
805
+ "IMAGE"
806
+ ],
807
+ [
808
+ 209,
809
+ 124,
810
+ 0,
811
+ 125,
812
+ 1,
813
+ "IMAGE"
814
+ ],
815
+ [
816
+ 210,
817
+ 77,
818
+ 0,
819
+ 125,
820
+ 0,
821
+ "IMAGE"
822
+ ],
823
+ [
824
+ 211,
825
+ 125,
826
+ 0,
827
+ 114,
828
+ 2,
829
+ "IMAGE"
830
+ ],
831
+ [
832
+ 214,
833
+ 100,
834
+ 0,
835
+ 101,
836
+ 0,
837
+ "IMAGE"
838
+ ]
839
+ ],
840
+ "groups": [],
841
+ "config": {},
842
+ "extra": {
843
+ "ds": {
844
+ "scale": 0.620921323059155,
845
+ "offset": [
846
+ -744.2364448476837,
847
+ -557.6173984999696
848
+ ]
849
+ }
850
+ },
851
+ "version": 0.4
852
+ }
ComfyUI_IPAdapter_plus/examples/demo_workflow.jpg ADDED
ComfyUI_IPAdapter_plus/examples/ipadapter_advanced.json ADDED
@@ -0,0 +1,619 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 17,
3
+ "last_link_id": 26,
4
+ "nodes": [
5
+ {
6
+ "id": 4,
7
+ "type": "CheckpointLoaderSimple",
8
+ "pos": [
9
+ 50,
10
+ 730
11
+ ],
12
+ "size": {
13
+ "0": 315,
14
+ "1": 98
15
+ },
16
+ "flags": {},
17
+ "order": 0,
18
+ "mode": 0,
19
+ "outputs": [
20
+ {
21
+ "name": "MODEL",
22
+ "type": "MODEL",
23
+ "links": [
24
+ 20
25
+ ],
26
+ "slot_index": 0
27
+ },
28
+ {
29
+ "name": "CLIP",
30
+ "type": "CLIP",
31
+ "links": [
32
+ 3,
33
+ 5
34
+ ],
35
+ "slot_index": 1
36
+ },
37
+ {
38
+ "name": "VAE",
39
+ "type": "VAE",
40
+ "links": [
41
+ 8
42
+ ],
43
+ "slot_index": 2
44
+ }
45
+ ],
46
+ "properties": {
47
+ "Node name for S&R": "CheckpointLoaderSimple"
48
+ },
49
+ "widgets_values": [
50
+ "sd15/realisticVisionV51_v51VAE.safetensors"
51
+ ]
52
+ },
53
+ {
54
+ "id": 9,
55
+ "type": "SaveImage",
56
+ "pos": [
57
+ 1770,
58
+ 710
59
+ ],
60
+ "size": {
61
+ "0": 529.7760009765625,
62
+ "1": 582.3048095703125
63
+ },
64
+ "flags": {},
65
+ "order": 11,
66
+ "mode": 0,
67
+ "inputs": [
68
+ {
69
+ "name": "images",
70
+ "type": "IMAGE",
71
+ "link": 9
72
+ }
73
+ ],
74
+ "properties": {},
75
+ "widgets_values": [
76
+ "IPAdapter"
77
+ ]
78
+ },
79
+ {
80
+ "id": 7,
81
+ "type": "CLIPTextEncode",
82
+ "pos": [
83
+ 690,
84
+ 840
85
+ ],
86
+ "size": {
87
+ "0": 425.27801513671875,
88
+ "1": 180.6060791015625
89
+ },
90
+ "flags": {},
91
+ "order": 6,
92
+ "mode": 0,
93
+ "inputs": [
94
+ {
95
+ "name": "clip",
96
+ "type": "CLIP",
97
+ "link": 5
98
+ }
99
+ ],
100
+ "outputs": [
101
+ {
102
+ "name": "CONDITIONING",
103
+ "type": "CONDITIONING",
104
+ "links": [
105
+ 6
106
+ ],
107
+ "slot_index": 0
108
+ }
109
+ ],
110
+ "properties": {
111
+ "Node name for S&R": "CLIPTextEncode"
112
+ },
113
+ "widgets_values": [
114
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed"
115
+ ]
116
+ },
117
+ {
118
+ "id": 8,
119
+ "type": "VAEDecode",
120
+ "pos": [
121
+ 1570,
122
+ 700
123
+ ],
124
+ "size": {
125
+ "0": 140,
126
+ "1": 46
127
+ },
128
+ "flags": {},
129
+ "order": 10,
130
+ "mode": 0,
131
+ "inputs": [
132
+ {
133
+ "name": "samples",
134
+ "type": "LATENT",
135
+ "link": 7
136
+ },
137
+ {
138
+ "name": "vae",
139
+ "type": "VAE",
140
+ "link": 8
141
+ }
142
+ ],
143
+ "outputs": [
144
+ {
145
+ "name": "IMAGE",
146
+ "type": "IMAGE",
147
+ "links": [
148
+ 9
149
+ ],
150
+ "slot_index": 0
151
+ }
152
+ ],
153
+ "properties": {
154
+ "Node name for S&R": "VAEDecode"
155
+ }
156
+ },
157
+ {
158
+ "id": 5,
159
+ "type": "EmptyLatentImage",
160
+ "pos": [
161
+ 801,
162
+ 1097
163
+ ],
164
+ "size": {
165
+ "0": 315,
166
+ "1": 106
167
+ },
168
+ "flags": {},
169
+ "order": 1,
170
+ "mode": 0,
171
+ "outputs": [
172
+ {
173
+ "name": "LATENT",
174
+ "type": "LATENT",
175
+ "links": [
176
+ 2
177
+ ],
178
+ "slot_index": 0
179
+ }
180
+ ],
181
+ "properties": {
182
+ "Node name for S&R": "EmptyLatentImage"
183
+ },
184
+ "widgets_values": [
185
+ 512,
186
+ 512,
187
+ 1
188
+ ]
189
+ },
190
+ {
191
+ "id": 6,
192
+ "type": "CLIPTextEncode",
193
+ "pos": [
194
+ 690,
195
+ 610
196
+ ],
197
+ "size": {
198
+ "0": 422.84503173828125,
199
+ "1": 164.31304931640625
200
+ },
201
+ "flags": {},
202
+ "order": 5,
203
+ "mode": 0,
204
+ "inputs": [
205
+ {
206
+ "name": "clip",
207
+ "type": "CLIP",
208
+ "link": 3
209
+ }
210
+ ],
211
+ "outputs": [
212
+ {
213
+ "name": "CONDITIONING",
214
+ "type": "CONDITIONING",
215
+ "links": [
216
+ 4
217
+ ],
218
+ "slot_index": 0
219
+ }
220
+ ],
221
+ "properties": {
222
+ "Node name for S&R": "CLIPTextEncode"
223
+ },
224
+ "widgets_values": [
225
+ "in a peaceful spring morning a woman wearing a white shirt is sitting in a park on a bench\n\nhigh quality, detailed, diffuse light"
226
+ ]
227
+ },
228
+ {
229
+ "id": 3,
230
+ "type": "KSampler",
231
+ "pos": [
232
+ 1210,
233
+ 700
234
+ ],
235
+ "size": {
236
+ "0": 315,
237
+ "1": 262
238
+ },
239
+ "flags": {},
240
+ "order": 9,
241
+ "mode": 0,
242
+ "inputs": [
243
+ {
244
+ "name": "model",
245
+ "type": "MODEL",
246
+ "link": 23
247
+ },
248
+ {
249
+ "name": "positive",
250
+ "type": "CONDITIONING",
251
+ "link": 4
252
+ },
253
+ {
254
+ "name": "negative",
255
+ "type": "CONDITIONING",
256
+ "link": 6
257
+ },
258
+ {
259
+ "name": "latent_image",
260
+ "type": "LATENT",
261
+ "link": 2
262
+ }
263
+ ],
264
+ "outputs": [
265
+ {
266
+ "name": "LATENT",
267
+ "type": "LATENT",
268
+ "links": [
269
+ 7
270
+ ],
271
+ "slot_index": 0
272
+ }
273
+ ],
274
+ "properties": {
275
+ "Node name for S&R": "KSampler"
276
+ },
277
+ "widgets_values": [
278
+ 0,
279
+ "fixed",
280
+ 30,
281
+ 6.5,
282
+ "ddpm",
283
+ "karras",
284
+ 1
285
+ ]
286
+ },
287
+ {
288
+ "id": 14,
289
+ "type": "IPAdapterAdvanced",
290
+ "pos": [
291
+ 801,
292
+ 256
293
+ ],
294
+ "size": {
295
+ "0": 315,
296
+ "1": 278
297
+ },
298
+ "flags": {},
299
+ "order": 8,
300
+ "mode": 0,
301
+ "inputs": [
302
+ {
303
+ "name": "model",
304
+ "type": "MODEL",
305
+ "link": 20
306
+ },
307
+ {
308
+ "name": "ipadapter",
309
+ "type": "IPADAPTER",
310
+ "link": 21,
311
+ "slot_index": 1
312
+ },
313
+ {
314
+ "name": "image",
315
+ "type": "IMAGE",
316
+ "link": 26
317
+ },
318
+ {
319
+ "name": "image_negative",
320
+ "type": "IMAGE",
321
+ "link": null
322
+ },
323
+ {
324
+ "name": "attn_mask",
325
+ "type": "MASK",
326
+ "link": null
327
+ },
328
+ {
329
+ "name": "clip_vision",
330
+ "type": "CLIP_VISION",
331
+ "link": 24,
332
+ "slot_index": 5
333
+ }
334
+ ],
335
+ "outputs": [
336
+ {
337
+ "name": "MODEL",
338
+ "type": "MODEL",
339
+ "links": [
340
+ 23
341
+ ],
342
+ "shape": 3,
343
+ "slot_index": 0
344
+ }
345
+ ],
346
+ "properties": {
347
+ "Node name for S&R": "IPAdapterAdvanced"
348
+ },
349
+ "widgets_values": [
350
+ 0.8,
351
+ "linear",
352
+ "concat",
353
+ 0,
354
+ 1,
355
+ "V only"
356
+ ]
357
+ },
358
+ {
359
+ "id": 17,
360
+ "type": "PrepImageForClipVision",
361
+ "pos": [
362
+ 797,
363
+ 87
364
+ ],
365
+ "size": {
366
+ "0": 315,
367
+ "1": 106
368
+ },
369
+ "flags": {},
370
+ "order": 7,
371
+ "mode": 0,
372
+ "inputs": [
373
+ {
374
+ "name": "image",
375
+ "type": "IMAGE",
376
+ "link": 25
377
+ }
378
+ ],
379
+ "outputs": [
380
+ {
381
+ "name": "IMAGE",
382
+ "type": "IMAGE",
383
+ "links": [
384
+ 26
385
+ ],
386
+ "shape": 3,
387
+ "slot_index": 0
388
+ }
389
+ ],
390
+ "properties": {
391
+ "Node name for S&R": "PrepImageForClipVision"
392
+ },
393
+ "widgets_values": [
394
+ "LANCZOS",
395
+ "top",
396
+ 0.15
397
+ ]
398
+ },
399
+ {
400
+ "id": 15,
401
+ "type": "IPAdapterModelLoader",
402
+ "pos": [
403
+ 308,
404
+ 52
405
+ ],
406
+ "size": {
407
+ "0": 315,
408
+ "1": 58
409
+ },
410
+ "flags": {},
411
+ "order": 2,
412
+ "mode": 0,
413
+ "outputs": [
414
+ {
415
+ "name": "IPADAPTER",
416
+ "type": "IPADAPTER",
417
+ "links": [
418
+ 21
419
+ ],
420
+ "shape": 3
421
+ }
422
+ ],
423
+ "properties": {
424
+ "Node name for S&R": "IPAdapterModelLoader"
425
+ },
426
+ "widgets_values": [
427
+ "ip-adapter-plus_sd15.safetensors"
428
+ ]
429
+ },
430
+ {
431
+ "id": 16,
432
+ "type": "CLIPVisionLoader",
433
+ "pos": [
434
+ 308,
435
+ 161
436
+ ],
437
+ "size": {
438
+ "0": 315,
439
+ "1": 58
440
+ },
441
+ "flags": {},
442
+ "order": 3,
443
+ "mode": 0,
444
+ "outputs": [
445
+ {
446
+ "name": "CLIP_VISION",
447
+ "type": "CLIP_VISION",
448
+ "links": [
449
+ 24
450
+ ],
451
+ "shape": 3
452
+ }
453
+ ],
454
+ "properties": {
455
+ "Node name for S&R": "CLIPVisionLoader"
456
+ },
457
+ "widgets_values": [
458
+ "CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors"
459
+ ]
460
+ },
461
+ {
462
+ "id": 12,
463
+ "type": "LoadImage",
464
+ "pos": [
465
+ 311,
466
+ 270
467
+ ],
468
+ "size": {
469
+ "0": 315,
470
+ "1": 314
471
+ },
472
+ "flags": {},
473
+ "order": 4,
474
+ "mode": 0,
475
+ "outputs": [
476
+ {
477
+ "name": "IMAGE",
478
+ "type": "IMAGE",
479
+ "links": [
480
+ 25
481
+ ],
482
+ "shape": 3,
483
+ "slot_index": 0
484
+ },
485
+ {
486
+ "name": "MASK",
487
+ "type": "MASK",
488
+ "links": null,
489
+ "shape": 3
490
+ }
491
+ ],
492
+ "properties": {
493
+ "Node name for S&R": "LoadImage"
494
+ },
495
+ "widgets_values": [
496
+ "warrior_woman.png",
497
+ "image"
498
+ ]
499
+ }
500
+ ],
501
+ "links": [
502
+ [
503
+ 2,
504
+ 5,
505
+ 0,
506
+ 3,
507
+ 3,
508
+ "LATENT"
509
+ ],
510
+ [
511
+ 3,
512
+ 4,
513
+ 1,
514
+ 6,
515
+ 0,
516
+ "CLIP"
517
+ ],
518
+ [
519
+ 4,
520
+ 6,
521
+ 0,
522
+ 3,
523
+ 1,
524
+ "CONDITIONING"
525
+ ],
526
+ [
527
+ 5,
528
+ 4,
529
+ 1,
530
+ 7,
531
+ 0,
532
+ "CLIP"
533
+ ],
534
+ [
535
+ 6,
536
+ 7,
537
+ 0,
538
+ 3,
539
+ 2,
540
+ "CONDITIONING"
541
+ ],
542
+ [
543
+ 7,
544
+ 3,
545
+ 0,
546
+ 8,
547
+ 0,
548
+ "LATENT"
549
+ ],
550
+ [
551
+ 8,
552
+ 4,
553
+ 2,
554
+ 8,
555
+ 1,
556
+ "VAE"
557
+ ],
558
+ [
559
+ 9,
560
+ 8,
561
+ 0,
562
+ 9,
563
+ 0,
564
+ "IMAGE"
565
+ ],
566
+ [
567
+ 20,
568
+ 4,
569
+ 0,
570
+ 14,
571
+ 0,
572
+ "MODEL"
573
+ ],
574
+ [
575
+ 21,
576
+ 15,
577
+ 0,
578
+ 14,
579
+ 1,
580
+ "IPADAPTER"
581
+ ],
582
+ [
583
+ 23,
584
+ 14,
585
+ 0,
586
+ 3,
587
+ 0,
588
+ "MODEL"
589
+ ],
590
+ [
591
+ 24,
592
+ 16,
593
+ 0,
594
+ 14,
595
+ 5,
596
+ "CLIP_VISION"
597
+ ],
598
+ [
599
+ 25,
600
+ 12,
601
+ 0,
602
+ 17,
603
+ 0,
604
+ "IMAGE"
605
+ ],
606
+ [
607
+ 26,
608
+ 17,
609
+ 0,
610
+ 14,
611
+ 2,
612
+ "IMAGE"
613
+ ]
614
+ ],
615
+ "groups": [],
616
+ "config": {},
617
+ "extra": {},
618
+ "version": 0.4
619
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_clipvision_enhancer.json ADDED
@@ -0,0 +1,918 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 42,
3
+ "last_link_id": 81,
4
+ "nodes": [
5
+ {
6
+ "id": 4,
7
+ "type": "CheckpointLoaderSimple",
8
+ "pos": [
9
+ -816,
10
+ -107
11
+ ],
12
+ "size": {
13
+ "0": 315,
14
+ "1": 98
15
+ },
16
+ "flags": {},
17
+ "order": 0,
18
+ "mode": 0,
19
+ "outputs": [
20
+ {
21
+ "name": "MODEL",
22
+ "type": "MODEL",
23
+ "links": [
24
+ 16
25
+ ],
26
+ "slot_index": 0
27
+ },
28
+ {
29
+ "name": "CLIP",
30
+ "type": "CLIP",
31
+ "links": [
32
+ 3,
33
+ 5
34
+ ],
35
+ "slot_index": 1
36
+ },
37
+ {
38
+ "name": "VAE",
39
+ "type": "VAE",
40
+ "links": [
41
+ 59
42
+ ],
43
+ "slot_index": 2
44
+ }
45
+ ],
46
+ "properties": {
47
+ "Node name for S&R": "CheckpointLoaderSimple"
48
+ },
49
+ "widgets_values": [
50
+ "sdxl/RealVisXL_V4.0.safetensors"
51
+ ]
52
+ },
53
+ {
54
+ "id": 36,
55
+ "type": "ImageCASharpening+",
56
+ "pos": [
57
+ -160,
58
+ -580
59
+ ],
60
+ "size": [
61
+ 310.79998779296875,
62
+ 58
63
+ ],
64
+ "flags": {},
65
+ "order": 13,
66
+ "mode": 0,
67
+ "inputs": [
68
+ {
69
+ "name": "image",
70
+ "type": "IMAGE",
71
+ "link": 67
72
+ }
73
+ ],
74
+ "outputs": [
75
+ {
76
+ "name": "IMAGE",
77
+ "type": "IMAGE",
78
+ "links": [
79
+ 68
80
+ ],
81
+ "shape": 3,
82
+ "slot_index": 0
83
+ }
84
+ ],
85
+ "properties": {
86
+ "Node name for S&R": "ImageCASharpening+"
87
+ },
88
+ "widgets_values": [
89
+ 0.5
90
+ ]
91
+ },
92
+ {
93
+ "id": 29,
94
+ "type": "ImageScale",
95
+ "pos": [
96
+ -270,
97
+ -440
98
+ ],
99
+ "size": [
100
+ 231.94505310058594,
101
+ 130
102
+ ],
103
+ "flags": {},
104
+ "order": 12,
105
+ "mode": 0,
106
+ "inputs": [
107
+ {
108
+ "name": "image",
109
+ "type": "IMAGE",
110
+ "link": 79
111
+ },
112
+ {
113
+ "name": "width",
114
+ "type": "INT",
115
+ "link": 51,
116
+ "widget": {
117
+ "name": "width"
118
+ }
119
+ },
120
+ {
121
+ "name": "height",
122
+ "type": "INT",
123
+ "link": 53,
124
+ "widget": {
125
+ "name": "height"
126
+ }
127
+ }
128
+ ],
129
+ "outputs": [
130
+ {
131
+ "name": "IMAGE",
132
+ "type": "IMAGE",
133
+ "links": [
134
+ 67
135
+ ],
136
+ "shape": 3,
137
+ "slot_index": 0
138
+ }
139
+ ],
140
+ "properties": {
141
+ "Node name for S&R": "ImageScale"
142
+ },
143
+ "widgets_values": [
144
+ "lanczos",
145
+ 224,
146
+ 224,
147
+ "disabled"
148
+ ]
149
+ },
150
+ {
151
+ "id": 13,
152
+ "type": "IPAdapterUnifiedLoader",
153
+ "pos": [
154
+ -296,
155
+ -232
156
+ ],
157
+ "size": {
158
+ "0": 315,
159
+ "1": 78
160
+ },
161
+ "flags": {},
162
+ "order": 8,
163
+ "mode": 0,
164
+ "inputs": [
165
+ {
166
+ "name": "model",
167
+ "type": "MODEL",
168
+ "link": 16
169
+ },
170
+ {
171
+ "name": "ipadapter",
172
+ "type": "IPADAPTER",
173
+ "link": null
174
+ }
175
+ ],
176
+ "outputs": [
177
+ {
178
+ "name": "model",
179
+ "type": "MODEL",
180
+ "links": [
181
+ 47
182
+ ],
183
+ "shape": 3,
184
+ "slot_index": 0
185
+ },
186
+ {
187
+ "name": "ipadapter",
188
+ "type": "IPADAPTER",
189
+ "links": [
190
+ 48
191
+ ],
192
+ "shape": 3,
193
+ "slot_index": 1
194
+ }
195
+ ],
196
+ "properties": {
197
+ "Node name for S&R": "IPAdapterUnifiedLoader"
198
+ },
199
+ "widgets_values": [
200
+ "PLUS (high strength)"
201
+ ]
202
+ },
203
+ {
204
+ "id": 7,
205
+ "type": "CLIPTextEncode",
206
+ "pos": [
207
+ 133,
208
+ 72
209
+ ],
210
+ "size": {
211
+ "0": 425.27801513671875,
212
+ "1": 180.6060791015625
213
+ },
214
+ "flags": {},
215
+ "order": 10,
216
+ "mode": 0,
217
+ "inputs": [
218
+ {
219
+ "name": "clip",
220
+ "type": "CLIP",
221
+ "link": 5
222
+ }
223
+ ],
224
+ "outputs": [
225
+ {
226
+ "name": "CONDITIONING",
227
+ "type": "CONDITIONING",
228
+ "links": [
229
+ 76
230
+ ],
231
+ "slot_index": 0
232
+ }
233
+ ],
234
+ "properties": {
235
+ "Node name for S&R": "CLIPTextEncode"
236
+ },
237
+ "widgets_values": [
238
+ "blurry, glitches, artifact, distorted, malformed, dirt, eyeglasses"
239
+ ]
240
+ },
241
+ {
242
+ "id": 38,
243
+ "type": "EmptyLatentImage",
244
+ "pos": [
245
+ 341,
246
+ 324
247
+ ],
248
+ "size": [
249
+ 210,
250
+ 106
251
+ ],
252
+ "flags": {},
253
+ "order": 1,
254
+ "mode": 0,
255
+ "outputs": [
256
+ {
257
+ "name": "LATENT",
258
+ "type": "LATENT",
259
+ "links": [
260
+ 78
261
+ ],
262
+ "shape": 3,
263
+ "slot_index": 0
264
+ }
265
+ ],
266
+ "properties": {
267
+ "Node name for S&R": "EmptyLatentImage"
268
+ },
269
+ "widgets_values": [
270
+ 1024,
271
+ 1024,
272
+ 1
273
+ ]
274
+ },
275
+ {
276
+ "id": 32,
277
+ "type": "KSampler",
278
+ "pos": [
279
+ 722,
280
+ -129
281
+ ],
282
+ "size": {
283
+ "0": 315,
284
+ "1": 262
285
+ },
286
+ "flags": {},
287
+ "order": 15,
288
+ "mode": 0,
289
+ "inputs": [
290
+ {
291
+ "name": "model",
292
+ "type": "MODEL",
293
+ "link": 58
294
+ },
295
+ {
296
+ "name": "positive",
297
+ "type": "CONDITIONING",
298
+ "link": 75
299
+ },
300
+ {
301
+ "name": "negative",
302
+ "type": "CONDITIONING",
303
+ "link": 76
304
+ },
305
+ {
306
+ "name": "latent_image",
307
+ "type": "LATENT",
308
+ "link": 78
309
+ }
310
+ ],
311
+ "outputs": [
312
+ {
313
+ "name": "LATENT",
314
+ "type": "LATENT",
315
+ "links": [
316
+ 61
317
+ ],
318
+ "slot_index": 0
319
+ }
320
+ ],
321
+ "properties": {
322
+ "Node name for S&R": "KSampler"
323
+ },
324
+ "widgets_values": [
325
+ 3,
326
+ "fixed",
327
+ 30,
328
+ 5,
329
+ "dpmpp_2m",
330
+ "karras",
331
+ 1
332
+ ]
333
+ },
334
+ {
335
+ "id": 33,
336
+ "type": "VAEDecode",
337
+ "pos": [
338
+ 1107,
339
+ -130
340
+ ],
341
+ "size": {
342
+ "0": 140,
343
+ "1": 46
344
+ },
345
+ "flags": {
346
+ "collapsed": false
347
+ },
348
+ "order": 16,
349
+ "mode": 0,
350
+ "inputs": [
351
+ {
352
+ "name": "samples",
353
+ "type": "LATENT",
354
+ "link": 61
355
+ },
356
+ {
357
+ "name": "vae",
358
+ "type": "VAE",
359
+ "link": 59
360
+ }
361
+ ],
362
+ "outputs": [
363
+ {
364
+ "name": "IMAGE",
365
+ "type": "IMAGE",
366
+ "links": [
367
+ 60
368
+ ],
369
+ "slot_index": 0
370
+ }
371
+ ],
372
+ "properties": {
373
+ "Node name for S&R": "VAEDecode"
374
+ }
375
+ },
376
+ {
377
+ "id": 31,
378
+ "type": "SimpleMath+",
379
+ "pos": [
380
+ -566,
381
+ -413
382
+ ],
383
+ "size": {
384
+ "0": 210,
385
+ "1": 78
386
+ },
387
+ "flags": {},
388
+ "order": 11,
389
+ "mode": 0,
390
+ "inputs": [
391
+ {
392
+ "name": "a",
393
+ "type": "INT,FLOAT",
394
+ "link": 50
395
+ },
396
+ {
397
+ "name": "b",
398
+ "type": "INT,FLOAT",
399
+ "link": null
400
+ }
401
+ ],
402
+ "outputs": [
403
+ {
404
+ "name": "INT",
405
+ "type": "INT",
406
+ "links": [
407
+ 51,
408
+ 53
409
+ ],
410
+ "shape": 3,
411
+ "slot_index": 0
412
+ },
413
+ {
414
+ "name": "FLOAT",
415
+ "type": "FLOAT",
416
+ "links": null,
417
+ "shape": 3
418
+ }
419
+ ],
420
+ "properties": {
421
+ "Node name for S&R": "SimpleMath+"
422
+ },
423
+ "widgets_values": [
424
+ "a*224"
425
+ ]
426
+ },
427
+ {
428
+ "id": 40,
429
+ "type": "Note",
430
+ "pos": [
431
+ -548,
432
+ -578
433
+ ],
434
+ "size": [
435
+ 263.130633831987,
436
+ 106.42462429008373
437
+ ],
438
+ "flags": {},
439
+ "order": 2,
440
+ "mode": 0,
441
+ "properties": {
442
+ "text": ""
443
+ },
444
+ "widgets_values": [
445
+ "Resize the image to optimal resolution. ie: 224*number_of_tiles.\n\nThe original image should be a square bigger than 224*number_of_tiles."
446
+ ],
447
+ "color": "#432",
448
+ "bgcolor": "#653"
449
+ },
450
+ {
451
+ "id": 39,
452
+ "type": "Note",
453
+ "pos": [
454
+ -18,
455
+ -704
456
+ ],
457
+ "size": [
458
+ 210,
459
+ 69.97374358070851
460
+ ],
461
+ "flags": {},
462
+ "order": 3,
463
+ "mode": 0,
464
+ "properties": {
465
+ "text": ""
466
+ },
467
+ "widgets_values": [
468
+ "do NOT use PrepForClipVsion with the ClipVision Enhancer!"
469
+ ],
470
+ "color": "#432",
471
+ "bgcolor": "#653"
472
+ },
473
+ {
474
+ "id": 6,
475
+ "type": "CLIPTextEncode",
476
+ "pos": [
477
+ 133,
478
+ -166
479
+ ],
480
+ "size": {
481
+ "0": 422.84503173828125,
482
+ "1": 164.31304931640625
483
+ },
484
+ "flags": {},
485
+ "order": 9,
486
+ "mode": 0,
487
+ "inputs": [
488
+ {
489
+ "name": "clip",
490
+ "type": "CLIP",
491
+ "link": 3
492
+ }
493
+ ],
494
+ "outputs": [
495
+ {
496
+ "name": "CONDITIONING",
497
+ "type": "CONDITIONING",
498
+ "links": [
499
+ 75
500
+ ],
501
+ "slot_index": 0
502
+ }
503
+ ],
504
+ "properties": {
505
+ "Node name for S&R": "CLIPTextEncode"
506
+ },
507
+ "widgets_values": [
508
+ "illustration of a warrior woman with long red hair wearing a full armor with purple and gold decorations, detailed, intricate, high resolution, 4k"
509
+ ]
510
+ },
511
+ {
512
+ "id": 14,
513
+ "type": "LoadImage",
514
+ "pos": [
515
+ -1306,
516
+ -677
517
+ ],
518
+ "size": [
519
+ 397.77813257424236,
520
+ 475.1389358531744
521
+ ],
522
+ "flags": {},
523
+ "order": 4,
524
+ "mode": 0,
525
+ "outputs": [
526
+ {
527
+ "name": "IMAGE",
528
+ "type": "IMAGE",
529
+ "links": [
530
+ 79
531
+ ],
532
+ "shape": 3,
533
+ "slot_index": 0
534
+ },
535
+ {
536
+ "name": "MASK",
537
+ "type": "MASK",
538
+ "links": null,
539
+ "shape": 3
540
+ }
541
+ ],
542
+ "properties": {
543
+ "Node name for S&R": "LoadImage"
544
+ },
545
+ "widgets_values": [
546
+ "warrior_woman.png",
547
+ "image"
548
+ ]
549
+ },
550
+ {
551
+ "id": 28,
552
+ "type": "IPAdapterClipVisionEnhancer",
553
+ "pos": [
554
+ 220,
555
+ -620
556
+ ],
557
+ "size": [
558
+ 315,
559
+ 326
560
+ ],
561
+ "flags": {},
562
+ "order": 14,
563
+ "mode": 0,
564
+ "inputs": [
565
+ {
566
+ "name": "model",
567
+ "type": "MODEL",
568
+ "link": 47
569
+ },
570
+ {
571
+ "name": "ipadapter",
572
+ "type": "IPADAPTER",
573
+ "link": 48
574
+ },
575
+ {
576
+ "name": "image",
577
+ "type": "IMAGE",
578
+ "link": 68
579
+ },
580
+ {
581
+ "name": "image_negative",
582
+ "type": "IMAGE",
583
+ "link": null
584
+ },
585
+ {
586
+ "name": "attn_mask",
587
+ "type": "MASK",
588
+ "link": null
589
+ },
590
+ {
591
+ "name": "clip_vision",
592
+ "type": "CLIP_VISION",
593
+ "link": null
594
+ },
595
+ {
596
+ "name": "enhance_tiles",
597
+ "type": "INT",
598
+ "link": 62,
599
+ "widget": {
600
+ "name": "enhance_tiles"
601
+ }
602
+ }
603
+ ],
604
+ "outputs": [
605
+ {
606
+ "name": "MODEL",
607
+ "type": "MODEL",
608
+ "links": [
609
+ 58
610
+ ],
611
+ "shape": 3,
612
+ "slot_index": 0
613
+ }
614
+ ],
615
+ "properties": {
616
+ "Node name for S&R": "IPAdapterClipVisionEnhancer"
617
+ },
618
+ "widgets_values": [
619
+ 0.8,
620
+ "linear",
621
+ "average",
622
+ 0,
623
+ 1,
624
+ "V only",
625
+ 2,
626
+ 0.8
627
+ ]
628
+ },
629
+ {
630
+ "id": 34,
631
+ "type": "PreviewImage",
632
+ "pos": [
633
+ 1323,
634
+ -132
635
+ ],
636
+ "size": [
637
+ 1072.0986508932788,
638
+ 1107.239719497359
639
+ ],
640
+ "flags": {},
641
+ "order": 17,
642
+ "mode": 0,
643
+ "inputs": [
644
+ {
645
+ "name": "images",
646
+ "type": "IMAGE",
647
+ "link": 60
648
+ }
649
+ ],
650
+ "properties": {
651
+ "Node name for S&R": "PreviewImage"
652
+ }
653
+ },
654
+ {
655
+ "id": 41,
656
+ "type": "Note",
657
+ "pos": [
658
+ 557,
659
+ -390
660
+ ],
661
+ "size": [
662
+ 243.5294064400009,
663
+ 162.67339782886762
664
+ ],
665
+ "flags": {},
666
+ "order": 5,
667
+ "mode": 0,
668
+ "properties": {
669
+ "text": ""
670
+ },
671
+ "widgets_values": [
672
+ "if the workflow has other conditioning for the composition (like a composition IPAdapter or a controlnet) you can lower the \"enhance_ratio\" to get more details (0-0.5).\n\nIn absence of other conditioning this should be pretty high(0.5-1.0)."
673
+ ],
674
+ "color": "#432",
675
+ "bgcolor": "#653"
676
+ },
677
+ {
678
+ "id": 42,
679
+ "type": "Note",
680
+ "pos": [
681
+ -848,
682
+ -389
683
+ ],
684
+ "size": [
685
+ 216.56958342785583,
686
+ 79.05427068195002
687
+ ],
688
+ "flags": {},
689
+ "order": 6,
690
+ "mode": 0,
691
+ "properties": {
692
+ "text": ""
693
+ },
694
+ "widgets_values": [
695
+ "If you set this to 1 it will be the same as standard IPAdapter without enhancement."
696
+ ],
697
+ "color": "#432",
698
+ "bgcolor": "#653"
699
+ },
700
+ {
701
+ "id": 30,
702
+ "type": "SimpleMath+",
703
+ "pos": [
704
+ -851,
705
+ -514
706
+ ],
707
+ "size": [
708
+ 210,
709
+ 78
710
+ ],
711
+ "flags": {},
712
+ "order": 7,
713
+ "mode": 0,
714
+ "inputs": [
715
+ {
716
+ "name": "a",
717
+ "type": "INT,FLOAT",
718
+ "link": null
719
+ },
720
+ {
721
+ "name": "b",
722
+ "type": "INT,FLOAT",
723
+ "link": null
724
+ }
725
+ ],
726
+ "outputs": [
727
+ {
728
+ "name": "INT",
729
+ "type": "INT",
730
+ "links": [
731
+ 50,
732
+ 62
733
+ ],
734
+ "shape": 3,
735
+ "slot_index": 0
736
+ },
737
+ {
738
+ "name": "FLOAT",
739
+ "type": "FLOAT",
740
+ "links": null,
741
+ "shape": 3
742
+ }
743
+ ],
744
+ "properties": {
745
+ "Node name for S&R": "SimpleMath+"
746
+ },
747
+ "widgets_values": [
748
+ "3"
749
+ ]
750
+ }
751
+ ],
752
+ "links": [
753
+ [
754
+ 3,
755
+ 4,
756
+ 1,
757
+ 6,
758
+ 0,
759
+ "CLIP"
760
+ ],
761
+ [
762
+ 5,
763
+ 4,
764
+ 1,
765
+ 7,
766
+ 0,
767
+ "CLIP"
768
+ ],
769
+ [
770
+ 16,
771
+ 4,
772
+ 0,
773
+ 13,
774
+ 0,
775
+ "MODEL"
776
+ ],
777
+ [
778
+ 47,
779
+ 13,
780
+ 0,
781
+ 28,
782
+ 0,
783
+ "MODEL"
784
+ ],
785
+ [
786
+ 48,
787
+ 13,
788
+ 1,
789
+ 28,
790
+ 1,
791
+ "IPADAPTER"
792
+ ],
793
+ [
794
+ 50,
795
+ 30,
796
+ 0,
797
+ 31,
798
+ 0,
799
+ "INT,FLOAT"
800
+ ],
801
+ [
802
+ 51,
803
+ 31,
804
+ 0,
805
+ 29,
806
+ 1,
807
+ "INT"
808
+ ],
809
+ [
810
+ 53,
811
+ 31,
812
+ 0,
813
+ 29,
814
+ 2,
815
+ "INT"
816
+ ],
817
+ [
818
+ 58,
819
+ 28,
820
+ 0,
821
+ 32,
822
+ 0,
823
+ "MODEL"
824
+ ],
825
+ [
826
+ 59,
827
+ 4,
828
+ 2,
829
+ 33,
830
+ 1,
831
+ "VAE"
832
+ ],
833
+ [
834
+ 60,
835
+ 33,
836
+ 0,
837
+ 34,
838
+ 0,
839
+ "IMAGE"
840
+ ],
841
+ [
842
+ 61,
843
+ 32,
844
+ 0,
845
+ 33,
846
+ 0,
847
+ "LATENT"
848
+ ],
849
+ [
850
+ 62,
851
+ 30,
852
+ 0,
853
+ 28,
854
+ 6,
855
+ "INT"
856
+ ],
857
+ [
858
+ 67,
859
+ 29,
860
+ 0,
861
+ 36,
862
+ 0,
863
+ "IMAGE"
864
+ ],
865
+ [
866
+ 68,
867
+ 36,
868
+ 0,
869
+ 28,
870
+ 2,
871
+ "IMAGE"
872
+ ],
873
+ [
874
+ 75,
875
+ 6,
876
+ 0,
877
+ 32,
878
+ 1,
879
+ "CONDITIONING"
880
+ ],
881
+ [
882
+ 76,
883
+ 7,
884
+ 0,
885
+ 32,
886
+ 2,
887
+ "CONDITIONING"
888
+ ],
889
+ [
890
+ 78,
891
+ 38,
892
+ 0,
893
+ 32,
894
+ 3,
895
+ "LATENT"
896
+ ],
897
+ [
898
+ 79,
899
+ 14,
900
+ 0,
901
+ 29,
902
+ 0,
903
+ "IMAGE"
904
+ ]
905
+ ],
906
+ "groups": [],
907
+ "config": {},
908
+ "extra": {
909
+ "ds": {
910
+ "scale": 0.3558410273836744,
911
+ "offset": {
912
+ "0": 3138.218919113904,
913
+ "1": 1855.039899518089
914
+ }
915
+ }
916
+ },
917
+ "version": 0.4
918
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_combine_embeds.json ADDED
@@ -0,0 +1,1542 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 51,
3
+ "last_link_id": 118,
4
+ "nodes": [
5
+ {
6
+ "id": 5,
7
+ "type": "EmptyLatentImage",
8
+ "pos": [
9
+ 801,
10
+ 1097
11
+ ],
12
+ "size": {
13
+ "0": 315,
14
+ "1": 106
15
+ },
16
+ "flags": {},
17
+ "order": 0,
18
+ "mode": 0,
19
+ "outputs": [
20
+ {
21
+ "name": "LATENT",
22
+ "type": "LATENT",
23
+ "links": [
24
+ 2,
25
+ 89,
26
+ 100,
27
+ 111
28
+ ],
29
+ "slot_index": 0
30
+ }
31
+ ],
32
+ "properties": {
33
+ "Node name for S&R": "EmptyLatentImage"
34
+ },
35
+ "widgets_values": [
36
+ 512,
37
+ 512,
38
+ 1
39
+ ]
40
+ },
41
+ {
42
+ "id": 3,
43
+ "type": "KSampler",
44
+ "pos": [
45
+ 1580,
46
+ 300
47
+ ],
48
+ "size": {
49
+ "0": 315,
50
+ "1": 262
51
+ },
52
+ "flags": {},
53
+ "order": 13,
54
+ "mode": 0,
55
+ "inputs": [
56
+ {
57
+ "name": "model",
58
+ "type": "MODEL",
59
+ "link": 23
60
+ },
61
+ {
62
+ "name": "positive",
63
+ "type": "CONDITIONING",
64
+ "link": 4
65
+ },
66
+ {
67
+ "name": "negative",
68
+ "type": "CONDITIONING",
69
+ "link": 6
70
+ },
71
+ {
72
+ "name": "latent_image",
73
+ "type": "LATENT",
74
+ "link": 2
75
+ }
76
+ ],
77
+ "outputs": [
78
+ {
79
+ "name": "LATENT",
80
+ "type": "LATENT",
81
+ "links": [
82
+ 7
83
+ ],
84
+ "slot_index": 0
85
+ }
86
+ ],
87
+ "properties": {
88
+ "Node name for S&R": "KSampler"
89
+ },
90
+ "widgets_values": [
91
+ 0,
92
+ "fixed",
93
+ 30,
94
+ 6.5,
95
+ "dpmpp_2m",
96
+ "karras",
97
+ 1
98
+ ]
99
+ },
100
+ {
101
+ "id": 4,
102
+ "type": "CheckpointLoaderSimple",
103
+ "pos": [
104
+ 300,
105
+ 700
106
+ ],
107
+ "size": {
108
+ "0": 315,
109
+ "1": 98
110
+ },
111
+ "flags": {},
112
+ "order": 1,
113
+ "mode": 0,
114
+ "outputs": [
115
+ {
116
+ "name": "MODEL",
117
+ "type": "MODEL",
118
+ "links": [
119
+ 20,
120
+ 93,
121
+ 104,
122
+ 115
123
+ ],
124
+ "slot_index": 0
125
+ },
126
+ {
127
+ "name": "CLIP",
128
+ "type": "CLIP",
129
+ "links": [
130
+ 3,
131
+ 5
132
+ ],
133
+ "slot_index": 1
134
+ },
135
+ {
136
+ "name": "VAE",
137
+ "type": "VAE",
138
+ "links": [
139
+ 8,
140
+ 91,
141
+ 102,
142
+ 113
143
+ ],
144
+ "slot_index": 2
145
+ }
146
+ ],
147
+ "properties": {
148
+ "Node name for S&R": "CheckpointLoaderSimple"
149
+ },
150
+ "widgets_values": [
151
+ "sd15/realisticVisionV51_v51VAE.safetensors"
152
+ ]
153
+ },
154
+ {
155
+ "id": 12,
156
+ "type": "LoadImage",
157
+ "pos": [
158
+ 240,
159
+ -60
160
+ ],
161
+ "size": {
162
+ "0": 315,
163
+ "1": 314
164
+ },
165
+ "flags": {},
166
+ "order": 2,
167
+ "mode": 0,
168
+ "outputs": [
169
+ {
170
+ "name": "IMAGE",
171
+ "type": "IMAGE",
172
+ "links": [
173
+ 83
174
+ ],
175
+ "shape": 3,
176
+ "slot_index": 0
177
+ },
178
+ {
179
+ "name": "MASK",
180
+ "type": "MASK",
181
+ "links": null,
182
+ "shape": 3
183
+ }
184
+ ],
185
+ "properties": {
186
+ "Node name for S&R": "LoadImage"
187
+ },
188
+ "widgets_values": [
189
+ "warrior_woman.png",
190
+ "image"
191
+ ]
192
+ },
193
+ {
194
+ "id": 7,
195
+ "type": "CLIPTextEncode",
196
+ "pos": [
197
+ 740,
198
+ 780
199
+ ],
200
+ "size": {
201
+ "0": 425.27801513671875,
202
+ "1": 180.6060791015625
203
+ },
204
+ "flags": {},
205
+ "order": 7,
206
+ "mode": 0,
207
+ "inputs": [
208
+ {
209
+ "name": "clip",
210
+ "type": "CLIP",
211
+ "link": 5
212
+ }
213
+ ],
214
+ "outputs": [
215
+ {
216
+ "name": "CONDITIONING",
217
+ "type": "CONDITIONING",
218
+ "links": [
219
+ 6,
220
+ 88,
221
+ 99,
222
+ 110
223
+ ],
224
+ "slot_index": 0
225
+ }
226
+ ],
227
+ "properties": {
228
+ "Node name for S&R": "CLIPTextEncode"
229
+ },
230
+ "widgets_values": [
231
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed"
232
+ ]
233
+ },
234
+ {
235
+ "id": 14,
236
+ "type": "IPAdapterAdvanced",
237
+ "pos": [
238
+ 1220,
239
+ 260
240
+ ],
241
+ "size": {
242
+ "0": 315,
243
+ "1": 278
244
+ },
245
+ "flags": {},
246
+ "order": 9,
247
+ "mode": 0,
248
+ "inputs": [
249
+ {
250
+ "name": "model",
251
+ "type": "MODEL",
252
+ "link": 20
253
+ },
254
+ {
255
+ "name": "ipadapter",
256
+ "type": "IPADAPTER",
257
+ "link": 21,
258
+ "slot_index": 1
259
+ },
260
+ {
261
+ "name": "image",
262
+ "type": "IMAGE",
263
+ "link": 85
264
+ },
265
+ {
266
+ "name": "image_negative",
267
+ "type": "IMAGE",
268
+ "link": null
269
+ },
270
+ {
271
+ "name": "attn_mask",
272
+ "type": "MASK",
273
+ "link": null
274
+ },
275
+ {
276
+ "name": "clip_vision",
277
+ "type": "CLIP_VISION",
278
+ "link": 24,
279
+ "slot_index": 5
280
+ }
281
+ ],
282
+ "outputs": [
283
+ {
284
+ "name": "MODEL",
285
+ "type": "MODEL",
286
+ "links": [
287
+ 23
288
+ ],
289
+ "shape": 3,
290
+ "slot_index": 0
291
+ }
292
+ ],
293
+ "properties": {
294
+ "Node name for S&R": "IPAdapterAdvanced"
295
+ },
296
+ "widgets_values": [
297
+ 0.8,
298
+ "linear",
299
+ "concat",
300
+ 0,
301
+ 1,
302
+ "V only"
303
+ ]
304
+ },
305
+ {
306
+ "id": 42,
307
+ "type": "SaveImage",
308
+ "pos": [
309
+ 1950,
310
+ 1070
311
+ ],
312
+ "size": {
313
+ "0": 529.7760009765625,
314
+ "1": 582.3048095703125
315
+ },
316
+ "flags": {},
317
+ "order": 22,
318
+ "mode": 0,
319
+ "inputs": [
320
+ {
321
+ "name": "images",
322
+ "type": "IMAGE",
323
+ "link": 92
324
+ }
325
+ ],
326
+ "properties": {},
327
+ "widgets_values": [
328
+ "IPAdapter"
329
+ ]
330
+ },
331
+ {
332
+ "id": 40,
333
+ "type": "KSampler",
334
+ "pos": [
335
+ 1580,
336
+ 1070
337
+ ],
338
+ "size": {
339
+ "0": 315,
340
+ "1": 262
341
+ },
342
+ "flags": {},
343
+ "order": 14,
344
+ "mode": 0,
345
+ "inputs": [
346
+ {
347
+ "name": "model",
348
+ "type": "MODEL",
349
+ "link": 86
350
+ },
351
+ {
352
+ "name": "positive",
353
+ "type": "CONDITIONING",
354
+ "link": 87
355
+ },
356
+ {
357
+ "name": "negative",
358
+ "type": "CONDITIONING",
359
+ "link": 88
360
+ },
361
+ {
362
+ "name": "latent_image",
363
+ "type": "LATENT",
364
+ "link": 89
365
+ }
366
+ ],
367
+ "outputs": [
368
+ {
369
+ "name": "LATENT",
370
+ "type": "LATENT",
371
+ "links": [
372
+ 90
373
+ ],
374
+ "slot_index": 0
375
+ }
376
+ ],
377
+ "properties": {
378
+ "Node name for S&R": "KSampler"
379
+ },
380
+ "widgets_values": [
381
+ 0,
382
+ "fixed",
383
+ 30,
384
+ 6.5,
385
+ "dpmpp_2m",
386
+ "karras",
387
+ 1
388
+ ]
389
+ },
390
+ {
391
+ "id": 9,
392
+ "type": "SaveImage",
393
+ "pos": [
394
+ 1950,
395
+ 420
396
+ ],
397
+ "size": {
398
+ "0": 529.7760009765625,
399
+ "1": 582.3048095703125
400
+ },
401
+ "flags": {},
402
+ "order": 21,
403
+ "mode": 0,
404
+ "inputs": [
405
+ {
406
+ "name": "images",
407
+ "type": "IMAGE",
408
+ "link": 9
409
+ }
410
+ ],
411
+ "properties": {},
412
+ "widgets_values": [
413
+ "IPAdapter"
414
+ ]
415
+ },
416
+ {
417
+ "id": 6,
418
+ "type": "CLIPTextEncode",
419
+ "pos": [
420
+ 740,
421
+ 550
422
+ ],
423
+ "size": {
424
+ "0": 422.84503173828125,
425
+ "1": 164.31304931640625
426
+ },
427
+ "flags": {},
428
+ "order": 6,
429
+ "mode": 0,
430
+ "inputs": [
431
+ {
432
+ "name": "clip",
433
+ "type": "CLIP",
434
+ "link": 3
435
+ }
436
+ ],
437
+ "outputs": [
438
+ {
439
+ "name": "CONDITIONING",
440
+ "type": "CONDITIONING",
441
+ "links": [
442
+ 4,
443
+ 87,
444
+ 98,
445
+ 109
446
+ ],
447
+ "slot_index": 0
448
+ }
449
+ ],
450
+ "properties": {
451
+ "Node name for S&R": "CLIPTextEncode"
452
+ },
453
+ "widgets_values": [
454
+ "closeup of a fierce warrior woman wearing a full armor at the end of a battle\n\nhigh quality, detailed"
455
+ ]
456
+ },
457
+ {
458
+ "id": 15,
459
+ "type": "IPAdapterModelLoader",
460
+ "pos": [
461
+ 650,
462
+ -20
463
+ ],
464
+ "size": {
465
+ "0": 315,
466
+ "1": 58
467
+ },
468
+ "flags": {},
469
+ "order": 3,
470
+ "mode": 0,
471
+ "outputs": [
472
+ {
473
+ "name": "IPADAPTER",
474
+ "type": "IPADAPTER",
475
+ "links": [
476
+ 21,
477
+ 94,
478
+ 105,
479
+ 116
480
+ ],
481
+ "shape": 3
482
+ }
483
+ ],
484
+ "properties": {
485
+ "Node name for S&R": "IPAdapterModelLoader"
486
+ },
487
+ "widgets_values": [
488
+ "ip-adapter-plus_sd15.safetensors"
489
+ ]
490
+ },
491
+ {
492
+ "id": 39,
493
+ "type": "ImageBatch",
494
+ "pos": [
495
+ 714,
496
+ 287
497
+ ],
498
+ "size": {
499
+ "0": 210,
500
+ "1": 46
501
+ },
502
+ "flags": {},
503
+ "order": 8,
504
+ "mode": 0,
505
+ "inputs": [
506
+ {
507
+ "name": "image1",
508
+ "type": "IMAGE",
509
+ "link": 83
510
+ },
511
+ {
512
+ "name": "image2",
513
+ "type": "IMAGE",
514
+ "link": 84
515
+ }
516
+ ],
517
+ "outputs": [
518
+ {
519
+ "name": "IMAGE",
520
+ "type": "IMAGE",
521
+ "links": [
522
+ 85,
523
+ 95,
524
+ 106,
525
+ 117
526
+ ],
527
+ "shape": 3,
528
+ "slot_index": 0
529
+ }
530
+ ],
531
+ "properties": {
532
+ "Node name for S&R": "ImageBatch"
533
+ }
534
+ },
535
+ {
536
+ "id": 38,
537
+ "type": "LoadImage",
538
+ "pos": [
539
+ 240,
540
+ 310
541
+ ],
542
+ "size": {
543
+ "0": 315,
544
+ "1": 314
545
+ },
546
+ "flags": {},
547
+ "order": 4,
548
+ "mode": 0,
549
+ "outputs": [
550
+ {
551
+ "name": "IMAGE",
552
+ "type": "IMAGE",
553
+ "links": [
554
+ 84
555
+ ],
556
+ "shape": 3,
557
+ "slot_index": 0
558
+ },
559
+ {
560
+ "name": "MASK",
561
+ "type": "MASK",
562
+ "links": null,
563
+ "shape": 3
564
+ }
565
+ ],
566
+ "properties": {
567
+ "Node name for S&R": "LoadImage"
568
+ },
569
+ "widgets_values": [
570
+ "anime_illustration.png",
571
+ "image"
572
+ ]
573
+ },
574
+ {
575
+ "id": 43,
576
+ "type": "IPAdapterAdvanced",
577
+ "pos": [
578
+ 1220,
579
+ 1030
580
+ ],
581
+ "size": {
582
+ "0": 315,
583
+ "1": 278
584
+ },
585
+ "flags": {},
586
+ "order": 10,
587
+ "mode": 0,
588
+ "inputs": [
589
+ {
590
+ "name": "model",
591
+ "type": "MODEL",
592
+ "link": 93
593
+ },
594
+ {
595
+ "name": "ipadapter",
596
+ "type": "IPADAPTER",
597
+ "link": 94,
598
+ "slot_index": 1
599
+ },
600
+ {
601
+ "name": "image",
602
+ "type": "IMAGE",
603
+ "link": 95
604
+ },
605
+ {
606
+ "name": "image_negative",
607
+ "type": "IMAGE",
608
+ "link": null
609
+ },
610
+ {
611
+ "name": "attn_mask",
612
+ "type": "MASK",
613
+ "link": null
614
+ },
615
+ {
616
+ "name": "clip_vision",
617
+ "type": "CLIP_VISION",
618
+ "link": 96,
619
+ "slot_index": 5
620
+ }
621
+ ],
622
+ "outputs": [
623
+ {
624
+ "name": "MODEL",
625
+ "type": "MODEL",
626
+ "links": [
627
+ 86
628
+ ],
629
+ "shape": 3,
630
+ "slot_index": 0
631
+ }
632
+ ],
633
+ "properties": {
634
+ "Node name for S&R": "IPAdapterAdvanced"
635
+ },
636
+ "widgets_values": [
637
+ 0.8,
638
+ "linear",
639
+ "add",
640
+ 0,
641
+ 1,
642
+ "V only"
643
+ ]
644
+ },
645
+ {
646
+ "id": 44,
647
+ "type": "KSampler",
648
+ "pos": [
649
+ 3470,
650
+ 390
651
+ ],
652
+ "size": {
653
+ "0": 315,
654
+ "1": 262
655
+ },
656
+ "flags": {},
657
+ "order": 15,
658
+ "mode": 0,
659
+ "inputs": [
660
+ {
661
+ "name": "model",
662
+ "type": "MODEL",
663
+ "link": 97
664
+ },
665
+ {
666
+ "name": "positive",
667
+ "type": "CONDITIONING",
668
+ "link": 98
669
+ },
670
+ {
671
+ "name": "negative",
672
+ "type": "CONDITIONING",
673
+ "link": 99
674
+ },
675
+ {
676
+ "name": "latent_image",
677
+ "type": "LATENT",
678
+ "link": 100
679
+ }
680
+ ],
681
+ "outputs": [
682
+ {
683
+ "name": "LATENT",
684
+ "type": "LATENT",
685
+ "links": [
686
+ 101
687
+ ],
688
+ "slot_index": 0
689
+ }
690
+ ],
691
+ "properties": {
692
+ "Node name for S&R": "KSampler"
693
+ },
694
+ "widgets_values": [
695
+ 0,
696
+ "fixed",
697
+ 30,
698
+ 6.5,
699
+ "dpmpp_2m",
700
+ "karras",
701
+ 1
702
+ ]
703
+ },
704
+ {
705
+ "id": 45,
706
+ "type": "VAEDecode",
707
+ "pos": [
708
+ 3840,
709
+ 400
710
+ ],
711
+ "size": {
712
+ "0": 140,
713
+ "1": 46
714
+ },
715
+ "flags": {},
716
+ "order": 19,
717
+ "mode": 0,
718
+ "inputs": [
719
+ {
720
+ "name": "samples",
721
+ "type": "LATENT",
722
+ "link": 101
723
+ },
724
+ {
725
+ "name": "vae",
726
+ "type": "VAE",
727
+ "link": 102
728
+ }
729
+ ],
730
+ "outputs": [
731
+ {
732
+ "name": "IMAGE",
733
+ "type": "IMAGE",
734
+ "links": [
735
+ 103
736
+ ],
737
+ "slot_index": 0
738
+ }
739
+ ],
740
+ "properties": {
741
+ "Node name for S&R": "VAEDecode"
742
+ }
743
+ },
744
+ {
745
+ "id": 48,
746
+ "type": "KSampler",
747
+ "pos": [
748
+ 3480,
749
+ 1170
750
+ ],
751
+ "size": {
752
+ "0": 315,
753
+ "1": 262
754
+ },
755
+ "flags": {},
756
+ "order": 16,
757
+ "mode": 0,
758
+ "inputs": [
759
+ {
760
+ "name": "model",
761
+ "type": "MODEL",
762
+ "link": 108
763
+ },
764
+ {
765
+ "name": "positive",
766
+ "type": "CONDITIONING",
767
+ "link": 109
768
+ },
769
+ {
770
+ "name": "negative",
771
+ "type": "CONDITIONING",
772
+ "link": 110
773
+ },
774
+ {
775
+ "name": "latent_image",
776
+ "type": "LATENT",
777
+ "link": 111
778
+ }
779
+ ],
780
+ "outputs": [
781
+ {
782
+ "name": "LATENT",
783
+ "type": "LATENT",
784
+ "links": [
785
+ 112
786
+ ],
787
+ "slot_index": 0
788
+ }
789
+ ],
790
+ "properties": {
791
+ "Node name for S&R": "KSampler"
792
+ },
793
+ "widgets_values": [
794
+ 0,
795
+ "fixed",
796
+ 30,
797
+ 6.5,
798
+ "dpmpp_2m",
799
+ "karras",
800
+ 1
801
+ ]
802
+ },
803
+ {
804
+ "id": 49,
805
+ "type": "VAEDecode",
806
+ "pos": [
807
+ 3850,
808
+ 1180
809
+ ],
810
+ "size": {
811
+ "0": 140,
812
+ "1": 46
813
+ },
814
+ "flags": {},
815
+ "order": 20,
816
+ "mode": 0,
817
+ "inputs": [
818
+ {
819
+ "name": "samples",
820
+ "type": "LATENT",
821
+ "link": 112
822
+ },
823
+ {
824
+ "name": "vae",
825
+ "type": "VAE",
826
+ "link": 113
827
+ }
828
+ ],
829
+ "outputs": [
830
+ {
831
+ "name": "IMAGE",
832
+ "type": "IMAGE",
833
+ "links": [
834
+ 114
835
+ ],
836
+ "slot_index": 0
837
+ }
838
+ ],
839
+ "properties": {
840
+ "Node name for S&R": "VAEDecode"
841
+ }
842
+ },
843
+ {
844
+ "id": 51,
845
+ "type": "IPAdapterAdvanced",
846
+ "pos": [
847
+ 3120,
848
+ 1130
849
+ ],
850
+ "size": {
851
+ "0": 315,
852
+ "1": 278
853
+ },
854
+ "flags": {},
855
+ "order": 12,
856
+ "mode": 0,
857
+ "inputs": [
858
+ {
859
+ "name": "model",
860
+ "type": "MODEL",
861
+ "link": 115
862
+ },
863
+ {
864
+ "name": "ipadapter",
865
+ "type": "IPADAPTER",
866
+ "link": 116,
867
+ "slot_index": 1
868
+ },
869
+ {
870
+ "name": "image",
871
+ "type": "IMAGE",
872
+ "link": 117
873
+ },
874
+ {
875
+ "name": "image_negative",
876
+ "type": "IMAGE",
877
+ "link": null
878
+ },
879
+ {
880
+ "name": "attn_mask",
881
+ "type": "MASK",
882
+ "link": null
883
+ },
884
+ {
885
+ "name": "clip_vision",
886
+ "type": "CLIP_VISION",
887
+ "link": 118,
888
+ "slot_index": 5
889
+ }
890
+ ],
891
+ "outputs": [
892
+ {
893
+ "name": "MODEL",
894
+ "type": "MODEL",
895
+ "links": [
896
+ 108
897
+ ],
898
+ "shape": 3,
899
+ "slot_index": 0
900
+ }
901
+ ],
902
+ "properties": {
903
+ "Node name for S&R": "IPAdapterAdvanced"
904
+ },
905
+ "widgets_values": [
906
+ 0.8,
907
+ "linear",
908
+ "norm average",
909
+ 0,
910
+ 1,
911
+ "V only"
912
+ ]
913
+ },
914
+ {
915
+ "id": 47,
916
+ "type": "IPAdapterAdvanced",
917
+ "pos": [
918
+ 3110,
919
+ 350
920
+ ],
921
+ "size": {
922
+ "0": 315,
923
+ "1": 278
924
+ },
925
+ "flags": {},
926
+ "order": 11,
927
+ "mode": 0,
928
+ "inputs": [
929
+ {
930
+ "name": "model",
931
+ "type": "MODEL",
932
+ "link": 104
933
+ },
934
+ {
935
+ "name": "ipadapter",
936
+ "type": "IPADAPTER",
937
+ "link": 105,
938
+ "slot_index": 1
939
+ },
940
+ {
941
+ "name": "image",
942
+ "type": "IMAGE",
943
+ "link": 106
944
+ },
945
+ {
946
+ "name": "image_negative",
947
+ "type": "IMAGE",
948
+ "link": null
949
+ },
950
+ {
951
+ "name": "attn_mask",
952
+ "type": "MASK",
953
+ "link": null
954
+ },
955
+ {
956
+ "name": "clip_vision",
957
+ "type": "CLIP_VISION",
958
+ "link": 107,
959
+ "slot_index": 5
960
+ }
961
+ ],
962
+ "outputs": [
963
+ {
964
+ "name": "MODEL",
965
+ "type": "MODEL",
966
+ "links": [
967
+ 97
968
+ ],
969
+ "shape": 3,
970
+ "slot_index": 0
971
+ }
972
+ ],
973
+ "properties": {
974
+ "Node name for S&R": "IPAdapterAdvanced"
975
+ },
976
+ "widgets_values": [
977
+ 0.8,
978
+ "linear",
979
+ "average",
980
+ 0,
981
+ 1,
982
+ "V only"
983
+ ]
984
+ },
985
+ {
986
+ "id": 8,
987
+ "type": "VAEDecode",
988
+ "pos": [
989
+ 1748,
990
+ 613
991
+ ],
992
+ "size": {
993
+ "0": 140,
994
+ "1": 46
995
+ },
996
+ "flags": {},
997
+ "order": 17,
998
+ "mode": 0,
999
+ "inputs": [
1000
+ {
1001
+ "name": "samples",
1002
+ "type": "LATENT",
1003
+ "link": 7
1004
+ },
1005
+ {
1006
+ "name": "vae",
1007
+ "type": "VAE",
1008
+ "link": 8
1009
+ }
1010
+ ],
1011
+ "outputs": [
1012
+ {
1013
+ "name": "IMAGE",
1014
+ "type": "IMAGE",
1015
+ "links": [
1016
+ 9
1017
+ ],
1018
+ "slot_index": 0
1019
+ }
1020
+ ],
1021
+ "properties": {
1022
+ "Node name for S&R": "VAEDecode"
1023
+ }
1024
+ },
1025
+ {
1026
+ "id": 41,
1027
+ "type": "VAEDecode",
1028
+ "pos": [
1029
+ 1746,
1030
+ 1386
1031
+ ],
1032
+ "size": {
1033
+ "0": 140,
1034
+ "1": 46
1035
+ },
1036
+ "flags": {},
1037
+ "order": 18,
1038
+ "mode": 0,
1039
+ "inputs": [
1040
+ {
1041
+ "name": "samples",
1042
+ "type": "LATENT",
1043
+ "link": 90
1044
+ },
1045
+ {
1046
+ "name": "vae",
1047
+ "type": "VAE",
1048
+ "link": 91
1049
+ }
1050
+ ],
1051
+ "outputs": [
1052
+ {
1053
+ "name": "IMAGE",
1054
+ "type": "IMAGE",
1055
+ "links": [
1056
+ 92
1057
+ ],
1058
+ "slot_index": 0
1059
+ }
1060
+ ],
1061
+ "properties": {
1062
+ "Node name for S&R": "VAEDecode"
1063
+ }
1064
+ },
1065
+ {
1066
+ "id": 50,
1067
+ "type": "SaveImage",
1068
+ "pos": [
1069
+ 2530,
1070
+ 1073
1071
+ ],
1072
+ "size": {
1073
+ "0": 529.7760009765625,
1074
+ "1": 582.3048095703125
1075
+ },
1076
+ "flags": {},
1077
+ "order": 24,
1078
+ "mode": 0,
1079
+ "inputs": [
1080
+ {
1081
+ "name": "images",
1082
+ "type": "IMAGE",
1083
+ "link": 114
1084
+ }
1085
+ ],
1086
+ "properties": {},
1087
+ "widgets_values": [
1088
+ "IPAdapter"
1089
+ ]
1090
+ },
1091
+ {
1092
+ "id": 46,
1093
+ "type": "SaveImage",
1094
+ "pos": [
1095
+ 2518,
1096
+ 419
1097
+ ],
1098
+ "size": {
1099
+ "0": 529.7760009765625,
1100
+ "1": 582.3048095703125
1101
+ },
1102
+ "flags": {},
1103
+ "order": 23,
1104
+ "mode": 0,
1105
+ "inputs": [
1106
+ {
1107
+ "name": "images",
1108
+ "type": "IMAGE",
1109
+ "link": 103
1110
+ }
1111
+ ],
1112
+ "properties": {},
1113
+ "widgets_values": [
1114
+ "IPAdapter"
1115
+ ]
1116
+ },
1117
+ {
1118
+ "id": 16,
1119
+ "type": "CLIPVisionLoader",
1120
+ "pos": [
1121
+ 650,
1122
+ 80
1123
+ ],
1124
+ "size": {
1125
+ "0": 315,
1126
+ "1": 58
1127
+ },
1128
+ "flags": {},
1129
+ "order": 5,
1130
+ "mode": 0,
1131
+ "outputs": [
1132
+ {
1133
+ "name": "CLIP_VISION",
1134
+ "type": "CLIP_VISION",
1135
+ "links": [
1136
+ 24,
1137
+ 96,
1138
+ 107,
1139
+ 118
1140
+ ],
1141
+ "shape": 3
1142
+ }
1143
+ ],
1144
+ "properties": {
1145
+ "Node name for S&R": "CLIPVisionLoader"
1146
+ },
1147
+ "widgets_values": [
1148
+ "CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors"
1149
+ ]
1150
+ }
1151
+ ],
1152
+ "links": [
1153
+ [
1154
+ 2,
1155
+ 5,
1156
+ 0,
1157
+ 3,
1158
+ 3,
1159
+ "LATENT"
1160
+ ],
1161
+ [
1162
+ 3,
1163
+ 4,
1164
+ 1,
1165
+ 6,
1166
+ 0,
1167
+ "CLIP"
1168
+ ],
1169
+ [
1170
+ 4,
1171
+ 6,
1172
+ 0,
1173
+ 3,
1174
+ 1,
1175
+ "CONDITIONING"
1176
+ ],
1177
+ [
1178
+ 5,
1179
+ 4,
1180
+ 1,
1181
+ 7,
1182
+ 0,
1183
+ "CLIP"
1184
+ ],
1185
+ [
1186
+ 6,
1187
+ 7,
1188
+ 0,
1189
+ 3,
1190
+ 2,
1191
+ "CONDITIONING"
1192
+ ],
1193
+ [
1194
+ 7,
1195
+ 3,
1196
+ 0,
1197
+ 8,
1198
+ 0,
1199
+ "LATENT"
1200
+ ],
1201
+ [
1202
+ 8,
1203
+ 4,
1204
+ 2,
1205
+ 8,
1206
+ 1,
1207
+ "VAE"
1208
+ ],
1209
+ [
1210
+ 9,
1211
+ 8,
1212
+ 0,
1213
+ 9,
1214
+ 0,
1215
+ "IMAGE"
1216
+ ],
1217
+ [
1218
+ 20,
1219
+ 4,
1220
+ 0,
1221
+ 14,
1222
+ 0,
1223
+ "MODEL"
1224
+ ],
1225
+ [
1226
+ 21,
1227
+ 15,
1228
+ 0,
1229
+ 14,
1230
+ 1,
1231
+ "IPADAPTER"
1232
+ ],
1233
+ [
1234
+ 23,
1235
+ 14,
1236
+ 0,
1237
+ 3,
1238
+ 0,
1239
+ "MODEL"
1240
+ ],
1241
+ [
1242
+ 24,
1243
+ 16,
1244
+ 0,
1245
+ 14,
1246
+ 5,
1247
+ "CLIP_VISION"
1248
+ ],
1249
+ [
1250
+ 83,
1251
+ 12,
1252
+ 0,
1253
+ 39,
1254
+ 0,
1255
+ "IMAGE"
1256
+ ],
1257
+ [
1258
+ 84,
1259
+ 38,
1260
+ 0,
1261
+ 39,
1262
+ 1,
1263
+ "IMAGE"
1264
+ ],
1265
+ [
1266
+ 85,
1267
+ 39,
1268
+ 0,
1269
+ 14,
1270
+ 2,
1271
+ "IMAGE"
1272
+ ],
1273
+ [
1274
+ 86,
1275
+ 43,
1276
+ 0,
1277
+ 40,
1278
+ 0,
1279
+ "MODEL"
1280
+ ],
1281
+ [
1282
+ 87,
1283
+ 6,
1284
+ 0,
1285
+ 40,
1286
+ 1,
1287
+ "CONDITIONING"
1288
+ ],
1289
+ [
1290
+ 88,
1291
+ 7,
1292
+ 0,
1293
+ 40,
1294
+ 2,
1295
+ "CONDITIONING"
1296
+ ],
1297
+ [
1298
+ 89,
1299
+ 5,
1300
+ 0,
1301
+ 40,
1302
+ 3,
1303
+ "LATENT"
1304
+ ],
1305
+ [
1306
+ 90,
1307
+ 40,
1308
+ 0,
1309
+ 41,
1310
+ 0,
1311
+ "LATENT"
1312
+ ],
1313
+ [
1314
+ 91,
1315
+ 4,
1316
+ 2,
1317
+ 41,
1318
+ 1,
1319
+ "VAE"
1320
+ ],
1321
+ [
1322
+ 92,
1323
+ 41,
1324
+ 0,
1325
+ 42,
1326
+ 0,
1327
+ "IMAGE"
1328
+ ],
1329
+ [
1330
+ 93,
1331
+ 4,
1332
+ 0,
1333
+ 43,
1334
+ 0,
1335
+ "MODEL"
1336
+ ],
1337
+ [
1338
+ 94,
1339
+ 15,
1340
+ 0,
1341
+ 43,
1342
+ 1,
1343
+ "IPADAPTER"
1344
+ ],
1345
+ [
1346
+ 95,
1347
+ 39,
1348
+ 0,
1349
+ 43,
1350
+ 2,
1351
+ "IMAGE"
1352
+ ],
1353
+ [
1354
+ 96,
1355
+ 16,
1356
+ 0,
1357
+ 43,
1358
+ 5,
1359
+ "CLIP_VISION"
1360
+ ],
1361
+ [
1362
+ 97,
1363
+ 47,
1364
+ 0,
1365
+ 44,
1366
+ 0,
1367
+ "MODEL"
1368
+ ],
1369
+ [
1370
+ 98,
1371
+ 6,
1372
+ 0,
1373
+ 44,
1374
+ 1,
1375
+ "CONDITIONING"
1376
+ ],
1377
+ [
1378
+ 99,
1379
+ 7,
1380
+ 0,
1381
+ 44,
1382
+ 2,
1383
+ "CONDITIONING"
1384
+ ],
1385
+ [
1386
+ 100,
1387
+ 5,
1388
+ 0,
1389
+ 44,
1390
+ 3,
1391
+ "LATENT"
1392
+ ],
1393
+ [
1394
+ 101,
1395
+ 44,
1396
+ 0,
1397
+ 45,
1398
+ 0,
1399
+ "LATENT"
1400
+ ],
1401
+ [
1402
+ 102,
1403
+ 4,
1404
+ 2,
1405
+ 45,
1406
+ 1,
1407
+ "VAE"
1408
+ ],
1409
+ [
1410
+ 103,
1411
+ 45,
1412
+ 0,
1413
+ 46,
1414
+ 0,
1415
+ "IMAGE"
1416
+ ],
1417
+ [
1418
+ 104,
1419
+ 4,
1420
+ 0,
1421
+ 47,
1422
+ 0,
1423
+ "MODEL"
1424
+ ],
1425
+ [
1426
+ 105,
1427
+ 15,
1428
+ 0,
1429
+ 47,
1430
+ 1,
1431
+ "IPADAPTER"
1432
+ ],
1433
+ [
1434
+ 106,
1435
+ 39,
1436
+ 0,
1437
+ 47,
1438
+ 2,
1439
+ "IMAGE"
1440
+ ],
1441
+ [
1442
+ 107,
1443
+ 16,
1444
+ 0,
1445
+ 47,
1446
+ 5,
1447
+ "CLIP_VISION"
1448
+ ],
1449
+ [
1450
+ 108,
1451
+ 51,
1452
+ 0,
1453
+ 48,
1454
+ 0,
1455
+ "MODEL"
1456
+ ],
1457
+ [
1458
+ 109,
1459
+ 6,
1460
+ 0,
1461
+ 48,
1462
+ 1,
1463
+ "CONDITIONING"
1464
+ ],
1465
+ [
1466
+ 110,
1467
+ 7,
1468
+ 0,
1469
+ 48,
1470
+ 2,
1471
+ "CONDITIONING"
1472
+ ],
1473
+ [
1474
+ 111,
1475
+ 5,
1476
+ 0,
1477
+ 48,
1478
+ 3,
1479
+ "LATENT"
1480
+ ],
1481
+ [
1482
+ 112,
1483
+ 48,
1484
+ 0,
1485
+ 49,
1486
+ 0,
1487
+ "LATENT"
1488
+ ],
1489
+ [
1490
+ 113,
1491
+ 4,
1492
+ 2,
1493
+ 49,
1494
+ 1,
1495
+ "VAE"
1496
+ ],
1497
+ [
1498
+ 114,
1499
+ 49,
1500
+ 0,
1501
+ 50,
1502
+ 0,
1503
+ "IMAGE"
1504
+ ],
1505
+ [
1506
+ 115,
1507
+ 4,
1508
+ 0,
1509
+ 51,
1510
+ 0,
1511
+ "MODEL"
1512
+ ],
1513
+ [
1514
+ 116,
1515
+ 15,
1516
+ 0,
1517
+ 51,
1518
+ 1,
1519
+ "IPADAPTER"
1520
+ ],
1521
+ [
1522
+ 117,
1523
+ 39,
1524
+ 0,
1525
+ 51,
1526
+ 2,
1527
+ "IMAGE"
1528
+ ],
1529
+ [
1530
+ 118,
1531
+ 16,
1532
+ 0,
1533
+ 51,
1534
+ 5,
1535
+ "CLIP_VISION"
1536
+ ]
1537
+ ],
1538
+ "groups": [],
1539
+ "config": {},
1540
+ "extra": {},
1541
+ "version": 0.4
1542
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_cosxl_edit.json ADDED
@@ -0,0 +1,1624 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 59,
3
+ "last_link_id": 468,
4
+ "nodes": [
5
+ {
6
+ "id": 44,
7
+ "type": "BasicScheduler",
8
+ "pos": [
9
+ 1577,
10
+ 192
11
+ ],
12
+ "size": {
13
+ "0": 315,
14
+ "1": 106
15
+ },
16
+ "flags": {},
17
+ "order": 11,
18
+ "mode": 0,
19
+ "inputs": [
20
+ {
21
+ "name": "model",
22
+ "type": "MODEL",
23
+ "link": 446
24
+ }
25
+ ],
26
+ "outputs": [
27
+ {
28
+ "name": "SIGMAS",
29
+ "type": "SIGMAS",
30
+ "links": [
31
+ 429
32
+ ],
33
+ "shape": 3
34
+ }
35
+ ],
36
+ "properties": {
37
+ "Node name for S&R": "BasicScheduler"
38
+ },
39
+ "widgets_values": [
40
+ "karras",
41
+ 25,
42
+ 1
43
+ ]
44
+ },
45
+ {
46
+ "id": 41,
47
+ "type": "KSamplerSelect",
48
+ "pos": [
49
+ 1585,
50
+ 67
51
+ ],
52
+ "size": {
53
+ "0": 315,
54
+ "1": 58
55
+ },
56
+ "flags": {},
57
+ "order": 0,
58
+ "mode": 0,
59
+ "outputs": [
60
+ {
61
+ "name": "SAMPLER",
62
+ "type": "SAMPLER",
63
+ "links": [
64
+ 428
65
+ ],
66
+ "shape": 3
67
+ }
68
+ ],
69
+ "properties": {
70
+ "Node name for S&R": "KSamplerSelect"
71
+ },
72
+ "widgets_values": [
73
+ "dpmpp_2m"
74
+ ]
75
+ },
76
+ {
77
+ "id": 49,
78
+ "type": "SamplerCustomAdvanced",
79
+ "pos": [
80
+ 2077,
81
+ -96
82
+ ],
83
+ "size": [
84
+ 236.8000030517578,
85
+ 106
86
+ ],
87
+ "flags": {},
88
+ "order": 14,
89
+ "mode": 0,
90
+ "inputs": [
91
+ {
92
+ "name": "noise",
93
+ "type": "NOISE",
94
+ "link": 426,
95
+ "slot_index": 0
96
+ },
97
+ {
98
+ "name": "guider",
99
+ "type": "GUIDER",
100
+ "link": 427,
101
+ "slot_index": 1
102
+ },
103
+ {
104
+ "name": "sampler",
105
+ "type": "SAMPLER",
106
+ "link": 428,
107
+ "slot_index": 2
108
+ },
109
+ {
110
+ "name": "sigmas",
111
+ "type": "SIGMAS",
112
+ "link": 429,
113
+ "slot_index": 3
114
+ },
115
+ {
116
+ "name": "latent_image",
117
+ "type": "LATENT",
118
+ "link": 453,
119
+ "slot_index": 4
120
+ }
121
+ ],
122
+ "outputs": [
123
+ {
124
+ "name": "output",
125
+ "type": "LATENT",
126
+ "links": [
127
+ 436
128
+ ],
129
+ "shape": 3,
130
+ "slot_index": 0
131
+ },
132
+ {
133
+ "name": "denoised_output",
134
+ "type": "LATENT",
135
+ "links": null,
136
+ "shape": 3
137
+ }
138
+ ],
139
+ "properties": {
140
+ "Node name for S&R": "SamplerCustomAdvanced"
141
+ }
142
+ },
143
+ {
144
+ "id": 47,
145
+ "type": "InstructPixToPixConditioning",
146
+ "pos": [
147
+ 1229,
148
+ -105
149
+ ],
150
+ "size": [
151
+ 235.1999969482422,
152
+ 86
153
+ ],
154
+ "flags": {},
155
+ "order": 10,
156
+ "mode": 0,
157
+ "inputs": [
158
+ {
159
+ "name": "positive",
160
+ "type": "CONDITIONING",
161
+ "link": 466
162
+ },
163
+ {
164
+ "name": "negative",
165
+ "type": "CONDITIONING",
166
+ "link": 467
167
+ },
168
+ {
169
+ "name": "vae",
170
+ "type": "VAE",
171
+ "link": 434
172
+ },
173
+ {
174
+ "name": "pixels",
175
+ "type": "IMAGE",
176
+ "link": 465
177
+ }
178
+ ],
179
+ "outputs": [
180
+ {
181
+ "name": "positive",
182
+ "type": "CONDITIONING",
183
+ "links": [
184
+ 423
185
+ ],
186
+ "shape": 3,
187
+ "slot_index": 0
188
+ },
189
+ {
190
+ "name": "negative",
191
+ "type": "CONDITIONING",
192
+ "links": [
193
+ 424
194
+ ],
195
+ "shape": 3,
196
+ "slot_index": 1
197
+ },
198
+ {
199
+ "name": "latent",
200
+ "type": "LATENT",
201
+ "links": [
202
+ 452
203
+ ],
204
+ "shape": 3,
205
+ "slot_index": 2
206
+ }
207
+ ],
208
+ "properties": {
209
+ "Node name for S&R": "InstructPixToPixConditioning"
210
+ }
211
+ },
212
+ {
213
+ "id": 8,
214
+ "type": "VAEDecode",
215
+ "pos": [
216
+ 2371,
217
+ -90
218
+ ],
219
+ "size": [
220
+ 140,
221
+ 46
222
+ ],
223
+ "flags": {},
224
+ "order": 15,
225
+ "mode": 0,
226
+ "inputs": [
227
+ {
228
+ "name": "samples",
229
+ "type": "LATENT",
230
+ "link": 436
231
+ },
232
+ {
233
+ "name": "vae",
234
+ "type": "VAE",
235
+ "link": 8
236
+ }
237
+ ],
238
+ "outputs": [
239
+ {
240
+ "name": "IMAGE",
241
+ "type": "IMAGE",
242
+ "links": [
243
+ 462
244
+ ],
245
+ "slot_index": 0
246
+ }
247
+ ],
248
+ "properties": {
249
+ "Node name for S&R": "VAEDecode"
250
+ }
251
+ },
252
+ {
253
+ "id": 48,
254
+ "type": "DualCFGGuider",
255
+ "pos": [
256
+ 1578,
257
+ -126
258
+ ],
259
+ "size": {
260
+ "0": 315,
261
+ "1": 142
262
+ },
263
+ "flags": {},
264
+ "order": 12,
265
+ "mode": 0,
266
+ "inputs": [
267
+ {
268
+ "name": "model",
269
+ "type": "MODEL",
270
+ "link": 445
271
+ },
272
+ {
273
+ "name": "cond1",
274
+ "type": "CONDITIONING",
275
+ "link": 423
276
+ },
277
+ {
278
+ "name": "cond2",
279
+ "type": "CONDITIONING",
280
+ "link": 424
281
+ },
282
+ {
283
+ "name": "negative",
284
+ "type": "CONDITIONING",
285
+ "link": 468
286
+ }
287
+ ],
288
+ "outputs": [
289
+ {
290
+ "name": "GUIDER",
291
+ "type": "GUIDER",
292
+ "links": [
293
+ 427
294
+ ],
295
+ "shape": 3,
296
+ "slot_index": 0
297
+ }
298
+ ],
299
+ "properties": {
300
+ "Node name for S&R": "DualCFGGuider"
301
+ },
302
+ "widgets_values": [
303
+ 5,
304
+ 1.5
305
+ ]
306
+ },
307
+ {
308
+ "id": 42,
309
+ "type": "RandomNoise",
310
+ "pos": [
311
+ 1585,
312
+ -266
313
+ ],
314
+ "size": {
315
+ "0": 315,
316
+ "1": 82
317
+ },
318
+ "flags": {},
319
+ "order": 1,
320
+ "mode": 0,
321
+ "outputs": [
322
+ {
323
+ "name": "NOISE",
324
+ "type": "NOISE",
325
+ "links": [
326
+ 426
327
+ ],
328
+ "shape": 3
329
+ }
330
+ ],
331
+ "properties": {
332
+ "Node name for S&R": "RandomNoise"
333
+ },
334
+ "widgets_values": [
335
+ 1,
336
+ "fixed"
337
+ ]
338
+ },
339
+ {
340
+ "id": 4,
341
+ "type": "CheckpointLoaderSimple",
342
+ "pos": [
343
+ -428,
344
+ 92
345
+ ],
346
+ "size": {
347
+ "0": 442.8365478515625,
348
+ "1": 98
349
+ },
350
+ "flags": {},
351
+ "order": 2,
352
+ "mode": 0,
353
+ "outputs": [
354
+ {
355
+ "name": "MODEL",
356
+ "type": "MODEL",
357
+ "links": [
358
+ 441
359
+ ],
360
+ "slot_index": 0
361
+ },
362
+ {
363
+ "name": "CLIP",
364
+ "type": "CLIP",
365
+ "links": [
366
+ 124,
367
+ 125
368
+ ],
369
+ "slot_index": 1
370
+ },
371
+ {
372
+ "name": "VAE",
373
+ "type": "VAE",
374
+ "links": [
375
+ 8,
376
+ 434
377
+ ],
378
+ "slot_index": 2
379
+ }
380
+ ],
381
+ "properties": {
382
+ "Node name for S&R": "CheckpointLoaderSimple"
383
+ },
384
+ "widgets_values": [
385
+ "cosxl/cosxl_edit.safetensors"
386
+ ]
387
+ },
388
+ {
389
+ "id": 7,
390
+ "type": "CLIPTextEncode",
391
+ "pos": [
392
+ 670,
393
+ 401
394
+ ],
395
+ "size": {
396
+ "0": 425.27801513671875,
397
+ "1": 180.6060791015625
398
+ },
399
+ "flags": {},
400
+ "order": 6,
401
+ "mode": 0,
402
+ "inputs": [
403
+ {
404
+ "name": "clip",
405
+ "type": "CLIP",
406
+ "link": 124
407
+ }
408
+ ],
409
+ "outputs": [
410
+ {
411
+ "name": "CONDITIONING",
412
+ "type": "CONDITIONING",
413
+ "links": [
414
+ 467,
415
+ 468
416
+ ],
417
+ "slot_index": 0
418
+ }
419
+ ],
420
+ "title": "Negative",
421
+ "properties": {
422
+ "Node name for S&R": "CLIPTextEncode"
423
+ },
424
+ "widgets_values": [
425
+ "blurry, lowres, artifacts, malformed, ill, horror"
426
+ ],
427
+ "color": "#322",
428
+ "bgcolor": "#533"
429
+ },
430
+ {
431
+ "id": 54,
432
+ "type": "PreviewImage",
433
+ "pos": [
434
+ 2601,
435
+ -100
436
+ ],
437
+ "size": [
438
+ 1015.8230525053973,
439
+ 1053.0271000534044
440
+ ],
441
+ "flags": {},
442
+ "order": 16,
443
+ "mode": 0,
444
+ "inputs": [
445
+ {
446
+ "name": "images",
447
+ "type": "IMAGE",
448
+ "link": 462
449
+ }
450
+ ],
451
+ "title": "UUC",
452
+ "properties": {
453
+ "Node name for S&R": "PreviewImage"
454
+ }
455
+ },
456
+ {
457
+ "id": 13,
458
+ "type": "LoadImage",
459
+ "pos": [
460
+ -139,
461
+ 354
462
+ ],
463
+ "size": [
464
+ 287.37362662402893,
465
+ 399.65891042937926
466
+ ],
467
+ "flags": {},
468
+ "order": 3,
469
+ "mode": 0,
470
+ "outputs": [
471
+ {
472
+ "name": "IMAGE",
473
+ "type": "IMAGE",
474
+ "links": [
475
+ 464
476
+ ],
477
+ "shape": 3,
478
+ "slot_index": 0
479
+ },
480
+ {
481
+ "name": "MASK",
482
+ "type": "MASK",
483
+ "links": null,
484
+ "shape": 3
485
+ }
486
+ ],
487
+ "properties": {
488
+ "Node name for S&R": "LoadImage"
489
+ },
490
+ "widgets_values": [
491
+ "blonde_1.png",
492
+ "image"
493
+ ]
494
+ },
495
+ {
496
+ "id": 59,
497
+ "type": "ImageScale",
498
+ "pos": [
499
+ 222,
500
+ 351
501
+ ],
502
+ "size": {
503
+ "0": 315,
504
+ "1": 130
505
+ },
506
+ "flags": {},
507
+ "order": 8,
508
+ "mode": 0,
509
+ "inputs": [
510
+ {
511
+ "name": "image",
512
+ "type": "IMAGE",
513
+ "link": 464
514
+ }
515
+ ],
516
+ "outputs": [
517
+ {
518
+ "name": "IMAGE",
519
+ "type": "IMAGE",
520
+ "links": [
521
+ 465
522
+ ],
523
+ "shape": 3,
524
+ "slot_index": 0
525
+ }
526
+ ],
527
+ "properties": {
528
+ "Node name for S&R": "ImageScale"
529
+ },
530
+ "widgets_values": [
531
+ "lanczos",
532
+ 1024,
533
+ 1024,
534
+ "disabled"
535
+ ]
536
+ },
537
+ {
538
+ "id": 6,
539
+ "type": "CLIPTextEncode",
540
+ "pos": [
541
+ 670,
542
+ 45
543
+ ],
544
+ "size": {
545
+ "0": 422.84503173828125,
546
+ "1": 164.31304931640625
547
+ },
548
+ "flags": {},
549
+ "order": 7,
550
+ "mode": 0,
551
+ "inputs": [
552
+ {
553
+ "name": "clip",
554
+ "type": "CLIP",
555
+ "link": 125
556
+ }
557
+ ],
558
+ "outputs": [
559
+ {
560
+ "name": "CONDITIONING",
561
+ "type": "CONDITIONING",
562
+ "links": [
563
+ 466
564
+ ],
565
+ "slot_index": 0
566
+ }
567
+ ],
568
+ "title": "Positive",
569
+ "properties": {
570
+ "Node name for S&R": "CLIPTextEncode"
571
+ },
572
+ "widgets_values": [
573
+ "illustration portrait of a woman"
574
+ ],
575
+ "color": "#232",
576
+ "bgcolor": "#353"
577
+ },
578
+ {
579
+ "id": 51,
580
+ "type": "IPAdapterAdvanced",
581
+ "pos": [
582
+ 745,
583
+ -493
584
+ ],
585
+ "size": {
586
+ "0": 315,
587
+ "1": 278
588
+ },
589
+ "flags": {},
590
+ "order": 9,
591
+ "mode": 0,
592
+ "inputs": [
593
+ {
594
+ "name": "model",
595
+ "type": "MODEL",
596
+ "link": 442
597
+ },
598
+ {
599
+ "name": "ipadapter",
600
+ "type": "IPADAPTER",
601
+ "link": 440,
602
+ "slot_index": 1
603
+ },
604
+ {
605
+ "name": "image",
606
+ "type": "IMAGE",
607
+ "link": 443,
608
+ "slot_index": 2
609
+ },
610
+ {
611
+ "name": "image_negative",
612
+ "type": "IMAGE",
613
+ "link": null
614
+ },
615
+ {
616
+ "name": "attn_mask",
617
+ "type": "MASK",
618
+ "link": null
619
+ },
620
+ {
621
+ "name": "clip_vision",
622
+ "type": "CLIP_VISION",
623
+ "link": null
624
+ }
625
+ ],
626
+ "outputs": [
627
+ {
628
+ "name": "MODEL",
629
+ "type": "MODEL",
630
+ "links": [
631
+ 445,
632
+ 446
633
+ ],
634
+ "shape": 3,
635
+ "slot_index": 0
636
+ }
637
+ ],
638
+ "properties": {
639
+ "Node name for S&R": "IPAdapterAdvanced"
640
+ },
641
+ "widgets_values": [
642
+ 1,
643
+ "style transfer",
644
+ "concat",
645
+ 0,
646
+ 1,
647
+ "V only"
648
+ ]
649
+ },
650
+ {
651
+ "id": 52,
652
+ "type": "IPAdapterUnifiedLoader",
653
+ "pos": [
654
+ 320,
655
+ -578
656
+ ],
657
+ "size": [
658
+ 210,
659
+ 78
660
+ ],
661
+ "flags": {},
662
+ "order": 5,
663
+ "mode": 0,
664
+ "inputs": [
665
+ {
666
+ "name": "model",
667
+ "type": "MODEL",
668
+ "link": 441
669
+ },
670
+ {
671
+ "name": "ipadapter",
672
+ "type": "IPADAPTER",
673
+ "link": null
674
+ }
675
+ ],
676
+ "outputs": [
677
+ {
678
+ "name": "model",
679
+ "type": "MODEL",
680
+ "links": [
681
+ 442
682
+ ],
683
+ "shape": 3,
684
+ "slot_index": 0
685
+ },
686
+ {
687
+ "name": "ipadapter",
688
+ "type": "IPADAPTER",
689
+ "links": [
690
+ 440
691
+ ],
692
+ "shape": 3
693
+ }
694
+ ],
695
+ "properties": {
696
+ "Node name for S&R": "IPAdapterUnifiedLoader"
697
+ },
698
+ "widgets_values": [
699
+ "STANDARD (medium strength)"
700
+ ]
701
+ },
702
+ {
703
+ "id": 53,
704
+ "type": "LoadImage",
705
+ "pos": [
706
+ 288,
707
+ -420
708
+ ],
709
+ "size": [
710
+ 285.08749118025753,
711
+ 393.470875983831
712
+ ],
713
+ "flags": {},
714
+ "order": 4,
715
+ "mode": 0,
716
+ "outputs": [
717
+ {
718
+ "name": "IMAGE",
719
+ "type": "IMAGE",
720
+ "links": [
721
+ 443
722
+ ],
723
+ "shape": 3
724
+ },
725
+ {
726
+ "name": "MASK",
727
+ "type": "MASK",
728
+ "links": null,
729
+ "shape": 3
730
+ }
731
+ ],
732
+ "properties": {
733
+ "Node name for S&R": "LoadImage"
734
+ },
735
+ "widgets_values": [
736
+ "coloring_landscape.png",
737
+ "image"
738
+ ]
739
+ },
740
+ {
741
+ "id": 58,
742
+ "type": "RepeatLatentBatch",
743
+ "pos": [
744
+ 1572,
745
+ 369
746
+ ],
747
+ "size": {
748
+ "0": 315,
749
+ "1": 58
750
+ },
751
+ "flags": {},
752
+ "order": 13,
753
+ "mode": 0,
754
+ "inputs": [
755
+ {
756
+ "name": "samples",
757
+ "type": "LATENT",
758
+ "link": 452
759
+ }
760
+ ],
761
+ "outputs": [
762
+ {
763
+ "name": "LATENT",
764
+ "type": "LATENT",
765
+ "links": [
766
+ 453
767
+ ],
768
+ "shape": 3,
769
+ "slot_index": 0
770
+ }
771
+ ],
772
+ "properties": {
773
+ "Node name for S&R": "RepeatLatentBatch"
774
+ },
775
+ "widgets_values": [
776
+ 4
777
+ ]
778
+ }
779
+ ],
780
+ "links": [
781
+ [
782
+ 8,
783
+ 4,
784
+ 2,
785
+ 8,
786
+ 1,
787
+ "VAE"
788
+ ],
789
+ [
790
+ 124,
791
+ 4,
792
+ 1,
793
+ 7,
794
+ 0,
795
+ "CLIP"
796
+ ],
797
+ [
798
+ 125,
799
+ 4,
800
+ 1,
801
+ 6,
802
+ 0,
803
+ "CLIP"
804
+ ],
805
+ [
806
+ 423,
807
+ 47,
808
+ 0,
809
+ 48,
810
+ 1,
811
+ "CONDITIONING"
812
+ ],
813
+ [
814
+ 424,
815
+ 47,
816
+ 1,
817
+ 48,
818
+ 2,
819
+ "CONDITIONING"
820
+ ],
821
+ [
822
+ 426,
823
+ 42,
824
+ 0,
825
+ 49,
826
+ 0,
827
+ "NOISE"
828
+ ],
829
+ [
830
+ 427,
831
+ 48,
832
+ 0,
833
+ 49,
834
+ 1,
835
+ "GUIDER"
836
+ ],
837
+ [
838
+ 428,
839
+ 41,
840
+ 0,
841
+ 49,
842
+ 2,
843
+ "SAMPLER"
844
+ ],
845
+ [
846
+ 429,
847
+ 44,
848
+ 0,
849
+ 49,
850
+ 3,
851
+ "SIGMAS"
852
+ ],
853
+ [
854
+ 434,
855
+ 4,
856
+ 2,
857
+ 47,
858
+ 2,
859
+ "VAE"
860
+ ],
861
+ [
862
+ 436,
863
+ 49,
864
+ 0,
865
+ 8,
866
+ 0,
867
+ "LATENT"
868
+ ],
869
+ [
870
+ 440,
871
+ 52,
872
+ 1,
873
+ 51,
874
+ 1,
875
+ "IPADAPTER"
876
+ ],
877
+ [
878
+ 441,
879
+ 4,
880
+ 0,
881
+ 52,
882
+ 0,
883
+ "MODEL"
884
+ ],
885
+ [
886
+ 442,
887
+ 52,
888
+ 0,
889
+ 51,
890
+ 0,
891
+ "MODEL"
892
+ ],
893
+ [
894
+ 443,
895
+ 53,
896
+ 0,
897
+ 51,
898
+ 2,
899
+ "IMAGE"
900
+ ],
901
+ [
902
+ 445,
903
+ 51,
904
+ 0,
905
+ 48,
906
+ 0,
907
+ "MODEL"
908
+ ],
909
+ [
910
+ 446,
911
+ 51,
912
+ 0,
913
+ 44,
914
+ 0,
915
+ "MODEL"
916
+ ],
917
+ [
918
+ 452,
919
+ 47,
920
+ 2,
921
+ 58,
922
+ 0,
923
+ "LATENT"
924
+ ],
925
+ [
926
+ 453,
927
+ 58,
928
+ 0,
929
+ 49,
930
+ 4,
931
+ "LATENT"
932
+ ],
933
+ [
934
+ 462,
935
+ 8,
936
+ 0,
937
+ 54,
938
+ 0,
939
+ "IMAGE"
940
+ ],
941
+ [
942
+ 464,
943
+ 13,
944
+ 0,
945
+ 59,
946
+ 0,
947
+ "IMAGE"
948
+ ],
949
+ [
950
+ 465,
951
+ 59,
952
+ 0,
953
+ 47,
954
+ 3,
955
+ "IMAGE"
956
+ ],
957
+ [
958
+ 466,
959
+ 6,
960
+ 0,
961
+ 47,
962
+ 0,
963
+ "CONDITIONING"
964
+ ],
965
+ [
966
+ 467,
967
+ 7,
968
+ 0,
969
+ 47,
970
+ 1,
971
+ "CONDITIONING"
972
+ ],
973
+ [
974
+ 468,
975
+ 7,
976
+ 0,
977
+ 48,
978
+ 3,
979
+ "CONDITIONING"
980
+ ]
981
+ ],
982
+ "groups": [],
983
+ "config": {},
984
+ "extra": {
985
+ "groupNodes": {
986
+ "IP2PSampler": {
987
+ "nodes": [
988
+ {
989
+ "type": "KSamplerSelect",
990
+ "pos": [
991
+ 912,
992
+ 1536
993
+ ],
994
+ "size": {
995
+ "0": 315,
996
+ "1": 58
997
+ },
998
+ "flags": {},
999
+ "order": 6,
1000
+ "mode": 0,
1001
+ "outputs": [
1002
+ {
1003
+ "name": "SAMPLER",
1004
+ "type": "SAMPLER",
1005
+ "links": [],
1006
+ "shape": 3
1007
+ }
1008
+ ],
1009
+ "properties": {
1010
+ "Node name for S&R": "KSamplerSelect"
1011
+ },
1012
+ "widgets_values": [
1013
+ "euler"
1014
+ ],
1015
+ "index": 0
1016
+ },
1017
+ {
1018
+ "type": "RandomNoise",
1019
+ "pos": [
1020
+ 912,
1021
+ 1200
1022
+ ],
1023
+ "size": {
1024
+ "0": 315,
1025
+ "1": 82
1026
+ },
1027
+ "flags": {},
1028
+ "order": 7,
1029
+ "mode": 0,
1030
+ "outputs": [
1031
+ {
1032
+ "name": "NOISE",
1033
+ "type": "NOISE",
1034
+ "links": [],
1035
+ "shape": 3
1036
+ }
1037
+ ],
1038
+ "properties": {
1039
+ "Node name for S&R": "RandomNoise"
1040
+ },
1041
+ "widgets_values": [
1042
+ 156680208700303,
1043
+ "fixed"
1044
+ ],
1045
+ "index": 1
1046
+ },
1047
+ {
1048
+ "type": "Reroute",
1049
+ "pos": [
1050
+ 720,
1051
+ 1488
1052
+ ],
1053
+ "size": [
1054
+ 75,
1055
+ 26
1056
+ ],
1057
+ "flags": {},
1058
+ "order": 9,
1059
+ "mode": 0,
1060
+ "inputs": [
1061
+ {
1062
+ "name": "",
1063
+ "type": "*",
1064
+ "link": null
1065
+ }
1066
+ ],
1067
+ "outputs": [
1068
+ {
1069
+ "name": "",
1070
+ "type": "*",
1071
+ "links": null
1072
+ }
1073
+ ],
1074
+ "properties": {
1075
+ "showOutputText": false,
1076
+ "horizontal": false
1077
+ },
1078
+ "index": 2
1079
+ },
1080
+ {
1081
+ "type": "BasicScheduler",
1082
+ "pos": [
1083
+ 912,
1084
+ 1632
1085
+ ],
1086
+ "size": {
1087
+ "0": 315,
1088
+ "1": 106
1089
+ },
1090
+ "flags": {},
1091
+ "order": 12,
1092
+ "mode": 0,
1093
+ "inputs": [
1094
+ {
1095
+ "name": "model",
1096
+ "type": "MODEL",
1097
+ "link": null
1098
+ }
1099
+ ],
1100
+ "outputs": [
1101
+ {
1102
+ "name": "SIGMAS",
1103
+ "type": "SIGMAS",
1104
+ "links": [],
1105
+ "shape": 3
1106
+ }
1107
+ ],
1108
+ "properties": {
1109
+ "Node name for S&R": "BasicScheduler"
1110
+ },
1111
+ "widgets_values": [
1112
+ "normal",
1113
+ 20,
1114
+ 1
1115
+ ],
1116
+ "index": 3
1117
+ },
1118
+ {
1119
+ "type": "Reroute",
1120
+ "pos": [
1121
+ 575,
1122
+ 1344
1123
+ ],
1124
+ "size": [
1125
+ 75,
1126
+ 26
1127
+ ],
1128
+ "flags": {},
1129
+ "order": 14,
1130
+ "mode": 0,
1131
+ "inputs": [
1132
+ {
1133
+ "name": "",
1134
+ "type": "*",
1135
+ "link": null
1136
+ }
1137
+ ],
1138
+ "outputs": [
1139
+ {
1140
+ "name": "",
1141
+ "type": "*",
1142
+ "links": null
1143
+ }
1144
+ ],
1145
+ "properties": {
1146
+ "showOutputText": false,
1147
+ "horizontal": false
1148
+ },
1149
+ "index": 4
1150
+ },
1151
+ {
1152
+ "type": "Reroute",
1153
+ "pos": [
1154
+ 570,
1155
+ 1386
1156
+ ],
1157
+ "size": [
1158
+ 75,
1159
+ 26
1160
+ ],
1161
+ "flags": {},
1162
+ "order": 13,
1163
+ "mode": 0,
1164
+ "inputs": [
1165
+ {
1166
+ "name": "",
1167
+ "type": "*",
1168
+ "link": null
1169
+ }
1170
+ ],
1171
+ "outputs": [
1172
+ {
1173
+ "name": "",
1174
+ "type": "*",
1175
+ "links": null
1176
+ }
1177
+ ],
1178
+ "properties": {
1179
+ "showOutputText": false,
1180
+ "horizontal": false
1181
+ },
1182
+ "index": 5
1183
+ },
1184
+ {
1185
+ "type": "InstructPixToPixConditioning",
1186
+ "pos": [
1187
+ 672,
1188
+ 1344
1189
+ ],
1190
+ "size": {
1191
+ "0": 235.1999969482422,
1192
+ "1": 86
1193
+ },
1194
+ "flags": {},
1195
+ "order": 15,
1196
+ "mode": 0,
1197
+ "inputs": [
1198
+ {
1199
+ "name": "positive",
1200
+ "type": "CONDITIONING",
1201
+ "link": null
1202
+ },
1203
+ {
1204
+ "name": "negative",
1205
+ "type": "CONDITIONING",
1206
+ "link": null
1207
+ },
1208
+ {
1209
+ "name": "vae",
1210
+ "type": "VAE",
1211
+ "link": null
1212
+ },
1213
+ {
1214
+ "name": "pixels",
1215
+ "type": "IMAGE",
1216
+ "link": null
1217
+ }
1218
+ ],
1219
+ "outputs": [
1220
+ {
1221
+ "name": "positive",
1222
+ "type": "CONDITIONING",
1223
+ "links": [],
1224
+ "shape": 3,
1225
+ "slot_index": 0
1226
+ },
1227
+ {
1228
+ "name": "negative",
1229
+ "type": "CONDITIONING",
1230
+ "links": [],
1231
+ "shape": 3,
1232
+ "slot_index": 1
1233
+ },
1234
+ {
1235
+ "name": "latent",
1236
+ "type": "LATENT",
1237
+ "links": [],
1238
+ "shape": 3,
1239
+ "slot_index": 2
1240
+ }
1241
+ ],
1242
+ "properties": {
1243
+ "Node name for S&R": "InstructPixToPixConditioning"
1244
+ },
1245
+ "index": 6
1246
+ },
1247
+ {
1248
+ "type": "DualCFGGuider",
1249
+ "pos": [
1250
+ 912,
1251
+ 1344
1252
+ ],
1253
+ "size": {
1254
+ "0": 315,
1255
+ "1": 142
1256
+ },
1257
+ "flags": {},
1258
+ "order": 16,
1259
+ "mode": 0,
1260
+ "inputs": [
1261
+ {
1262
+ "name": "model",
1263
+ "type": "MODEL",
1264
+ "link": null
1265
+ },
1266
+ {
1267
+ "name": "cond1",
1268
+ "type": "CONDITIONING",
1269
+ "link": null
1270
+ },
1271
+ {
1272
+ "name": "cond2",
1273
+ "type": "CONDITIONING",
1274
+ "link": null
1275
+ },
1276
+ {
1277
+ "name": "negative",
1278
+ "type": "CONDITIONING",
1279
+ "link": null
1280
+ }
1281
+ ],
1282
+ "outputs": [
1283
+ {
1284
+ "name": "GUIDER",
1285
+ "type": "GUIDER",
1286
+ "links": [],
1287
+ "shape": 3,
1288
+ "slot_index": 0
1289
+ }
1290
+ ],
1291
+ "properties": {
1292
+ "Node name for S&R": "DualCFGGuider"
1293
+ },
1294
+ "widgets_values": [
1295
+ 3,
1296
+ 1.5
1297
+ ],
1298
+ "index": 7
1299
+ },
1300
+ {
1301
+ "type": "SamplerCustomAdvanced",
1302
+ "pos": [
1303
+ 1296,
1304
+ 1200
1305
+ ],
1306
+ "size": {
1307
+ "0": 355.20001220703125,
1308
+ "1": 106
1309
+ },
1310
+ "flags": {},
1311
+ "order": 17,
1312
+ "mode": 0,
1313
+ "inputs": [
1314
+ {
1315
+ "name": "noise",
1316
+ "type": "NOISE",
1317
+ "link": null,
1318
+ "slot_index": 0
1319
+ },
1320
+ {
1321
+ "name": "guider",
1322
+ "type": "GUIDER",
1323
+ "link": null,
1324
+ "slot_index": 1
1325
+ },
1326
+ {
1327
+ "name": "sampler",
1328
+ "type": "SAMPLER",
1329
+ "link": null,
1330
+ "slot_index": 2
1331
+ },
1332
+ {
1333
+ "name": "sigmas",
1334
+ "type": "SIGMAS",
1335
+ "link": null,
1336
+ "slot_index": 3
1337
+ },
1338
+ {
1339
+ "name": "latent_image",
1340
+ "type": "LATENT",
1341
+ "link": null,
1342
+ "slot_index": 4
1343
+ }
1344
+ ],
1345
+ "outputs": [
1346
+ {
1347
+ "name": "output",
1348
+ "type": "LATENT",
1349
+ "links": [],
1350
+ "shape": 3,
1351
+ "slot_index": 0
1352
+ },
1353
+ {
1354
+ "name": "denoised_output",
1355
+ "type": "LATENT",
1356
+ "links": null,
1357
+ "shape": 3
1358
+ }
1359
+ ],
1360
+ "properties": {
1361
+ "Node name for S&R": "SamplerCustomAdvanced"
1362
+ },
1363
+ "index": 8
1364
+ }
1365
+ ],
1366
+ "links": [
1367
+ [
1368
+ null,
1369
+ 0,
1370
+ 2,
1371
+ 0,
1372
+ 4,
1373
+ "MODEL"
1374
+ ],
1375
+ [
1376
+ 2,
1377
+ 0,
1378
+ 3,
1379
+ 0,
1380
+ 26,
1381
+ "MODEL"
1382
+ ],
1383
+ [
1384
+ null,
1385
+ 0,
1386
+ 5,
1387
+ 0,
1388
+ 7,
1389
+ "CONDITIONING"
1390
+ ],
1391
+ [
1392
+ null,
1393
+ 0,
1394
+ 4,
1395
+ 0,
1396
+ 6,
1397
+ "CONDITIONING"
1398
+ ],
1399
+ [
1400
+ 4,
1401
+ 0,
1402
+ 6,
1403
+ 0,
1404
+ 35,
1405
+ "CONDITIONING"
1406
+ ],
1407
+ [
1408
+ 5,
1409
+ 0,
1410
+ 6,
1411
+ 1,
1412
+ 29,
1413
+ "CONDITIONING"
1414
+ ],
1415
+ [
1416
+ null,
1417
+ 2,
1418
+ 6,
1419
+ 2,
1420
+ 4,
1421
+ "VAE"
1422
+ ],
1423
+ [
1424
+ null,
1425
+ 0,
1426
+ 6,
1427
+ 3,
1428
+ 13,
1429
+ "IMAGE"
1430
+ ],
1431
+ [
1432
+ 2,
1433
+ 0,
1434
+ 7,
1435
+ 0,
1436
+ 26,
1437
+ "MODEL"
1438
+ ],
1439
+ [
1440
+ 6,
1441
+ 0,
1442
+ 7,
1443
+ 1,
1444
+ 33,
1445
+ "CONDITIONING"
1446
+ ],
1447
+ [
1448
+ 6,
1449
+ 1,
1450
+ 7,
1451
+ 2,
1452
+ 33,
1453
+ "CONDITIONING"
1454
+ ],
1455
+ [
1456
+ 5,
1457
+ 0,
1458
+ 7,
1459
+ 3,
1460
+ 29,
1461
+ "CONDITIONING"
1462
+ ],
1463
+ [
1464
+ 1,
1465
+ 0,
1466
+ 8,
1467
+ 0,
1468
+ 19,
1469
+ "NOISE"
1470
+ ],
1471
+ [
1472
+ 7,
1473
+ 0,
1474
+ 8,
1475
+ 1,
1476
+ 28,
1477
+ "GUIDER"
1478
+ ],
1479
+ [
1480
+ 0,
1481
+ 0,
1482
+ 8,
1483
+ 2,
1484
+ 20,
1485
+ "SAMPLER"
1486
+ ],
1487
+ [
1488
+ 3,
1489
+ 0,
1490
+ 8,
1491
+ 3,
1492
+ 21,
1493
+ "SIGMAS"
1494
+ ],
1495
+ [
1496
+ 6,
1497
+ 2,
1498
+ 8,
1499
+ 4,
1500
+ 33,
1501
+ "LATENT"
1502
+ ]
1503
+ ],
1504
+ "external": [
1505
+ [
1506
+ {
1507
+ "type": "SamplerCustomAdvanced",
1508
+ "pos": [
1509
+ 1296,
1510
+ 1200
1511
+ ],
1512
+ "size": {
1513
+ "0": 355.20001220703125,
1514
+ "1": 106
1515
+ },
1516
+ "flags": {},
1517
+ "order": 17,
1518
+ "mode": 0,
1519
+ "inputs": [
1520
+ {
1521
+ "name": "noise",
1522
+ "type": "NOISE",
1523
+ "link": null,
1524
+ "slot_index": 0
1525
+ },
1526
+ {
1527
+ "name": "guider",
1528
+ "type": "GUIDER",
1529
+ "link": null,
1530
+ "slot_index": 1
1531
+ },
1532
+ {
1533
+ "name": "sampler",
1534
+ "type": "SAMPLER",
1535
+ "link": null,
1536
+ "slot_index": 2
1537
+ },
1538
+ {
1539
+ "name": "sigmas",
1540
+ "type": "SIGMAS",
1541
+ "link": null,
1542
+ "slot_index": 3
1543
+ },
1544
+ {
1545
+ "name": "latent_image",
1546
+ "type": "LATENT",
1547
+ "link": null,
1548
+ "slot_index": 4
1549
+ }
1550
+ ],
1551
+ "outputs": [
1552
+ {
1553
+ "name": "output",
1554
+ "type": "LATENT",
1555
+ "links": [],
1556
+ "shape": 3,
1557
+ "slot_index": 0
1558
+ },
1559
+ {
1560
+ "name": "denoised_output",
1561
+ "type": "LATENT",
1562
+ "links": null,
1563
+ "shape": 3
1564
+ }
1565
+ ],
1566
+ "properties": {
1567
+ "Node name for S&R": "SamplerCustomAdvanced"
1568
+ },
1569
+ "index": 8
1570
+ },
1571
+ 0,
1572
+ "LATENT"
1573
+ ]
1574
+ ],
1575
+ "config": {
1576
+ "0": {},
1577
+ "1": {},
1578
+ "2": {
1579
+ "input": {
1580
+ "MODEL": {
1581
+ "name": "model"
1582
+ }
1583
+ }
1584
+ },
1585
+ "3": {},
1586
+ "4": {
1587
+ "input": {
1588
+ "CONDITIONING": {
1589
+ "name": "positive"
1590
+ }
1591
+ }
1592
+ },
1593
+ "5": {
1594
+ "input": {
1595
+ "CONDITIONING": {
1596
+ "name": "negative"
1597
+ }
1598
+ }
1599
+ },
1600
+ "6": {},
1601
+ "7": {
1602
+ "input": {
1603
+ "cfg_conds": {
1604
+ "name": "cfg_text"
1605
+ },
1606
+ "cfg_cond2_negative": {
1607
+ "name": "cfg_image"
1608
+ }
1609
+ }
1610
+ },
1611
+ "8": {}
1612
+ }
1613
+ }
1614
+ },
1615
+ "ds": {
1616
+ "scale": 0.45949729863579125,
1617
+ "offset": [
1618
+ 197.43602825302307,
1619
+ 1634.0791215485065
1620
+ ]
1621
+ }
1622
+ },
1623
+ "version": 0.4
1624
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_faceid.json ADDED
@@ -0,0 +1,566 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 20,
3
+ "last_link_id": 36,
4
+ "nodes": [
5
+ {
6
+ "id": 8,
7
+ "type": "VAEDecode",
8
+ "pos": [
9
+ 1640,
10
+ 710
11
+ ],
12
+ "size": {
13
+ "0": 140,
14
+ "1": 46
15
+ },
16
+ "flags": {},
17
+ "order": 8,
18
+ "mode": 0,
19
+ "inputs": [
20
+ {
21
+ "name": "samples",
22
+ "type": "LATENT",
23
+ "link": 7
24
+ },
25
+ {
26
+ "name": "vae",
27
+ "type": "VAE",
28
+ "link": 8
29
+ }
30
+ ],
31
+ "outputs": [
32
+ {
33
+ "name": "IMAGE",
34
+ "type": "IMAGE",
35
+ "links": [
36
+ 9
37
+ ],
38
+ "slot_index": 0
39
+ }
40
+ ],
41
+ "properties": {
42
+ "Node name for S&R": "VAEDecode"
43
+ }
44
+ },
45
+ {
46
+ "id": 5,
47
+ "type": "EmptyLatentImage",
48
+ "pos": [
49
+ 870,
50
+ 1100
51
+ ],
52
+ "size": {
53
+ "0": 315,
54
+ "1": 106
55
+ },
56
+ "flags": {},
57
+ "order": 0,
58
+ "mode": 0,
59
+ "outputs": [
60
+ {
61
+ "name": "LATENT",
62
+ "type": "LATENT",
63
+ "links": [
64
+ 2
65
+ ],
66
+ "slot_index": 0
67
+ }
68
+ ],
69
+ "properties": {
70
+ "Node name for S&R": "EmptyLatentImage"
71
+ },
72
+ "widgets_values": [
73
+ 512,
74
+ 512,
75
+ 1
76
+ ]
77
+ },
78
+ {
79
+ "id": 3,
80
+ "type": "KSampler",
81
+ "pos": [
82
+ 1280,
83
+ 710
84
+ ],
85
+ "size": {
86
+ "0": 315,
87
+ "1": 262
88
+ },
89
+ "flags": {},
90
+ "order": 7,
91
+ "mode": 0,
92
+ "inputs": [
93
+ {
94
+ "name": "model",
95
+ "type": "MODEL",
96
+ "link": 32
97
+ },
98
+ {
99
+ "name": "positive",
100
+ "type": "CONDITIONING",
101
+ "link": 4
102
+ },
103
+ {
104
+ "name": "negative",
105
+ "type": "CONDITIONING",
106
+ "link": 6
107
+ },
108
+ {
109
+ "name": "latent_image",
110
+ "type": "LATENT",
111
+ "link": 2
112
+ }
113
+ ],
114
+ "outputs": [
115
+ {
116
+ "name": "LATENT",
117
+ "type": "LATENT",
118
+ "links": [
119
+ 7
120
+ ],
121
+ "slot_index": 0
122
+ }
123
+ ],
124
+ "properties": {
125
+ "Node name for S&R": "KSampler"
126
+ },
127
+ "widgets_values": [
128
+ 0,
129
+ "fixed",
130
+ 30,
131
+ 6.5,
132
+ "ddpm",
133
+ "karras",
134
+ 1
135
+ ]
136
+ },
137
+ {
138
+ "id": 9,
139
+ "type": "SaveImage",
140
+ "pos": [
141
+ 1830,
142
+ 700
143
+ ],
144
+ "size": {
145
+ "0": 529.7760009765625,
146
+ "1": 582.3048095703125
147
+ },
148
+ "flags": {},
149
+ "order": 9,
150
+ "mode": 0,
151
+ "inputs": [
152
+ {
153
+ "name": "images",
154
+ "type": "IMAGE",
155
+ "link": 9
156
+ }
157
+ ],
158
+ "properties": {},
159
+ "widgets_values": [
160
+ "IPAdapter"
161
+ ]
162
+ },
163
+ {
164
+ "id": 12,
165
+ "type": "LoadImage",
166
+ "pos": [
167
+ 450,
168
+ 240
169
+ ],
170
+ "size": {
171
+ "0": 315,
172
+ "1": 314
173
+ },
174
+ "flags": {},
175
+ "order": 1,
176
+ "mode": 0,
177
+ "outputs": [
178
+ {
179
+ "name": "IMAGE",
180
+ "type": "IMAGE",
181
+ "links": [
182
+ 29
183
+ ],
184
+ "shape": 3,
185
+ "slot_index": 0
186
+ },
187
+ {
188
+ "name": "MASK",
189
+ "type": "MASK",
190
+ "links": null,
191
+ "shape": 3
192
+ }
193
+ ],
194
+ "properties": {
195
+ "Node name for S&R": "LoadImage"
196
+ },
197
+ "widgets_values": [
198
+ "rosario_4.jpg",
199
+ "image"
200
+ ]
201
+ },
202
+ {
203
+ "id": 20,
204
+ "type": "IPAdapterUnifiedLoaderFaceID",
205
+ "pos": [
206
+ 460,
207
+ 60
208
+ ],
209
+ "size": {
210
+ "0": 315,
211
+ "1": 126
212
+ },
213
+ "flags": {},
214
+ "order": 3,
215
+ "mode": 0,
216
+ "inputs": [
217
+ {
218
+ "name": "model",
219
+ "type": "MODEL",
220
+ "link": 36
221
+ },
222
+ {
223
+ "name": "ipadapter",
224
+ "type": "IPADAPTER",
225
+ "link": null
226
+ }
227
+ ],
228
+ "outputs": [
229
+ {
230
+ "name": "MODEL",
231
+ "type": "MODEL",
232
+ "links": [
233
+ 35
234
+ ],
235
+ "shape": 3,
236
+ "slot_index": 0
237
+ },
238
+ {
239
+ "name": "ipadapter",
240
+ "type": "IPADAPTER",
241
+ "links": [
242
+ 34
243
+ ],
244
+ "shape": 3
245
+ }
246
+ ],
247
+ "properties": {
248
+ "Node name for S&R": "IPAdapterUnifiedLoaderFaceID"
249
+ },
250
+ "widgets_values": [
251
+ "FACEID PLUS V2",
252
+ 0.6,
253
+ "CPU"
254
+ ]
255
+ },
256
+ {
257
+ "id": 7,
258
+ "type": "CLIPTextEncode",
259
+ "pos": [
260
+ 760,
261
+ 850
262
+ ],
263
+ "size": {
264
+ "0": 425.27801513671875,
265
+ "1": 180.6060791015625
266
+ },
267
+ "flags": {},
268
+ "order": 5,
269
+ "mode": 0,
270
+ "inputs": [
271
+ {
272
+ "name": "clip",
273
+ "type": "CLIP",
274
+ "link": 5
275
+ }
276
+ ],
277
+ "outputs": [
278
+ {
279
+ "name": "CONDITIONING",
280
+ "type": "CONDITIONING",
281
+ "links": [
282
+ 6
283
+ ],
284
+ "slot_index": 0
285
+ }
286
+ ],
287
+ "properties": {
288
+ "Node name for S&R": "CLIPTextEncode"
289
+ },
290
+ "widgets_values": [
291
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed, naked"
292
+ ]
293
+ },
294
+ {
295
+ "id": 6,
296
+ "type": "CLIPTextEncode",
297
+ "pos": [
298
+ 760,
299
+ 620
300
+ ],
301
+ "size": {
302
+ "0": 422.84503173828125,
303
+ "1": 164.31304931640625
304
+ },
305
+ "flags": {},
306
+ "order": 4,
307
+ "mode": 0,
308
+ "inputs": [
309
+ {
310
+ "name": "clip",
311
+ "type": "CLIP",
312
+ "link": 3
313
+ }
314
+ ],
315
+ "outputs": [
316
+ {
317
+ "name": "CONDITIONING",
318
+ "type": "CONDITIONING",
319
+ "links": [
320
+ 4
321
+ ],
322
+ "slot_index": 0
323
+ }
324
+ ],
325
+ "properties": {
326
+ "Node name for S&R": "CLIPTextEncode"
327
+ },
328
+ "widgets_values": [
329
+ "closeup of a beautiful woman wearing a black dress on the seaside\n\nserene, sunset, spring, high quality, detailed, diffuse light"
330
+ ]
331
+ },
332
+ {
333
+ "id": 4,
334
+ "type": "CheckpointLoaderSimple",
335
+ "pos": [
336
+ 10,
337
+ 680
338
+ ],
339
+ "size": {
340
+ "0": 315,
341
+ "1": 98
342
+ },
343
+ "flags": {},
344
+ "order": 2,
345
+ "mode": 0,
346
+ "outputs": [
347
+ {
348
+ "name": "MODEL",
349
+ "type": "MODEL",
350
+ "links": [
351
+ 36
352
+ ],
353
+ "slot_index": 0
354
+ },
355
+ {
356
+ "name": "CLIP",
357
+ "type": "CLIP",
358
+ "links": [
359
+ 3,
360
+ 5
361
+ ],
362
+ "slot_index": 1
363
+ },
364
+ {
365
+ "name": "VAE",
366
+ "type": "VAE",
367
+ "links": [
368
+ 8
369
+ ],
370
+ "slot_index": 2
371
+ }
372
+ ],
373
+ "properties": {
374
+ "Node name for S&R": "CheckpointLoaderSimple"
375
+ },
376
+ "widgets_values": [
377
+ "sd15/realisticVisionV51_v51VAE.safetensors"
378
+ ]
379
+ },
380
+ {
381
+ "id": 18,
382
+ "type": "IPAdapterFaceID",
383
+ "pos": [
384
+ 850,
385
+ 190
386
+ ],
387
+ "size": {
388
+ "0": 315,
389
+ "1": 298
390
+ },
391
+ "flags": {},
392
+ "order": 6,
393
+ "mode": 0,
394
+ "inputs": [
395
+ {
396
+ "name": "model",
397
+ "type": "MODEL",
398
+ "link": 35
399
+ },
400
+ {
401
+ "name": "ipadapter",
402
+ "type": "IPADAPTER",
403
+ "link": 34,
404
+ "slot_index": 1
405
+ },
406
+ {
407
+ "name": "image",
408
+ "type": "IMAGE",
409
+ "link": 29
410
+ },
411
+ {
412
+ "name": "image_negative",
413
+ "type": "IMAGE",
414
+ "link": null
415
+ },
416
+ {
417
+ "name": "attn_mask",
418
+ "type": "MASK",
419
+ "link": null
420
+ },
421
+ {
422
+ "name": "clip_vision",
423
+ "type": "CLIP_VISION",
424
+ "link": null
425
+ },
426
+ {
427
+ "name": "insightface",
428
+ "type": "INSIGHTFACE",
429
+ "link": null
430
+ }
431
+ ],
432
+ "outputs": [
433
+ {
434
+ "name": "MODEL",
435
+ "type": "MODEL",
436
+ "links": [
437
+ 32
438
+ ],
439
+ "shape": 3,
440
+ "slot_index": 0
441
+ }
442
+ ],
443
+ "properties": {
444
+ "Node name for S&R": "IPAdapterFaceID"
445
+ },
446
+ "widgets_values": [
447
+ 1,
448
+ 2,
449
+ "linear",
450
+ "concat",
451
+ 0,
452
+ 1
453
+ ]
454
+ }
455
+ ],
456
+ "links": [
457
+ [
458
+ 2,
459
+ 5,
460
+ 0,
461
+ 3,
462
+ 3,
463
+ "LATENT"
464
+ ],
465
+ [
466
+ 3,
467
+ 4,
468
+ 1,
469
+ 6,
470
+ 0,
471
+ "CLIP"
472
+ ],
473
+ [
474
+ 4,
475
+ 6,
476
+ 0,
477
+ 3,
478
+ 1,
479
+ "CONDITIONING"
480
+ ],
481
+ [
482
+ 5,
483
+ 4,
484
+ 1,
485
+ 7,
486
+ 0,
487
+ "CLIP"
488
+ ],
489
+ [
490
+ 6,
491
+ 7,
492
+ 0,
493
+ 3,
494
+ 2,
495
+ "CONDITIONING"
496
+ ],
497
+ [
498
+ 7,
499
+ 3,
500
+ 0,
501
+ 8,
502
+ 0,
503
+ "LATENT"
504
+ ],
505
+ [
506
+ 8,
507
+ 4,
508
+ 2,
509
+ 8,
510
+ 1,
511
+ "VAE"
512
+ ],
513
+ [
514
+ 9,
515
+ 8,
516
+ 0,
517
+ 9,
518
+ 0,
519
+ "IMAGE"
520
+ ],
521
+ [
522
+ 29,
523
+ 12,
524
+ 0,
525
+ 18,
526
+ 2,
527
+ "IMAGE"
528
+ ],
529
+ [
530
+ 32,
531
+ 18,
532
+ 0,
533
+ 3,
534
+ 0,
535
+ "MODEL"
536
+ ],
537
+ [
538
+ 34,
539
+ 20,
540
+ 1,
541
+ 18,
542
+ 1,
543
+ "IPADAPTER"
544
+ ],
545
+ [
546
+ 35,
547
+ 20,
548
+ 0,
549
+ 18,
550
+ 0,
551
+ "MODEL"
552
+ ],
553
+ [
554
+ 36,
555
+ 4,
556
+ 0,
557
+ 20,
558
+ 0,
559
+ "MODEL"
560
+ ]
561
+ ],
562
+ "groups": [],
563
+ "config": {},
564
+ "extra": {},
565
+ "version": 0.4
566
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_faceid_batch.json ADDED
@@ -0,0 +1,1023 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 33,
3
+ "last_link_id": 56,
4
+ "nodes": [
5
+ {
6
+ "id": 5,
7
+ "type": "EmptyLatentImage",
8
+ "pos": [
9
+ 870,
10
+ 1100
11
+ ],
12
+ "size": {
13
+ "0": 315,
14
+ "1": 106
15
+ },
16
+ "flags": {},
17
+ "order": 0,
18
+ "mode": 0,
19
+ "outputs": [
20
+ {
21
+ "name": "LATENT",
22
+ "type": "LATENT",
23
+ "links": [
24
+ 2
25
+ ],
26
+ "slot_index": 0
27
+ }
28
+ ],
29
+ "properties": {
30
+ "Node name for S&R": "EmptyLatentImage"
31
+ },
32
+ "widgets_values": [
33
+ 512,
34
+ 512,
35
+ 1
36
+ ]
37
+ },
38
+ {
39
+ "id": 3,
40
+ "type": "KSampler",
41
+ "pos": [
42
+ 1280,
43
+ 710
44
+ ],
45
+ "size": {
46
+ "0": 315,
47
+ "1": 262
48
+ },
49
+ "flags": {},
50
+ "order": 15,
51
+ "mode": 0,
52
+ "inputs": [
53
+ {
54
+ "name": "model",
55
+ "type": "MODEL",
56
+ "link": 42
57
+ },
58
+ {
59
+ "name": "positive",
60
+ "type": "CONDITIONING",
61
+ "link": 4
62
+ },
63
+ {
64
+ "name": "negative",
65
+ "type": "CONDITIONING",
66
+ "link": 6
67
+ },
68
+ {
69
+ "name": "latent_image",
70
+ "type": "LATENT",
71
+ "link": 2
72
+ }
73
+ ],
74
+ "outputs": [
75
+ {
76
+ "name": "LATENT",
77
+ "type": "LATENT",
78
+ "links": [
79
+ 7
80
+ ],
81
+ "slot_index": 0
82
+ }
83
+ ],
84
+ "properties": {
85
+ "Node name for S&R": "KSampler"
86
+ },
87
+ "widgets_values": [
88
+ 0,
89
+ "fixed",
90
+ 30,
91
+ 6.5,
92
+ "ddpm",
93
+ "karras",
94
+ 1
95
+ ]
96
+ },
97
+ {
98
+ "id": 7,
99
+ "type": "CLIPTextEncode",
100
+ "pos": [
101
+ 760,
102
+ 850
103
+ ],
104
+ "size": {
105
+ "0": 425.27801513671875,
106
+ "1": 180.6060791015625
107
+ },
108
+ "flags": {},
109
+ "order": 10,
110
+ "mode": 0,
111
+ "inputs": [
112
+ {
113
+ "name": "clip",
114
+ "type": "CLIP",
115
+ "link": 5
116
+ }
117
+ ],
118
+ "outputs": [
119
+ {
120
+ "name": "CONDITIONING",
121
+ "type": "CONDITIONING",
122
+ "links": [
123
+ 6
124
+ ],
125
+ "slot_index": 0
126
+ }
127
+ ],
128
+ "properties": {
129
+ "Node name for S&R": "CLIPTextEncode"
130
+ },
131
+ "widgets_values": [
132
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed, naked"
133
+ ]
134
+ },
135
+ {
136
+ "id": 6,
137
+ "type": "CLIPTextEncode",
138
+ "pos": [
139
+ 760,
140
+ 620
141
+ ],
142
+ "size": {
143
+ "0": 422.84503173828125,
144
+ "1": 164.31304931640625
145
+ },
146
+ "flags": {},
147
+ "order": 9,
148
+ "mode": 0,
149
+ "inputs": [
150
+ {
151
+ "name": "clip",
152
+ "type": "CLIP",
153
+ "link": 3
154
+ }
155
+ ],
156
+ "outputs": [
157
+ {
158
+ "name": "CONDITIONING",
159
+ "type": "CONDITIONING",
160
+ "links": [
161
+ 4
162
+ ],
163
+ "slot_index": 0
164
+ }
165
+ ],
166
+ "properties": {
167
+ "Node name for S&R": "CLIPTextEncode"
168
+ },
169
+ "widgets_values": [
170
+ "closeup of a beautiful woman wearing a black dress on the seaside\n\nserene, sunset, spring, high quality, detailed, diffuse light"
171
+ ]
172
+ },
173
+ {
174
+ "id": 22,
175
+ "type": "IPAdapterUnifiedLoader",
176
+ "pos": [
177
+ 855,
178
+ 51
179
+ ],
180
+ "size": {
181
+ "0": 315,
182
+ "1": 78
183
+ },
184
+ "flags": {},
185
+ "order": 13,
186
+ "mode": 0,
187
+ "inputs": [
188
+ {
189
+ "name": "model",
190
+ "type": "MODEL",
191
+ "link": 43
192
+ },
193
+ {
194
+ "name": "ipadapter",
195
+ "type": "IPADAPTER",
196
+ "link": 38
197
+ }
198
+ ],
199
+ "outputs": [
200
+ {
201
+ "name": "model",
202
+ "type": "MODEL",
203
+ "links": [
204
+ 40
205
+ ],
206
+ "shape": 3,
207
+ "slot_index": 0
208
+ },
209
+ {
210
+ "name": "ipadapter",
211
+ "type": "IPADAPTER",
212
+ "links": [
213
+ 37
214
+ ],
215
+ "shape": 3
216
+ }
217
+ ],
218
+ "properties": {
219
+ "Node name for S&R": "IPAdapterUnifiedLoader"
220
+ },
221
+ "widgets_values": [
222
+ "FULL FACE - SD1.5 only (portraits stronger)"
223
+ ]
224
+ },
225
+ {
226
+ "id": 21,
227
+ "type": "IPAdapter",
228
+ "pos": [
229
+ 1280,
230
+ 170
231
+ ],
232
+ "size": {
233
+ "0": 315,
234
+ "1": 190
235
+ },
236
+ "flags": {},
237
+ "order": 14,
238
+ "mode": 0,
239
+ "inputs": [
240
+ {
241
+ "name": "model",
242
+ "type": "MODEL",
243
+ "link": 40
244
+ },
245
+ {
246
+ "name": "ipadapter",
247
+ "type": "IPADAPTER",
248
+ "link": 37,
249
+ "slot_index": 1
250
+ },
251
+ {
252
+ "name": "image",
253
+ "type": "IMAGE",
254
+ "link": 56
255
+ },
256
+ {
257
+ "name": "attn_mask",
258
+ "type": "MASK",
259
+ "link": null
260
+ }
261
+ ],
262
+ "outputs": [
263
+ {
264
+ "name": "MODEL",
265
+ "type": "MODEL",
266
+ "links": [
267
+ 42
268
+ ],
269
+ "shape": 3,
270
+ "slot_index": 0
271
+ }
272
+ ],
273
+ "properties": {
274
+ "Node name for S&R": "IPAdapter"
275
+ },
276
+ "widgets_values": [
277
+ 0.4,
278
+ 0,
279
+ 1,
280
+ "standard"
281
+ ]
282
+ },
283
+ {
284
+ "id": 20,
285
+ "type": "IPAdapterUnifiedLoaderFaceID",
286
+ "pos": [
287
+ 457,
288
+ 57
289
+ ],
290
+ "size": {
291
+ "0": 315,
292
+ "1": 126
293
+ },
294
+ "flags": {},
295
+ "order": 8,
296
+ "mode": 0,
297
+ "inputs": [
298
+ {
299
+ "name": "model",
300
+ "type": "MODEL",
301
+ "link": 36
302
+ },
303
+ {
304
+ "name": "ipadapter",
305
+ "type": "IPADAPTER",
306
+ "link": null
307
+ }
308
+ ],
309
+ "outputs": [
310
+ {
311
+ "name": "MODEL",
312
+ "type": "MODEL",
313
+ "links": [
314
+ 35
315
+ ],
316
+ "shape": 3,
317
+ "slot_index": 0
318
+ },
319
+ {
320
+ "name": "ipadapter",
321
+ "type": "IPADAPTER",
322
+ "links": [
323
+ 34,
324
+ 38
325
+ ],
326
+ "shape": 3,
327
+ "slot_index": 1
328
+ }
329
+ ],
330
+ "properties": {
331
+ "Node name for S&R": "IPAdapterUnifiedLoaderFaceID"
332
+ },
333
+ "widgets_values": [
334
+ "FACEID PLUS V2",
335
+ 0.6,
336
+ "CPU"
337
+ ]
338
+ },
339
+ {
340
+ "id": 27,
341
+ "type": "ImageBatch",
342
+ "pos": [
343
+ 180,
344
+ -210
345
+ ],
346
+ "size": {
347
+ "0": 210,
348
+ "1": 46
349
+ },
350
+ "flags": {},
351
+ "order": 6,
352
+ "mode": 0,
353
+ "inputs": [
354
+ {
355
+ "name": "image1",
356
+ "type": "IMAGE",
357
+ "link": 44
358
+ },
359
+ {
360
+ "name": "image2",
361
+ "type": "IMAGE",
362
+ "link": 45
363
+ }
364
+ ],
365
+ "outputs": [
366
+ {
367
+ "name": "IMAGE",
368
+ "type": "IMAGE",
369
+ "links": [
370
+ 48
371
+ ],
372
+ "shape": 3,
373
+ "slot_index": 0
374
+ }
375
+ ],
376
+ "properties": {
377
+ "Node name for S&R": "ImageBatch"
378
+ }
379
+ },
380
+ {
381
+ "id": 28,
382
+ "type": "ImageBatch",
383
+ "pos": [
384
+ 180,
385
+ -110
386
+ ],
387
+ "size": {
388
+ "0": 210,
389
+ "1": 46
390
+ },
391
+ "flags": {},
392
+ "order": 7,
393
+ "mode": 0,
394
+ "inputs": [
395
+ {
396
+ "name": "image1",
397
+ "type": "IMAGE",
398
+ "link": 46
399
+ },
400
+ {
401
+ "name": "image2",
402
+ "type": "IMAGE",
403
+ "link": 47
404
+ }
405
+ ],
406
+ "outputs": [
407
+ {
408
+ "name": "IMAGE",
409
+ "type": "IMAGE",
410
+ "links": [
411
+ 49
412
+ ],
413
+ "shape": 3,
414
+ "slot_index": 0
415
+ }
416
+ ],
417
+ "properties": {
418
+ "Node name for S&R": "ImageBatch"
419
+ }
420
+ },
421
+ {
422
+ "id": 29,
423
+ "type": "ImageBatch",
424
+ "pos": [
425
+ 420,
426
+ -170
427
+ ],
428
+ "size": {
429
+ "0": 210,
430
+ "1": 46
431
+ },
432
+ "flags": {},
433
+ "order": 11,
434
+ "mode": 0,
435
+ "inputs": [
436
+ {
437
+ "name": "image1",
438
+ "type": "IMAGE",
439
+ "link": 48
440
+ },
441
+ {
442
+ "name": "image2",
443
+ "type": "IMAGE",
444
+ "link": 49
445
+ }
446
+ ],
447
+ "outputs": [
448
+ {
449
+ "name": "IMAGE",
450
+ "type": "IMAGE",
451
+ "links": [
452
+ 50
453
+ ],
454
+ "shape": 3,
455
+ "slot_index": 0
456
+ }
457
+ ],
458
+ "properties": {
459
+ "Node name for S&R": "ImageBatch"
460
+ }
461
+ },
462
+ {
463
+ "id": 25,
464
+ "type": "LoadImage",
465
+ "pos": [
466
+ -580,
467
+ -380
468
+ ],
469
+ "size": {
470
+ "0": 315,
471
+ "1": 314
472
+ },
473
+ "flags": {},
474
+ "order": 1,
475
+ "mode": 0,
476
+ "outputs": [
477
+ {
478
+ "name": "IMAGE",
479
+ "type": "IMAGE",
480
+ "links": [
481
+ 45
482
+ ],
483
+ "shape": 3,
484
+ "slot_index": 0
485
+ },
486
+ {
487
+ "name": "MASK",
488
+ "type": "MASK",
489
+ "links": null,
490
+ "shape": 3
491
+ }
492
+ ],
493
+ "properties": {
494
+ "Node name for S&R": "LoadImage"
495
+ },
496
+ "widgets_values": [
497
+ "blonde_1.png",
498
+ "image"
499
+ ]
500
+ },
501
+ {
502
+ "id": 12,
503
+ "type": "LoadImage",
504
+ "pos": [
505
+ -220,
506
+ -370
507
+ ],
508
+ "size": {
509
+ "0": 315,
510
+ "1": 314
511
+ },
512
+ "flags": {},
513
+ "order": 2,
514
+ "mode": 0,
515
+ "outputs": [
516
+ {
517
+ "name": "IMAGE",
518
+ "type": "IMAGE",
519
+ "links": [
520
+ 44
521
+ ],
522
+ "shape": 3,
523
+ "slot_index": 0
524
+ },
525
+ {
526
+ "name": "MASK",
527
+ "type": "MASK",
528
+ "links": null,
529
+ "shape": 3
530
+ }
531
+ ],
532
+ "properties": {
533
+ "Node name for S&R": "LoadImage"
534
+ },
535
+ "widgets_values": [
536
+ "blonde_2_repair.png",
537
+ "image"
538
+ ]
539
+ },
540
+ {
541
+ "id": 26,
542
+ "type": "LoadImage",
543
+ "pos": [
544
+ -580,
545
+ 0
546
+ ],
547
+ "size": {
548
+ "0": 315,
549
+ "1": 314
550
+ },
551
+ "flags": {},
552
+ "order": 3,
553
+ "mode": 0,
554
+ "outputs": [
555
+ {
556
+ "name": "IMAGE",
557
+ "type": "IMAGE",
558
+ "links": [
559
+ 47
560
+ ],
561
+ "shape": 3,
562
+ "slot_index": 0
563
+ },
564
+ {
565
+ "name": "MASK",
566
+ "type": "MASK",
567
+ "links": null,
568
+ "shape": 3
569
+ }
570
+ ],
571
+ "properties": {
572
+ "Node name for S&R": "LoadImage"
573
+ },
574
+ "widgets_values": [
575
+ "blonde_4_repair.png",
576
+ "image"
577
+ ]
578
+ },
579
+ {
580
+ "id": 24,
581
+ "type": "LoadImage",
582
+ "pos": [
583
+ -230,
584
+ 0
585
+ ],
586
+ "size": {
587
+ "0": 315,
588
+ "1": 314
589
+ },
590
+ "flags": {},
591
+ "order": 4,
592
+ "mode": 0,
593
+ "outputs": [
594
+ {
595
+ "name": "IMAGE",
596
+ "type": "IMAGE",
597
+ "links": [
598
+ 46
599
+ ],
600
+ "shape": 3,
601
+ "slot_index": 0
602
+ },
603
+ {
604
+ "name": "MASK",
605
+ "type": "MASK",
606
+ "links": null,
607
+ "shape": 3
608
+ }
609
+ ],
610
+ "properties": {
611
+ "Node name for S&R": "LoadImage"
612
+ },
613
+ "widgets_values": [
614
+ "blonde_8_repair.png",
615
+ "image"
616
+ ]
617
+ },
618
+ {
619
+ "id": 4,
620
+ "type": "CheckpointLoaderSimple",
621
+ "pos": [
622
+ 10,
623
+ 680
624
+ ],
625
+ "size": {
626
+ "0": 315,
627
+ "1": 98
628
+ },
629
+ "flags": {},
630
+ "order": 5,
631
+ "mode": 0,
632
+ "outputs": [
633
+ {
634
+ "name": "MODEL",
635
+ "type": "MODEL",
636
+ "links": [
637
+ 36
638
+ ],
639
+ "slot_index": 0
640
+ },
641
+ {
642
+ "name": "CLIP",
643
+ "type": "CLIP",
644
+ "links": [
645
+ 3,
646
+ 5
647
+ ],
648
+ "slot_index": 1
649
+ },
650
+ {
651
+ "name": "VAE",
652
+ "type": "VAE",
653
+ "links": [
654
+ 8
655
+ ],
656
+ "slot_index": 2
657
+ }
658
+ ],
659
+ "properties": {
660
+ "Node name for S&R": "CheckpointLoaderSimple"
661
+ },
662
+ "widgets_values": [
663
+ "sd15/Realistic_Vision_V5.1_fp16-no-ema.safetensors"
664
+ ]
665
+ },
666
+ {
667
+ "id": 8,
668
+ "type": "VAEDecode",
669
+ "pos": [
670
+ 1640,
671
+ 710
672
+ ],
673
+ "size": {
674
+ "0": 140,
675
+ "1": 46
676
+ },
677
+ "flags": {},
678
+ "order": 16,
679
+ "mode": 0,
680
+ "inputs": [
681
+ {
682
+ "name": "samples",
683
+ "type": "LATENT",
684
+ "link": 7
685
+ },
686
+ {
687
+ "name": "vae",
688
+ "type": "VAE",
689
+ "link": 8
690
+ }
691
+ ],
692
+ "outputs": [
693
+ {
694
+ "name": "IMAGE",
695
+ "type": "IMAGE",
696
+ "links": [
697
+ 55
698
+ ],
699
+ "slot_index": 0
700
+ }
701
+ ],
702
+ "properties": {
703
+ "Node name for S&R": "VAEDecode"
704
+ }
705
+ },
706
+ {
707
+ "id": 18,
708
+ "type": "IPAdapterFaceID",
709
+ "pos": [
710
+ 850,
711
+ 190
712
+ ],
713
+ "size": {
714
+ "0": 315,
715
+ "1": 322
716
+ },
717
+ "flags": {},
718
+ "order": 12,
719
+ "mode": 0,
720
+ "inputs": [
721
+ {
722
+ "name": "model",
723
+ "type": "MODEL",
724
+ "link": 35
725
+ },
726
+ {
727
+ "name": "ipadapter",
728
+ "type": "IPADAPTER",
729
+ "link": 34,
730
+ "slot_index": 1
731
+ },
732
+ {
733
+ "name": "image",
734
+ "type": "IMAGE",
735
+ "link": 50
736
+ },
737
+ {
738
+ "name": "image_negative",
739
+ "type": "IMAGE",
740
+ "link": null
741
+ },
742
+ {
743
+ "name": "attn_mask",
744
+ "type": "MASK",
745
+ "link": null
746
+ },
747
+ {
748
+ "name": "clip_vision",
749
+ "type": "CLIP_VISION",
750
+ "link": null
751
+ },
752
+ {
753
+ "name": "insightface",
754
+ "type": "INSIGHTFACE",
755
+ "link": null
756
+ }
757
+ ],
758
+ "outputs": [
759
+ {
760
+ "name": "MODEL",
761
+ "type": "MODEL",
762
+ "links": [
763
+ 43
764
+ ],
765
+ "shape": 3,
766
+ "slot_index": 0
767
+ },
768
+ {
769
+ "name": "face_image",
770
+ "type": "IMAGE",
771
+ "links": [
772
+ 56
773
+ ],
774
+ "shape": 3,
775
+ "slot_index": 1
776
+ }
777
+ ],
778
+ "properties": {
779
+ "Node name for S&R": "IPAdapterFaceID"
780
+ },
781
+ "widgets_values": [
782
+ 0.8,
783
+ 2,
784
+ "linear",
785
+ "concat",
786
+ 0,
787
+ 1,
788
+ "V only"
789
+ ]
790
+ },
791
+ {
792
+ "id": 33,
793
+ "type": "PreviewImage",
794
+ "pos": [
795
+ 1850,
796
+ 712
797
+ ],
798
+ "size": [
799
+ 366.926812800109,
800
+ 394.0742206376648
801
+ ],
802
+ "flags": {},
803
+ "order": 17,
804
+ "mode": 0,
805
+ "inputs": [
806
+ {
807
+ "name": "images",
808
+ "type": "IMAGE",
809
+ "link": 55
810
+ }
811
+ ],
812
+ "properties": {
813
+ "Node name for S&R": "PreviewImage"
814
+ }
815
+ }
816
+ ],
817
+ "links": [
818
+ [
819
+ 2,
820
+ 5,
821
+ 0,
822
+ 3,
823
+ 3,
824
+ "LATENT"
825
+ ],
826
+ [
827
+ 3,
828
+ 4,
829
+ 1,
830
+ 6,
831
+ 0,
832
+ "CLIP"
833
+ ],
834
+ [
835
+ 4,
836
+ 6,
837
+ 0,
838
+ 3,
839
+ 1,
840
+ "CONDITIONING"
841
+ ],
842
+ [
843
+ 5,
844
+ 4,
845
+ 1,
846
+ 7,
847
+ 0,
848
+ "CLIP"
849
+ ],
850
+ [
851
+ 6,
852
+ 7,
853
+ 0,
854
+ 3,
855
+ 2,
856
+ "CONDITIONING"
857
+ ],
858
+ [
859
+ 7,
860
+ 3,
861
+ 0,
862
+ 8,
863
+ 0,
864
+ "LATENT"
865
+ ],
866
+ [
867
+ 8,
868
+ 4,
869
+ 2,
870
+ 8,
871
+ 1,
872
+ "VAE"
873
+ ],
874
+ [
875
+ 34,
876
+ 20,
877
+ 1,
878
+ 18,
879
+ 1,
880
+ "IPADAPTER"
881
+ ],
882
+ [
883
+ 35,
884
+ 20,
885
+ 0,
886
+ 18,
887
+ 0,
888
+ "MODEL"
889
+ ],
890
+ [
891
+ 36,
892
+ 4,
893
+ 0,
894
+ 20,
895
+ 0,
896
+ "MODEL"
897
+ ],
898
+ [
899
+ 37,
900
+ 22,
901
+ 1,
902
+ 21,
903
+ 1,
904
+ "IPADAPTER"
905
+ ],
906
+ [
907
+ 38,
908
+ 20,
909
+ 1,
910
+ 22,
911
+ 1,
912
+ "IPADAPTER"
913
+ ],
914
+ [
915
+ 40,
916
+ 22,
917
+ 0,
918
+ 21,
919
+ 0,
920
+ "MODEL"
921
+ ],
922
+ [
923
+ 42,
924
+ 21,
925
+ 0,
926
+ 3,
927
+ 0,
928
+ "MODEL"
929
+ ],
930
+ [
931
+ 43,
932
+ 18,
933
+ 0,
934
+ 22,
935
+ 0,
936
+ "MODEL"
937
+ ],
938
+ [
939
+ 44,
940
+ 12,
941
+ 0,
942
+ 27,
943
+ 0,
944
+ "IMAGE"
945
+ ],
946
+ [
947
+ 45,
948
+ 25,
949
+ 0,
950
+ 27,
951
+ 1,
952
+ "IMAGE"
953
+ ],
954
+ [
955
+ 46,
956
+ 24,
957
+ 0,
958
+ 28,
959
+ 0,
960
+ "IMAGE"
961
+ ],
962
+ [
963
+ 47,
964
+ 26,
965
+ 0,
966
+ 28,
967
+ 1,
968
+ "IMAGE"
969
+ ],
970
+ [
971
+ 48,
972
+ 27,
973
+ 0,
974
+ 29,
975
+ 0,
976
+ "IMAGE"
977
+ ],
978
+ [
979
+ 49,
980
+ 28,
981
+ 0,
982
+ 29,
983
+ 1,
984
+ "IMAGE"
985
+ ],
986
+ [
987
+ 50,
988
+ 29,
989
+ 0,
990
+ 18,
991
+ 2,
992
+ "IMAGE"
993
+ ],
994
+ [
995
+ 55,
996
+ 8,
997
+ 0,
998
+ 33,
999
+ 0,
1000
+ "IMAGE"
1001
+ ],
1002
+ [
1003
+ 56,
1004
+ 18,
1005
+ 1,
1006
+ 21,
1007
+ 2,
1008
+ "IMAGE"
1009
+ ]
1010
+ ],
1011
+ "groups": [],
1012
+ "config": {},
1013
+ "extra": {
1014
+ "ds": {
1015
+ "scale": 0.5644739300537773,
1016
+ "offset": [
1017
+ 390.06644263235023,
1018
+ 603.8137061998592
1019
+ ]
1020
+ }
1021
+ },
1022
+ "version": 0.4
1023
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_ideal_faceid_config.json ADDED
@@ -0,0 +1,728 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 23,
3
+ "last_link_id": 44,
4
+ "nodes": [
5
+ {
6
+ "id": 8,
7
+ "type": "VAEDecode",
8
+ "pos": [
9
+ 1640,
10
+ 710
11
+ ],
12
+ "size": {
13
+ "0": 140,
14
+ "1": 46
15
+ },
16
+ "flags": {},
17
+ "order": 10,
18
+ "mode": 0,
19
+ "inputs": [
20
+ {
21
+ "name": "samples",
22
+ "type": "LATENT",
23
+ "link": 7
24
+ },
25
+ {
26
+ "name": "vae",
27
+ "type": "VAE",
28
+ "link": 8
29
+ }
30
+ ],
31
+ "outputs": [
32
+ {
33
+ "name": "IMAGE",
34
+ "type": "IMAGE",
35
+ "links": [
36
+ 9
37
+ ],
38
+ "slot_index": 0
39
+ }
40
+ ],
41
+ "properties": {
42
+ "Node name for S&R": "VAEDecode"
43
+ }
44
+ },
45
+ {
46
+ "id": 5,
47
+ "type": "EmptyLatentImage",
48
+ "pos": [
49
+ 870,
50
+ 1100
51
+ ],
52
+ "size": {
53
+ "0": 315,
54
+ "1": 106
55
+ },
56
+ "flags": {},
57
+ "order": 0,
58
+ "mode": 0,
59
+ "outputs": [
60
+ {
61
+ "name": "LATENT",
62
+ "type": "LATENT",
63
+ "links": [
64
+ 2
65
+ ],
66
+ "slot_index": 0
67
+ }
68
+ ],
69
+ "properties": {
70
+ "Node name for S&R": "EmptyLatentImage"
71
+ },
72
+ "widgets_values": [
73
+ 512,
74
+ 512,
75
+ 1
76
+ ]
77
+ },
78
+ {
79
+ "id": 3,
80
+ "type": "KSampler",
81
+ "pos": [
82
+ 1280,
83
+ 710
84
+ ],
85
+ "size": {
86
+ "0": 315,
87
+ "1": 262
88
+ },
89
+ "flags": {},
90
+ "order": 9,
91
+ "mode": 0,
92
+ "inputs": [
93
+ {
94
+ "name": "model",
95
+ "type": "MODEL",
96
+ "link": 42
97
+ },
98
+ {
99
+ "name": "positive",
100
+ "type": "CONDITIONING",
101
+ "link": 4
102
+ },
103
+ {
104
+ "name": "negative",
105
+ "type": "CONDITIONING",
106
+ "link": 6
107
+ },
108
+ {
109
+ "name": "latent_image",
110
+ "type": "LATENT",
111
+ "link": 2
112
+ }
113
+ ],
114
+ "outputs": [
115
+ {
116
+ "name": "LATENT",
117
+ "type": "LATENT",
118
+ "links": [
119
+ 7
120
+ ],
121
+ "slot_index": 0
122
+ }
123
+ ],
124
+ "properties": {
125
+ "Node name for S&R": "KSampler"
126
+ },
127
+ "widgets_values": [
128
+ 0,
129
+ "fixed",
130
+ 30,
131
+ 6.5,
132
+ "ddpm",
133
+ "karras",
134
+ 1
135
+ ]
136
+ },
137
+ {
138
+ "id": 9,
139
+ "type": "SaveImage",
140
+ "pos": [
141
+ 1830,
142
+ 700
143
+ ],
144
+ "size": {
145
+ "0": 529.7760009765625,
146
+ "1": 582.3048095703125
147
+ },
148
+ "flags": {},
149
+ "order": 11,
150
+ "mode": 0,
151
+ "inputs": [
152
+ {
153
+ "name": "images",
154
+ "type": "IMAGE",
155
+ "link": 9
156
+ }
157
+ ],
158
+ "properties": {},
159
+ "widgets_values": [
160
+ "IPAdapter"
161
+ ]
162
+ },
163
+ {
164
+ "id": 12,
165
+ "type": "LoadImage",
166
+ "pos": [
167
+ 450,
168
+ 240
169
+ ],
170
+ "size": {
171
+ "0": 315,
172
+ "1": 314
173
+ },
174
+ "flags": {},
175
+ "order": 1,
176
+ "mode": 0,
177
+ "outputs": [
178
+ {
179
+ "name": "IMAGE",
180
+ "type": "IMAGE",
181
+ "links": [
182
+ 29
183
+ ],
184
+ "shape": 3,
185
+ "slot_index": 0
186
+ },
187
+ {
188
+ "name": "MASK",
189
+ "type": "MASK",
190
+ "links": null,
191
+ "shape": 3
192
+ }
193
+ ],
194
+ "properties": {
195
+ "Node name for S&R": "LoadImage"
196
+ },
197
+ "widgets_values": [
198
+ "rosario_4.jpg",
199
+ "image"
200
+ ]
201
+ },
202
+ {
203
+ "id": 7,
204
+ "type": "CLIPTextEncode",
205
+ "pos": [
206
+ 760,
207
+ 850
208
+ ],
209
+ "size": {
210
+ "0": 425.27801513671875,
211
+ "1": 180.6060791015625
212
+ },
213
+ "flags": {},
214
+ "order": 5,
215
+ "mode": 0,
216
+ "inputs": [
217
+ {
218
+ "name": "clip",
219
+ "type": "CLIP",
220
+ "link": 5
221
+ }
222
+ ],
223
+ "outputs": [
224
+ {
225
+ "name": "CONDITIONING",
226
+ "type": "CONDITIONING",
227
+ "links": [
228
+ 6
229
+ ],
230
+ "slot_index": 0
231
+ }
232
+ ],
233
+ "properties": {
234
+ "Node name for S&R": "CLIPTextEncode"
235
+ },
236
+ "widgets_values": [
237
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed, naked"
238
+ ]
239
+ },
240
+ {
241
+ "id": 6,
242
+ "type": "CLIPTextEncode",
243
+ "pos": [
244
+ 760,
245
+ 620
246
+ ],
247
+ "size": {
248
+ "0": 422.84503173828125,
249
+ "1": 164.31304931640625
250
+ },
251
+ "flags": {},
252
+ "order": 4,
253
+ "mode": 0,
254
+ "inputs": [
255
+ {
256
+ "name": "clip",
257
+ "type": "CLIP",
258
+ "link": 3
259
+ }
260
+ ],
261
+ "outputs": [
262
+ {
263
+ "name": "CONDITIONING",
264
+ "type": "CONDITIONING",
265
+ "links": [
266
+ 4
267
+ ],
268
+ "slot_index": 0
269
+ }
270
+ ],
271
+ "properties": {
272
+ "Node name for S&R": "CLIPTextEncode"
273
+ },
274
+ "widgets_values": [
275
+ "closeup of a beautiful woman wearing a black dress on the seaside\n\nserene, sunset, spring, high quality, detailed, diffuse light"
276
+ ]
277
+ },
278
+ {
279
+ "id": 4,
280
+ "type": "CheckpointLoaderSimple",
281
+ "pos": [
282
+ 10,
283
+ 680
284
+ ],
285
+ "size": {
286
+ "0": 315,
287
+ "1": 98
288
+ },
289
+ "flags": {},
290
+ "order": 2,
291
+ "mode": 0,
292
+ "outputs": [
293
+ {
294
+ "name": "MODEL",
295
+ "type": "MODEL",
296
+ "links": [
297
+ 36
298
+ ],
299
+ "slot_index": 0
300
+ },
301
+ {
302
+ "name": "CLIP",
303
+ "type": "CLIP",
304
+ "links": [
305
+ 3,
306
+ 5
307
+ ],
308
+ "slot_index": 1
309
+ },
310
+ {
311
+ "name": "VAE",
312
+ "type": "VAE",
313
+ "links": [
314
+ 8
315
+ ],
316
+ "slot_index": 2
317
+ }
318
+ ],
319
+ "properties": {
320
+ "Node name for S&R": "CheckpointLoaderSimple"
321
+ },
322
+ "widgets_values": [
323
+ "sd15/realisticVisionV51_v51VAE.safetensors"
324
+ ]
325
+ },
326
+ {
327
+ "id": 20,
328
+ "type": "IPAdapterUnifiedLoaderFaceID",
329
+ "pos": [
330
+ 460,
331
+ 60
332
+ ],
333
+ "size": {
334
+ "0": 315,
335
+ "1": 126
336
+ },
337
+ "flags": {},
338
+ "order": 3,
339
+ "mode": 0,
340
+ "inputs": [
341
+ {
342
+ "name": "model",
343
+ "type": "MODEL",
344
+ "link": 36
345
+ },
346
+ {
347
+ "name": "ipadapter",
348
+ "type": "IPADAPTER",
349
+ "link": null
350
+ }
351
+ ],
352
+ "outputs": [
353
+ {
354
+ "name": "MODEL",
355
+ "type": "MODEL",
356
+ "links": [
357
+ 35
358
+ ],
359
+ "shape": 3,
360
+ "slot_index": 0
361
+ },
362
+ {
363
+ "name": "ipadapter",
364
+ "type": "IPADAPTER",
365
+ "links": [
366
+ 34,
367
+ 38
368
+ ],
369
+ "shape": 3,
370
+ "slot_index": 1
371
+ }
372
+ ],
373
+ "properties": {
374
+ "Node name for S&R": "IPAdapterUnifiedLoaderFaceID"
375
+ },
376
+ "widgets_values": [
377
+ "FACEID PLUS V2",
378
+ 0.6,
379
+ "CPU"
380
+ ]
381
+ },
382
+ {
383
+ "id": 22,
384
+ "type": "IPAdapterUnifiedLoader",
385
+ "pos": [
386
+ 855,
387
+ 51
388
+ ],
389
+ "size": {
390
+ "0": 315,
391
+ "1": 78
392
+ },
393
+ "flags": {},
394
+ "order": 7,
395
+ "mode": 0,
396
+ "inputs": [
397
+ {
398
+ "name": "model",
399
+ "type": "MODEL",
400
+ "link": 43
401
+ },
402
+ {
403
+ "name": "ipadapter",
404
+ "type": "IPADAPTER",
405
+ "link": 38
406
+ }
407
+ ],
408
+ "outputs": [
409
+ {
410
+ "name": "model",
411
+ "type": "MODEL",
412
+ "links": [
413
+ 40
414
+ ],
415
+ "shape": 3,
416
+ "slot_index": 0
417
+ },
418
+ {
419
+ "name": "ipadapter",
420
+ "type": "IPADAPTER",
421
+ "links": [
422
+ 37
423
+ ],
424
+ "shape": 3
425
+ }
426
+ ],
427
+ "properties": {
428
+ "Node name for S&R": "IPAdapterUnifiedLoader"
429
+ },
430
+ "widgets_values": [
431
+ "FULL FACE - SD1.5 only (portraits stronger)"
432
+ ]
433
+ },
434
+ {
435
+ "id": 21,
436
+ "type": "IPAdapter",
437
+ "pos": [
438
+ 1280,
439
+ 170
440
+ ],
441
+ "size": {
442
+ "0": 315,
443
+ "1": 190
444
+ },
445
+ "flags": {},
446
+ "order": 8,
447
+ "mode": 0,
448
+ "inputs": [
449
+ {
450
+ "name": "model",
451
+ "type": "MODEL",
452
+ "link": 40
453
+ },
454
+ {
455
+ "name": "ipadapter",
456
+ "type": "IPADAPTER",
457
+ "link": 37,
458
+ "slot_index": 1
459
+ },
460
+ {
461
+ "name": "image",
462
+ "type": "IMAGE",
463
+ "link": 44
464
+ },
465
+ {
466
+ "name": "attn_mask",
467
+ "type": "MASK",
468
+ "link": null
469
+ }
470
+ ],
471
+ "outputs": [
472
+ {
473
+ "name": "MODEL",
474
+ "type": "MODEL",
475
+ "links": [
476
+ 42
477
+ ],
478
+ "shape": 3,
479
+ "slot_index": 0
480
+ }
481
+ ],
482
+ "properties": {
483
+ "Node name for S&R": "IPAdapter"
484
+ },
485
+ "widgets_values": [
486
+ 0.4,
487
+ 0,
488
+ 1,
489
+ "standard"
490
+ ]
491
+ },
492
+ {
493
+ "id": 18,
494
+ "type": "IPAdapterFaceID",
495
+ "pos": [
496
+ 850,
497
+ 190
498
+ ],
499
+ "size": {
500
+ "0": 315,
501
+ "1": 322
502
+ },
503
+ "flags": {},
504
+ "order": 6,
505
+ "mode": 0,
506
+ "inputs": [
507
+ {
508
+ "name": "model",
509
+ "type": "MODEL",
510
+ "link": 35
511
+ },
512
+ {
513
+ "name": "ipadapter",
514
+ "type": "IPADAPTER",
515
+ "link": 34,
516
+ "slot_index": 1
517
+ },
518
+ {
519
+ "name": "image",
520
+ "type": "IMAGE",
521
+ "link": 29
522
+ },
523
+ {
524
+ "name": "image_negative",
525
+ "type": "IMAGE",
526
+ "link": null
527
+ },
528
+ {
529
+ "name": "attn_mask",
530
+ "type": "MASK",
531
+ "link": null
532
+ },
533
+ {
534
+ "name": "clip_vision",
535
+ "type": "CLIP_VISION",
536
+ "link": null
537
+ },
538
+ {
539
+ "name": "insightface",
540
+ "type": "INSIGHTFACE",
541
+ "link": null
542
+ }
543
+ ],
544
+ "outputs": [
545
+ {
546
+ "name": "MODEL",
547
+ "type": "MODEL",
548
+ "links": [
549
+ 43
550
+ ],
551
+ "shape": 3,
552
+ "slot_index": 0
553
+ },
554
+ {
555
+ "name": "face_image",
556
+ "type": "IMAGE",
557
+ "links": [
558
+ 44
559
+ ],
560
+ "shape": 3,
561
+ "slot_index": 1
562
+ }
563
+ ],
564
+ "properties": {
565
+ "Node name for S&R": "IPAdapterFaceID"
566
+ },
567
+ "widgets_values": [
568
+ 0.8,
569
+ 2,
570
+ "linear",
571
+ "concat",
572
+ 0,
573
+ 1,
574
+ "V only"
575
+ ]
576
+ }
577
+ ],
578
+ "links": [
579
+ [
580
+ 2,
581
+ 5,
582
+ 0,
583
+ 3,
584
+ 3,
585
+ "LATENT"
586
+ ],
587
+ [
588
+ 3,
589
+ 4,
590
+ 1,
591
+ 6,
592
+ 0,
593
+ "CLIP"
594
+ ],
595
+ [
596
+ 4,
597
+ 6,
598
+ 0,
599
+ 3,
600
+ 1,
601
+ "CONDITIONING"
602
+ ],
603
+ [
604
+ 5,
605
+ 4,
606
+ 1,
607
+ 7,
608
+ 0,
609
+ "CLIP"
610
+ ],
611
+ [
612
+ 6,
613
+ 7,
614
+ 0,
615
+ 3,
616
+ 2,
617
+ "CONDITIONING"
618
+ ],
619
+ [
620
+ 7,
621
+ 3,
622
+ 0,
623
+ 8,
624
+ 0,
625
+ "LATENT"
626
+ ],
627
+ [
628
+ 8,
629
+ 4,
630
+ 2,
631
+ 8,
632
+ 1,
633
+ "VAE"
634
+ ],
635
+ [
636
+ 9,
637
+ 8,
638
+ 0,
639
+ 9,
640
+ 0,
641
+ "IMAGE"
642
+ ],
643
+ [
644
+ 29,
645
+ 12,
646
+ 0,
647
+ 18,
648
+ 2,
649
+ "IMAGE"
650
+ ],
651
+ [
652
+ 34,
653
+ 20,
654
+ 1,
655
+ 18,
656
+ 1,
657
+ "IPADAPTER"
658
+ ],
659
+ [
660
+ 35,
661
+ 20,
662
+ 0,
663
+ 18,
664
+ 0,
665
+ "MODEL"
666
+ ],
667
+ [
668
+ 36,
669
+ 4,
670
+ 0,
671
+ 20,
672
+ 0,
673
+ "MODEL"
674
+ ],
675
+ [
676
+ 37,
677
+ 22,
678
+ 1,
679
+ 21,
680
+ 1,
681
+ "IPADAPTER"
682
+ ],
683
+ [
684
+ 38,
685
+ 20,
686
+ 1,
687
+ 22,
688
+ 1,
689
+ "IPADAPTER"
690
+ ],
691
+ [
692
+ 40,
693
+ 22,
694
+ 0,
695
+ 21,
696
+ 0,
697
+ "MODEL"
698
+ ],
699
+ [
700
+ 42,
701
+ 21,
702
+ 0,
703
+ 3,
704
+ 0,
705
+ "MODEL"
706
+ ],
707
+ [
708
+ 43,
709
+ 18,
710
+ 0,
711
+ 22,
712
+ 0,
713
+ "MODEL"
714
+ ],
715
+ [
716
+ 44,
717
+ 18,
718
+ 1,
719
+ 21,
720
+ 2,
721
+ "IMAGE"
722
+ ]
723
+ ],
724
+ "groups": [],
725
+ "config": {},
726
+ "extra": {},
727
+ "version": 0.4
728
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_kolors.json ADDED
@@ -0,0 +1,680 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 88,
3
+ "last_link_id": 132,
4
+ "nodes": [
5
+ {
6
+ "id": 9,
7
+ "type": "EmptyLatentImage",
8
+ "pos": [
9
+ 1710,
10
+ 620
11
+ ],
12
+ "size": {
13
+ "0": 368.5347900390625,
14
+ "1": 106
15
+ },
16
+ "flags": {},
17
+ "order": 0,
18
+ "mode": 0,
19
+ "outputs": [
20
+ {
21
+ "name": "LATENT",
22
+ "type": "LATENT",
23
+ "links": [
24
+ 108
25
+ ],
26
+ "shape": 3,
27
+ "label": "Latent"
28
+ }
29
+ ],
30
+ "properties": {
31
+ "Node name for S&R": "EmptyLatentImage"
32
+ },
33
+ "widgets_values": [
34
+ 968,
35
+ 1152,
36
+ 1
37
+ ]
38
+ },
39
+ {
40
+ "id": 80,
41
+ "type": "VAEDecode",
42
+ "pos": [
43
+ 2690,
44
+ 110
45
+ ],
46
+ "size": {
47
+ "0": 210,
48
+ "1": 46
49
+ },
50
+ "flags": {},
51
+ "order": 11,
52
+ "mode": 0,
53
+ "inputs": [
54
+ {
55
+ "name": "samples",
56
+ "type": "LATENT",
57
+ "link": 110
58
+ },
59
+ {
60
+ "name": "vae",
61
+ "type": "VAE",
62
+ "link": 111
63
+ }
64
+ ],
65
+ "outputs": [
66
+ {
67
+ "name": "IMAGE",
68
+ "type": "IMAGE",
69
+ "links": [
70
+ 113
71
+ ],
72
+ "shape": 3,
73
+ "slot_index": 0
74
+ }
75
+ ],
76
+ "properties": {
77
+ "Node name for S&R": "VAEDecode"
78
+ }
79
+ },
80
+ {
81
+ "id": 81,
82
+ "type": "PreviewImage",
83
+ "pos": [
84
+ 2700,
85
+ 210
86
+ ],
87
+ "size": {
88
+ "0": 1085.9268798828125,
89
+ "1": 1301.6563720703125
90
+ },
91
+ "flags": {},
92
+ "order": 12,
93
+ "mode": 0,
94
+ "inputs": [
95
+ {
96
+ "name": "images",
97
+ "type": "IMAGE",
98
+ "link": 113
99
+ }
100
+ ],
101
+ "properties": {
102
+ "Node name for S&R": "PreviewImage"
103
+ }
104
+ },
105
+ {
106
+ "id": 59,
107
+ "type": "MZ_KolorsUNETLoader",
108
+ "pos": [
109
+ 1140,
110
+ 300
111
+ ],
112
+ "size": {
113
+ "0": 310.1650695800781,
114
+ "1": 78
115
+ },
116
+ "flags": {},
117
+ "order": 1,
118
+ "mode": 0,
119
+ "outputs": [
120
+ {
121
+ "name": "model",
122
+ "type": "MODEL",
123
+ "links": [
124
+ 132
125
+ ],
126
+ "shape": 3,
127
+ "label": "model",
128
+ "slot_index": 0
129
+ },
130
+ {
131
+ "name": "hid_proj",
132
+ "type": "TorchLinear",
133
+ "links": [
134
+ 79,
135
+ 87
136
+ ],
137
+ "shape": 3,
138
+ "label": "hid_proj",
139
+ "slot_index": 1
140
+ }
141
+ ],
142
+ "properties": {
143
+ "Node name for S&R": "MZ_KolorsUNETLoader"
144
+ },
145
+ "widgets_values": [
146
+ "diffusion_pytorch_model.fp16.safetensors"
147
+ ]
148
+ },
149
+ {
150
+ "id": 75,
151
+ "type": "IPAdapterAdvanced",
152
+ "pos": [
153
+ 1919,
154
+ -273
155
+ ],
156
+ "size": {
157
+ "0": 291.9587097167969,
158
+ "1": 278
159
+ },
160
+ "flags": {},
161
+ "order": 7,
162
+ "mode": 0,
163
+ "inputs": [
164
+ {
165
+ "name": "model",
166
+ "type": "MODEL",
167
+ "link": 132,
168
+ "slot_index": 0
169
+ },
170
+ {
171
+ "name": "ipadapter",
172
+ "type": "IPADAPTER",
173
+ "link": 130,
174
+ "slot_index": 1
175
+ },
176
+ {
177
+ "name": "image",
178
+ "type": "IMAGE",
179
+ "link": 102,
180
+ "slot_index": 2
181
+ },
182
+ {
183
+ "name": "image_negative",
184
+ "type": "IMAGE",
185
+ "link": null
186
+ },
187
+ {
188
+ "name": "attn_mask",
189
+ "type": "MASK",
190
+ "link": null
191
+ },
192
+ {
193
+ "name": "clip_vision",
194
+ "type": "CLIP_VISION",
195
+ "link": 131,
196
+ "slot_index": 5
197
+ }
198
+ ],
199
+ "outputs": [
200
+ {
201
+ "name": "MODEL",
202
+ "type": "MODEL",
203
+ "links": [
204
+ 105
205
+ ],
206
+ "shape": 3,
207
+ "slot_index": 0
208
+ }
209
+ ],
210
+ "properties": {
211
+ "Node name for S&R": "IPAdapterAdvanced"
212
+ },
213
+ "widgets_values": [
214
+ 1,
215
+ "style transfer precise",
216
+ "concat",
217
+ 0,
218
+ 1,
219
+ "V only"
220
+ ]
221
+ },
222
+ {
223
+ "id": 76,
224
+ "type": "IPAdapterModelLoader",
225
+ "pos": [
226
+ 1541,
227
+ -383
228
+ ],
229
+ "size": {
230
+ "0": 315,
231
+ "1": 58
232
+ },
233
+ "flags": {},
234
+ "order": 2,
235
+ "mode": 0,
236
+ "outputs": [
237
+ {
238
+ "name": "IPADAPTER",
239
+ "type": "IPADAPTER",
240
+ "links": [
241
+ 130
242
+ ],
243
+ "shape": 3,
244
+ "slot_index": 0
245
+ }
246
+ ],
247
+ "properties": {
248
+ "Node name for S&R": "IPAdapterModelLoader"
249
+ },
250
+ "widgets_values": [
251
+ "Kolors-IP-Adapter-Plus.bin"
252
+ ]
253
+ },
254
+ {
255
+ "id": 78,
256
+ "type": "CLIPVisionLoader",
257
+ "pos": [
258
+ 1511,
259
+ -127
260
+ ],
261
+ "size": {
262
+ "0": 315,
263
+ "1": 58
264
+ },
265
+ "flags": {},
266
+ "order": 3,
267
+ "mode": 0,
268
+ "outputs": [
269
+ {
270
+ "name": "CLIP_VISION",
271
+ "type": "CLIP_VISION",
272
+ "links": [
273
+ 131
274
+ ],
275
+ "shape": 3,
276
+ "slot_index": 0
277
+ }
278
+ ],
279
+ "properties": {
280
+ "Node name for S&R": "CLIPVisionLoader"
281
+ },
282
+ "widgets_values": [
283
+ "clip-vit-large-patch14-336.bin"
284
+ ]
285
+ },
286
+ {
287
+ "id": 77,
288
+ "type": "LoadImage",
289
+ "pos": [
290
+ 1137,
291
+ -329
292
+ ],
293
+ "size": {
294
+ "0": 237.2888641357422,
295
+ "1": 323.4468994140625
296
+ },
297
+ "flags": {},
298
+ "order": 4,
299
+ "mode": 0,
300
+ "outputs": [
301
+ {
302
+ "name": "IMAGE",
303
+ "type": "IMAGE",
304
+ "links": [
305
+ 102
306
+ ],
307
+ "shape": 3
308
+ },
309
+ {
310
+ "name": "MASK",
311
+ "type": "MASK",
312
+ "links": null,
313
+ "shape": 3
314
+ }
315
+ ],
316
+ "properties": {
317
+ "Node name for S&R": "LoadImage"
318
+ },
319
+ "widgets_values": [
320
+ "cga_pixels.png",
321
+ "image"
322
+ ]
323
+ },
324
+ {
325
+ "id": 70,
326
+ "type": "VAELoader",
327
+ "pos": [
328
+ 1130,
329
+ 450
330
+ ],
331
+ "size": {
332
+ "0": 315,
333
+ "1": 58
334
+ },
335
+ "flags": {},
336
+ "order": 5,
337
+ "mode": 0,
338
+ "outputs": [
339
+ {
340
+ "name": "VAE",
341
+ "type": "VAE",
342
+ "links": [
343
+ 111
344
+ ],
345
+ "shape": 3,
346
+ "slot_index": 0
347
+ }
348
+ ],
349
+ "properties": {
350
+ "Node name for S&R": "VAELoader"
351
+ },
352
+ "widgets_values": [
353
+ "sdxl_vae.safetensors"
354
+ ]
355
+ },
356
+ {
357
+ "id": 79,
358
+ "type": "KSampler",
359
+ "pos": [
360
+ 2320,
361
+ 110
362
+ ],
363
+ "size": {
364
+ "0": 315,
365
+ "1": 262
366
+ },
367
+ "flags": {},
368
+ "order": 10,
369
+ "mode": 0,
370
+ "inputs": [
371
+ {
372
+ "name": "model",
373
+ "type": "MODEL",
374
+ "link": 105
375
+ },
376
+ {
377
+ "name": "positive",
378
+ "type": "CONDITIONING",
379
+ "link": 107
380
+ },
381
+ {
382
+ "name": "negative",
383
+ "type": "CONDITIONING",
384
+ "link": 106
385
+ },
386
+ {
387
+ "name": "latent_image",
388
+ "type": "LATENT",
389
+ "link": 108
390
+ }
391
+ ],
392
+ "outputs": [
393
+ {
394
+ "name": "LATENT",
395
+ "type": "LATENT",
396
+ "links": [
397
+ 110
398
+ ],
399
+ "shape": 3,
400
+ "slot_index": 0
401
+ }
402
+ ],
403
+ "properties": {
404
+ "Node name for S&R": "KSampler"
405
+ },
406
+ "widgets_values": [
407
+ 13,
408
+ "fixed",
409
+ 30,
410
+ 6.5,
411
+ "dpmpp_2m_sde_gpu",
412
+ "karras",
413
+ 1
414
+ ]
415
+ },
416
+ {
417
+ "id": 67,
418
+ "type": "MZ_ChatGLM3",
419
+ "pos": [
420
+ 1680,
421
+ 80
422
+ ],
423
+ "size": {
424
+ "0": 400,
425
+ "1": 200
426
+ },
427
+ "flags": {},
428
+ "order": 9,
429
+ "mode": 0,
430
+ "inputs": [
431
+ {
432
+ "name": "chatglm3_model",
433
+ "type": "CHATGLM3MODEL",
434
+ "link": 86,
435
+ "label": "chatglm3_model",
436
+ "slot_index": 0
437
+ },
438
+ {
439
+ "name": "hid_proj",
440
+ "type": "TorchLinear",
441
+ "link": 87,
442
+ "label": "hid_proj"
443
+ }
444
+ ],
445
+ "outputs": [
446
+ {
447
+ "name": "CONDITIONING",
448
+ "type": "CONDITIONING",
449
+ "links": [
450
+ 107
451
+ ],
452
+ "shape": 3,
453
+ "label": "CONDITIONING",
454
+ "slot_index": 0
455
+ }
456
+ ],
457
+ "properties": {
458
+ "Node name for S&R": "MZ_ChatGLM3"
459
+ },
460
+ "widgets_values": [
461
+ "a fierce red hair warrior woman wearing a white and gold armor with purple decorations. Highly detailed digital illustration, high quality, detailed, intricate"
462
+ ]
463
+ },
464
+ {
465
+ "id": 66,
466
+ "type": "MZ_ChatGLM3Loader",
467
+ "pos": [
468
+ 1140,
469
+ 180
470
+ ],
471
+ "size": {
472
+ "0": 315,
473
+ "1": 58
474
+ },
475
+ "flags": {},
476
+ "order": 6,
477
+ "mode": 0,
478
+ "outputs": [
479
+ {
480
+ "name": "chatglm3_model",
481
+ "type": "CHATGLM3MODEL",
482
+ "links": [
483
+ 84,
484
+ 86
485
+ ],
486
+ "shape": 3,
487
+ "label": "chatglm3_model"
488
+ }
489
+ ],
490
+ "properties": {
491
+ "Node name for S&R": "MZ_ChatGLM3Loader"
492
+ },
493
+ "widgets_values": [
494
+ "chatglm3-8bit.safetensors"
495
+ ]
496
+ },
497
+ {
498
+ "id": 62,
499
+ "type": "MZ_ChatGLM3",
500
+ "pos": [
501
+ 1680,
502
+ 340
503
+ ],
504
+ "size": {
505
+ "0": 400,
506
+ "1": 200
507
+ },
508
+ "flags": {},
509
+ "order": 8,
510
+ "mode": 0,
511
+ "inputs": [
512
+ {
513
+ "name": "chatglm3_model",
514
+ "type": "CHATGLM3MODEL",
515
+ "link": 84,
516
+ "label": "chatglm3_model",
517
+ "slot_index": 0
518
+ },
519
+ {
520
+ "name": "hid_proj",
521
+ "type": "TorchLinear",
522
+ "link": 79,
523
+ "label": "hid_proj"
524
+ }
525
+ ],
526
+ "outputs": [
527
+ {
528
+ "name": "CONDITIONING",
529
+ "type": "CONDITIONING",
530
+ "links": [
531
+ 106
532
+ ],
533
+ "shape": 3,
534
+ "label": "CONDITIONING",
535
+ "slot_index": 0
536
+ }
537
+ ],
538
+ "properties": {
539
+ "Node name for S&R": "MZ_ChatGLM3"
540
+ },
541
+ "widgets_values": [
542
+ ""
543
+ ]
544
+ }
545
+ ],
546
+ "links": [
547
+ [
548
+ 79,
549
+ 59,
550
+ 1,
551
+ 62,
552
+ 1,
553
+ "TorchLinear"
554
+ ],
555
+ [
556
+ 84,
557
+ 66,
558
+ 0,
559
+ 62,
560
+ 0,
561
+ "CHATGLM3MODEL"
562
+ ],
563
+ [
564
+ 86,
565
+ 66,
566
+ 0,
567
+ 67,
568
+ 0,
569
+ "CHATGLM3MODEL"
570
+ ],
571
+ [
572
+ 87,
573
+ 59,
574
+ 1,
575
+ 67,
576
+ 1,
577
+ "TorchLinear"
578
+ ],
579
+ [
580
+ 102,
581
+ 77,
582
+ 0,
583
+ 75,
584
+ 2,
585
+ "IMAGE"
586
+ ],
587
+ [
588
+ 105,
589
+ 75,
590
+ 0,
591
+ 79,
592
+ 0,
593
+ "MODEL"
594
+ ],
595
+ [
596
+ 106,
597
+ 62,
598
+ 0,
599
+ 79,
600
+ 2,
601
+ "CONDITIONING"
602
+ ],
603
+ [
604
+ 107,
605
+ 67,
606
+ 0,
607
+ 79,
608
+ 1,
609
+ "CONDITIONING"
610
+ ],
611
+ [
612
+ 108,
613
+ 9,
614
+ 0,
615
+ 79,
616
+ 3,
617
+ "LATENT"
618
+ ],
619
+ [
620
+ 110,
621
+ 79,
622
+ 0,
623
+ 80,
624
+ 0,
625
+ "LATENT"
626
+ ],
627
+ [
628
+ 111,
629
+ 70,
630
+ 0,
631
+ 80,
632
+ 1,
633
+ "VAE"
634
+ ],
635
+ [
636
+ 113,
637
+ 80,
638
+ 0,
639
+ 81,
640
+ 0,
641
+ "IMAGE"
642
+ ],
643
+ [
644
+ 130,
645
+ 76,
646
+ 0,
647
+ 75,
648
+ 1,
649
+ "IPADAPTER"
650
+ ],
651
+ [
652
+ 131,
653
+ 78,
654
+ 0,
655
+ 75,
656
+ 5,
657
+ "CLIP_VISION"
658
+ ],
659
+ [
660
+ 132,
661
+ 59,
662
+ 0,
663
+ 75,
664
+ 0,
665
+ "MODEL"
666
+ ]
667
+ ],
668
+ "groups": [],
669
+ "config": {},
670
+ "extra": {
671
+ "ds": {
672
+ "scale": 0.620921323059155,
673
+ "offset": [
674
+ -781.0947110324239,
675
+ 731.4168331979325
676
+ ]
677
+ }
678
+ },
679
+ "version": 0.4
680
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_negative_image.json ADDED
@@ -0,0 +1,956 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 24,
3
+ "last_link_id": 49,
4
+ "nodes": [
5
+ {
6
+ "id": 4,
7
+ "type": "CheckpointLoaderSimple",
8
+ "pos": [
9
+ 50,
10
+ 730
11
+ ],
12
+ "size": {
13
+ "0": 315,
14
+ "1": 98
15
+ },
16
+ "flags": {},
17
+ "order": 0,
18
+ "mode": 0,
19
+ "outputs": [
20
+ {
21
+ "name": "MODEL",
22
+ "type": "MODEL",
23
+ "links": [
24
+ 20,
25
+ 44
26
+ ],
27
+ "slot_index": 0
28
+ },
29
+ {
30
+ "name": "CLIP",
31
+ "type": "CLIP",
32
+ "links": [
33
+ 3,
34
+ 5
35
+ ],
36
+ "slot_index": 1
37
+ },
38
+ {
39
+ "name": "VAE",
40
+ "type": "VAE",
41
+ "links": [
42
+ 8,
43
+ 42
44
+ ],
45
+ "slot_index": 2
46
+ }
47
+ ],
48
+ "properties": {
49
+ "Node name for S&R": "CheckpointLoaderSimple"
50
+ },
51
+ "widgets_values": [
52
+ "sd15/realisticVisionV51_v51VAE.safetensors"
53
+ ]
54
+ },
55
+ {
56
+ "id": 9,
57
+ "type": "SaveImage",
58
+ "pos": [
59
+ 1770,
60
+ 710
61
+ ],
62
+ "size": {
63
+ "0": 529.7760009765625,
64
+ "1": 582.3048095703125
65
+ },
66
+ "flags": {},
67
+ "order": 15,
68
+ "mode": 0,
69
+ "inputs": [
70
+ {
71
+ "name": "images",
72
+ "type": "IMAGE",
73
+ "link": 9
74
+ }
75
+ ],
76
+ "properties": {},
77
+ "widgets_values": [
78
+ "IPAdapter"
79
+ ]
80
+ },
81
+ {
82
+ "id": 7,
83
+ "type": "CLIPTextEncode",
84
+ "pos": [
85
+ 690,
86
+ 840
87
+ ],
88
+ "size": {
89
+ "0": 425.27801513671875,
90
+ "1": 180.6060791015625
91
+ },
92
+ "flags": {},
93
+ "order": 7,
94
+ "mode": 0,
95
+ "inputs": [
96
+ {
97
+ "name": "clip",
98
+ "type": "CLIP",
99
+ "link": 5
100
+ }
101
+ ],
102
+ "outputs": [
103
+ {
104
+ "name": "CONDITIONING",
105
+ "type": "CONDITIONING",
106
+ "links": [
107
+ 6,
108
+ 39
109
+ ],
110
+ "slot_index": 0
111
+ }
112
+ ],
113
+ "properties": {
114
+ "Node name for S&R": "CLIPTextEncode"
115
+ },
116
+ "widgets_values": [
117
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed"
118
+ ]
119
+ },
120
+ {
121
+ "id": 5,
122
+ "type": "EmptyLatentImage",
123
+ "pos": [
124
+ 801,
125
+ 1097
126
+ ],
127
+ "size": {
128
+ "0": 315,
129
+ "1": 106
130
+ },
131
+ "flags": {},
132
+ "order": 1,
133
+ "mode": 0,
134
+ "outputs": [
135
+ {
136
+ "name": "LATENT",
137
+ "type": "LATENT",
138
+ "links": [
139
+ 2,
140
+ 40
141
+ ],
142
+ "slot_index": 0
143
+ }
144
+ ],
145
+ "properties": {
146
+ "Node name for S&R": "EmptyLatentImage"
147
+ },
148
+ "widgets_values": [
149
+ 512,
150
+ 512,
151
+ 1
152
+ ]
153
+ },
154
+ {
155
+ "id": 16,
156
+ "type": "CLIPVisionLoader",
157
+ "pos": [
158
+ 308,
159
+ 161
160
+ ],
161
+ "size": {
162
+ "0": 315,
163
+ "1": 58
164
+ },
165
+ "flags": {},
166
+ "order": 2,
167
+ "mode": 0,
168
+ "outputs": [
169
+ {
170
+ "name": "CLIP_VISION",
171
+ "type": "CLIP_VISION",
172
+ "links": [
173
+ 24,
174
+ 48
175
+ ],
176
+ "shape": 3
177
+ }
178
+ ],
179
+ "properties": {
180
+ "Node name for S&R": "CLIPVisionLoader"
181
+ },
182
+ "widgets_values": [
183
+ "IPAdapter_image_encoder_sd15.safetensors"
184
+ ]
185
+ },
186
+ {
187
+ "id": 15,
188
+ "type": "IPAdapterModelLoader",
189
+ "pos": [
190
+ 308,
191
+ 52
192
+ ],
193
+ "size": {
194
+ "0": 315,
195
+ "1": 58
196
+ },
197
+ "flags": {},
198
+ "order": 3,
199
+ "mode": 0,
200
+ "outputs": [
201
+ {
202
+ "name": "IPADAPTER",
203
+ "type": "IPADAPTER",
204
+ "links": [
205
+ 33,
206
+ 45
207
+ ],
208
+ "shape": 3
209
+ }
210
+ ],
211
+ "properties": {
212
+ "Node name for S&R": "IPAdapterModelLoader"
213
+ },
214
+ "widgets_values": [
215
+ "ip-adapter-plus_sd15.safetensors"
216
+ ]
217
+ },
218
+ {
219
+ "id": 3,
220
+ "type": "KSampler",
221
+ "pos": [
222
+ 1210,
223
+ 700
224
+ ],
225
+ "size": {
226
+ "0": 315,
227
+ "1": 262
228
+ },
229
+ "flags": {},
230
+ "order": 11,
231
+ "mode": 0,
232
+ "inputs": [
233
+ {
234
+ "name": "model",
235
+ "type": "MODEL",
236
+ "link": 23
237
+ },
238
+ {
239
+ "name": "positive",
240
+ "type": "CONDITIONING",
241
+ "link": 4
242
+ },
243
+ {
244
+ "name": "negative",
245
+ "type": "CONDITIONING",
246
+ "link": 6
247
+ },
248
+ {
249
+ "name": "latent_image",
250
+ "type": "LATENT",
251
+ "link": 2
252
+ }
253
+ ],
254
+ "outputs": [
255
+ {
256
+ "name": "LATENT",
257
+ "type": "LATENT",
258
+ "links": [
259
+ 7
260
+ ],
261
+ "slot_index": 0
262
+ }
263
+ ],
264
+ "properties": {
265
+ "Node name for S&R": "KSampler"
266
+ },
267
+ "widgets_values": [
268
+ 0,
269
+ "fixed",
270
+ 30,
271
+ 6.5,
272
+ "dpmpp_2m_sde_gpu",
273
+ "exponential",
274
+ 1
275
+ ]
276
+ },
277
+ {
278
+ "id": 8,
279
+ "type": "VAEDecode",
280
+ "pos": [
281
+ 1575,
282
+ 705
283
+ ],
284
+ "size": {
285
+ "0": 140,
286
+ "1": 46
287
+ },
288
+ "flags": {},
289
+ "order": 13,
290
+ "mode": 0,
291
+ "inputs": [
292
+ {
293
+ "name": "samples",
294
+ "type": "LATENT",
295
+ "link": 7
296
+ },
297
+ {
298
+ "name": "vae",
299
+ "type": "VAE",
300
+ "link": 8
301
+ }
302
+ ],
303
+ "outputs": [
304
+ {
305
+ "name": "IMAGE",
306
+ "type": "IMAGE",
307
+ "links": [
308
+ 9
309
+ ],
310
+ "slot_index": 0
311
+ }
312
+ ],
313
+ "properties": {
314
+ "Node name for S&R": "VAEDecode"
315
+ }
316
+ },
317
+ {
318
+ "id": 6,
319
+ "type": "CLIPTextEncode",
320
+ "pos": [
321
+ 690,
322
+ 610
323
+ ],
324
+ "size": {
325
+ "0": 422.84503173828125,
326
+ "1": 164.31304931640625
327
+ },
328
+ "flags": {},
329
+ "order": 6,
330
+ "mode": 0,
331
+ "inputs": [
332
+ {
333
+ "name": "clip",
334
+ "type": "CLIP",
335
+ "link": 3
336
+ }
337
+ ],
338
+ "outputs": [
339
+ {
340
+ "name": "CONDITIONING",
341
+ "type": "CONDITIONING",
342
+ "links": [
343
+ 4,
344
+ 38
345
+ ],
346
+ "slot_index": 0
347
+ }
348
+ ],
349
+ "properties": {
350
+ "Node name for S&R": "CLIPTextEncode"
351
+ },
352
+ "widgets_values": [
353
+ "a castle on a cliff\n\nhigh quality, detailed, diffuse light"
354
+ ]
355
+ },
356
+ {
357
+ "id": 24,
358
+ "type": "IPAdapterAdvanced",
359
+ "pos": [
360
+ 1800,
361
+ 330
362
+ ],
363
+ "size": {
364
+ "0": 315,
365
+ "1": 254
366
+ },
367
+ "flags": {},
368
+ "order": 10,
369
+ "mode": 0,
370
+ "inputs": [
371
+ {
372
+ "name": "model",
373
+ "type": "MODEL",
374
+ "link": 44
375
+ },
376
+ {
377
+ "name": "ipadapter",
378
+ "type": "IPADAPTER",
379
+ "link": 45,
380
+ "slot_index": 1
381
+ },
382
+ {
383
+ "name": "image",
384
+ "type": "IMAGE",
385
+ "link": 46
386
+ },
387
+ {
388
+ "name": "image_negative",
389
+ "type": "IMAGE",
390
+ "link": 49
391
+ },
392
+ {
393
+ "name": "attn_mask",
394
+ "type": "MASK",
395
+ "link": null
396
+ },
397
+ {
398
+ "name": "clip_vision",
399
+ "type": "CLIP_VISION",
400
+ "link": 48,
401
+ "slot_index": 5
402
+ }
403
+ ],
404
+ "outputs": [
405
+ {
406
+ "name": "MODEL",
407
+ "type": "MODEL",
408
+ "links": [
409
+ 37
410
+ ],
411
+ "shape": 3,
412
+ "slot_index": 0
413
+ }
414
+ ],
415
+ "properties": {
416
+ "Node name for S&R": "IPAdapterAdvanced"
417
+ },
418
+ "widgets_values": [
419
+ 0.7000000000000001,
420
+ "linear",
421
+ "concat",
422
+ 0,
423
+ 1
424
+ ]
425
+ },
426
+ {
427
+ "id": 20,
428
+ "type": "PrepImageForClipVision",
429
+ "pos": [
430
+ 775,
431
+ 347
432
+ ],
433
+ "size": [
434
+ 210,
435
+ 106
436
+ ],
437
+ "flags": {},
438
+ "order": 8,
439
+ "mode": 0,
440
+ "inputs": [
441
+ {
442
+ "name": "image",
443
+ "type": "IMAGE",
444
+ "link": 35
445
+ }
446
+ ],
447
+ "outputs": [
448
+ {
449
+ "name": "IMAGE",
450
+ "type": "IMAGE",
451
+ "links": [
452
+ 36,
453
+ 46
454
+ ],
455
+ "shape": 3,
456
+ "slot_index": 0
457
+ }
458
+ ],
459
+ "properties": {
460
+ "Node name for S&R": "PrepImageForClipVision"
461
+ },
462
+ "widgets_values": [
463
+ "LANCZOS",
464
+ "top",
465
+ 0
466
+ ]
467
+ },
468
+ {
469
+ "id": 21,
470
+ "type": "KSampler",
471
+ "pos": [
472
+ 2190,
473
+ 330
474
+ ],
475
+ "size": {
476
+ "0": 315,
477
+ "1": 262
478
+ },
479
+ "flags": {},
480
+ "order": 12,
481
+ "mode": 0,
482
+ "inputs": [
483
+ {
484
+ "name": "model",
485
+ "type": "MODEL",
486
+ "link": 37
487
+ },
488
+ {
489
+ "name": "positive",
490
+ "type": "CONDITIONING",
491
+ "link": 38
492
+ },
493
+ {
494
+ "name": "negative",
495
+ "type": "CONDITIONING",
496
+ "link": 39
497
+ },
498
+ {
499
+ "name": "latent_image",
500
+ "type": "LATENT",
501
+ "link": 40
502
+ }
503
+ ],
504
+ "outputs": [
505
+ {
506
+ "name": "LATENT",
507
+ "type": "LATENT",
508
+ "links": [
509
+ 41
510
+ ],
511
+ "slot_index": 0
512
+ }
513
+ ],
514
+ "properties": {
515
+ "Node name for S&R": "KSampler"
516
+ },
517
+ "widgets_values": [
518
+ 0,
519
+ "fixed",
520
+ 30,
521
+ 6.5,
522
+ "dpmpp_2m_sde_gpu",
523
+ "exponential",
524
+ 1
525
+ ]
526
+ },
527
+ {
528
+ "id": 14,
529
+ "type": "IPAdapterAdvanced",
530
+ "pos": [
531
+ 1199,
532
+ 346
533
+ ],
534
+ "size": {
535
+ "0": 315,
536
+ "1": 254
537
+ },
538
+ "flags": {},
539
+ "order": 9,
540
+ "mode": 0,
541
+ "inputs": [
542
+ {
543
+ "name": "model",
544
+ "type": "MODEL",
545
+ "link": 20
546
+ },
547
+ {
548
+ "name": "ipadapter",
549
+ "type": "IPADAPTER",
550
+ "link": 33,
551
+ "slot_index": 1
552
+ },
553
+ {
554
+ "name": "image",
555
+ "type": "IMAGE",
556
+ "link": 36
557
+ },
558
+ {
559
+ "name": "image_negative",
560
+ "type": "IMAGE",
561
+ "link": null
562
+ },
563
+ {
564
+ "name": "attn_mask",
565
+ "type": "MASK",
566
+ "link": null
567
+ },
568
+ {
569
+ "name": "clip_vision",
570
+ "type": "CLIP_VISION",
571
+ "link": 24,
572
+ "slot_index": 5
573
+ }
574
+ ],
575
+ "outputs": [
576
+ {
577
+ "name": "MODEL",
578
+ "type": "MODEL",
579
+ "links": [
580
+ 23
581
+ ],
582
+ "shape": 3,
583
+ "slot_index": 0
584
+ }
585
+ ],
586
+ "properties": {
587
+ "Node name for S&R": "IPAdapterAdvanced"
588
+ },
589
+ "widgets_values": [
590
+ 0.7000000000000001,
591
+ "linear",
592
+ "concat",
593
+ 0,
594
+ 1
595
+ ]
596
+ },
597
+ {
598
+ "id": 23,
599
+ "type": "SaveImage",
600
+ "pos": [
601
+ 2333,
602
+ 711
603
+ ],
604
+ "size": {
605
+ "0": 529.7760009765625,
606
+ "1": 582.3048095703125
607
+ },
608
+ "flags": {},
609
+ "order": 16,
610
+ "mode": 0,
611
+ "inputs": [
612
+ {
613
+ "name": "images",
614
+ "type": "IMAGE",
615
+ "link": 43
616
+ }
617
+ ],
618
+ "properties": {},
619
+ "widgets_values": [
620
+ "IPAdapter"
621
+ ]
622
+ },
623
+ {
624
+ "id": 19,
625
+ "type": "LoadImage",
626
+ "pos": [
627
+ 1206,
628
+ -41
629
+ ],
630
+ "size": {
631
+ "0": 315,
632
+ "1": 314
633
+ },
634
+ "flags": {},
635
+ "order": 4,
636
+ "mode": 0,
637
+ "outputs": [
638
+ {
639
+ "name": "IMAGE",
640
+ "type": "IMAGE",
641
+ "links": [
642
+ 49
643
+ ],
644
+ "shape": 3,
645
+ "slot_index": 0
646
+ },
647
+ {
648
+ "name": "MASK",
649
+ "type": "MASK",
650
+ "links": null,
651
+ "shape": 3
652
+ }
653
+ ],
654
+ "properties": {
655
+ "Node name for S&R": "LoadImage"
656
+ },
657
+ "widgets_values": [
658
+ "trees.jpg",
659
+ "image"
660
+ ]
661
+ },
662
+ {
663
+ "id": 12,
664
+ "type": "LoadImage",
665
+ "pos": [
666
+ 313,
667
+ 291
668
+ ],
669
+ "size": {
670
+ "0": 315,
671
+ "1": 314
672
+ },
673
+ "flags": {},
674
+ "order": 5,
675
+ "mode": 0,
676
+ "outputs": [
677
+ {
678
+ "name": "IMAGE",
679
+ "type": "IMAGE",
680
+ "links": [
681
+ 35
682
+ ],
683
+ "shape": 3,
684
+ "slot_index": 0
685
+ },
686
+ {
687
+ "name": "MASK",
688
+ "type": "MASK",
689
+ "links": null,
690
+ "shape": 3
691
+ }
692
+ ],
693
+ "properties": {
694
+ "Node name for S&R": "LoadImage"
695
+ },
696
+ "widgets_values": [
697
+ "castle.jpg",
698
+ "image"
699
+ ]
700
+ },
701
+ {
702
+ "id": 22,
703
+ "type": "VAEDecode",
704
+ "pos": [
705
+ 2581,
706
+ 331
707
+ ],
708
+ "size": {
709
+ "0": 140,
710
+ "1": 46
711
+ },
712
+ "flags": {},
713
+ "order": 14,
714
+ "mode": 0,
715
+ "inputs": [
716
+ {
717
+ "name": "samples",
718
+ "type": "LATENT",
719
+ "link": 41
720
+ },
721
+ {
722
+ "name": "vae",
723
+ "type": "VAE",
724
+ "link": 42
725
+ }
726
+ ],
727
+ "outputs": [
728
+ {
729
+ "name": "IMAGE",
730
+ "type": "IMAGE",
731
+ "links": [
732
+ 43
733
+ ],
734
+ "slot_index": 0
735
+ }
736
+ ],
737
+ "properties": {
738
+ "Node name for S&R": "VAEDecode"
739
+ }
740
+ }
741
+ ],
742
+ "links": [
743
+ [
744
+ 2,
745
+ 5,
746
+ 0,
747
+ 3,
748
+ 3,
749
+ "LATENT"
750
+ ],
751
+ [
752
+ 3,
753
+ 4,
754
+ 1,
755
+ 6,
756
+ 0,
757
+ "CLIP"
758
+ ],
759
+ [
760
+ 4,
761
+ 6,
762
+ 0,
763
+ 3,
764
+ 1,
765
+ "CONDITIONING"
766
+ ],
767
+ [
768
+ 5,
769
+ 4,
770
+ 1,
771
+ 7,
772
+ 0,
773
+ "CLIP"
774
+ ],
775
+ [
776
+ 6,
777
+ 7,
778
+ 0,
779
+ 3,
780
+ 2,
781
+ "CONDITIONING"
782
+ ],
783
+ [
784
+ 7,
785
+ 3,
786
+ 0,
787
+ 8,
788
+ 0,
789
+ "LATENT"
790
+ ],
791
+ [
792
+ 8,
793
+ 4,
794
+ 2,
795
+ 8,
796
+ 1,
797
+ "VAE"
798
+ ],
799
+ [
800
+ 9,
801
+ 8,
802
+ 0,
803
+ 9,
804
+ 0,
805
+ "IMAGE"
806
+ ],
807
+ [
808
+ 20,
809
+ 4,
810
+ 0,
811
+ 14,
812
+ 0,
813
+ "MODEL"
814
+ ],
815
+ [
816
+ 23,
817
+ 14,
818
+ 0,
819
+ 3,
820
+ 0,
821
+ "MODEL"
822
+ ],
823
+ [
824
+ 24,
825
+ 16,
826
+ 0,
827
+ 14,
828
+ 5,
829
+ "CLIP_VISION"
830
+ ],
831
+ [
832
+ 33,
833
+ 15,
834
+ 0,
835
+ 14,
836
+ 1,
837
+ "IPADAPTER"
838
+ ],
839
+ [
840
+ 35,
841
+ 12,
842
+ 0,
843
+ 20,
844
+ 0,
845
+ "IMAGE"
846
+ ],
847
+ [
848
+ 36,
849
+ 20,
850
+ 0,
851
+ 14,
852
+ 2,
853
+ "IMAGE"
854
+ ],
855
+ [
856
+ 37,
857
+ 24,
858
+ 0,
859
+ 21,
860
+ 0,
861
+ "MODEL"
862
+ ],
863
+ [
864
+ 38,
865
+ 6,
866
+ 0,
867
+ 21,
868
+ 1,
869
+ "CONDITIONING"
870
+ ],
871
+ [
872
+ 39,
873
+ 7,
874
+ 0,
875
+ 21,
876
+ 2,
877
+ "CONDITIONING"
878
+ ],
879
+ [
880
+ 40,
881
+ 5,
882
+ 0,
883
+ 21,
884
+ 3,
885
+ "LATENT"
886
+ ],
887
+ [
888
+ 41,
889
+ 21,
890
+ 0,
891
+ 22,
892
+ 0,
893
+ "LATENT"
894
+ ],
895
+ [
896
+ 42,
897
+ 4,
898
+ 2,
899
+ 22,
900
+ 1,
901
+ "VAE"
902
+ ],
903
+ [
904
+ 43,
905
+ 22,
906
+ 0,
907
+ 23,
908
+ 0,
909
+ "IMAGE"
910
+ ],
911
+ [
912
+ 44,
913
+ 4,
914
+ 0,
915
+ 24,
916
+ 0,
917
+ "MODEL"
918
+ ],
919
+ [
920
+ 45,
921
+ 15,
922
+ 0,
923
+ 24,
924
+ 1,
925
+ "IPADAPTER"
926
+ ],
927
+ [
928
+ 46,
929
+ 20,
930
+ 0,
931
+ 24,
932
+ 2,
933
+ "IMAGE"
934
+ ],
935
+ [
936
+ 48,
937
+ 16,
938
+ 0,
939
+ 24,
940
+ 5,
941
+ "CLIP_VISION"
942
+ ],
943
+ [
944
+ 49,
945
+ 19,
946
+ 0,
947
+ 24,
948
+ 3,
949
+ "IMAGE"
950
+ ]
951
+ ],
952
+ "groups": [],
953
+ "config": {},
954
+ "extra": {},
955
+ "version": 0.4
956
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_noise_injection.json ADDED
@@ -0,0 +1,677 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 18,
3
+ "last_link_id": 30,
4
+ "nodes": [
5
+ {
6
+ "id": 4,
7
+ "type": "CheckpointLoaderSimple",
8
+ "pos": [
9
+ 50,
10
+ 730
11
+ ],
12
+ "size": {
13
+ "0": 315,
14
+ "1": 98
15
+ },
16
+ "flags": {},
17
+ "order": 0,
18
+ "mode": 0,
19
+ "outputs": [
20
+ {
21
+ "name": "MODEL",
22
+ "type": "MODEL",
23
+ "links": [
24
+ 20
25
+ ],
26
+ "slot_index": 0
27
+ },
28
+ {
29
+ "name": "CLIP",
30
+ "type": "CLIP",
31
+ "links": [
32
+ 3,
33
+ 5
34
+ ],
35
+ "slot_index": 1
36
+ },
37
+ {
38
+ "name": "VAE",
39
+ "type": "VAE",
40
+ "links": [
41
+ 8
42
+ ],
43
+ "slot_index": 2
44
+ }
45
+ ],
46
+ "properties": {
47
+ "Node name for S&R": "CheckpointLoaderSimple"
48
+ },
49
+ "widgets_values": [
50
+ "sd15/realisticVisionV51_v51VAE.safetensors"
51
+ ]
52
+ },
53
+ {
54
+ "id": 9,
55
+ "type": "SaveImage",
56
+ "pos": [
57
+ 1770,
58
+ 710
59
+ ],
60
+ "size": {
61
+ "0": 529.7760009765625,
62
+ "1": 582.3048095703125
63
+ },
64
+ "flags": {},
65
+ "order": 12,
66
+ "mode": 0,
67
+ "inputs": [
68
+ {
69
+ "name": "images",
70
+ "type": "IMAGE",
71
+ "link": 9
72
+ }
73
+ ],
74
+ "properties": {},
75
+ "widgets_values": [
76
+ "IPAdapter"
77
+ ]
78
+ },
79
+ {
80
+ "id": 7,
81
+ "type": "CLIPTextEncode",
82
+ "pos": [
83
+ 690,
84
+ 840
85
+ ],
86
+ "size": {
87
+ "0": 425.27801513671875,
88
+ "1": 180.6060791015625
89
+ },
90
+ "flags": {},
91
+ "order": 6,
92
+ "mode": 0,
93
+ "inputs": [
94
+ {
95
+ "name": "clip",
96
+ "type": "CLIP",
97
+ "link": 5
98
+ }
99
+ ],
100
+ "outputs": [
101
+ {
102
+ "name": "CONDITIONING",
103
+ "type": "CONDITIONING",
104
+ "links": [
105
+ 6
106
+ ],
107
+ "slot_index": 0
108
+ }
109
+ ],
110
+ "properties": {
111
+ "Node name for S&R": "CLIPTextEncode"
112
+ },
113
+ "widgets_values": [
114
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed"
115
+ ]
116
+ },
117
+ {
118
+ "id": 5,
119
+ "type": "EmptyLatentImage",
120
+ "pos": [
121
+ 801,
122
+ 1097
123
+ ],
124
+ "size": {
125
+ "0": 315,
126
+ "1": 106
127
+ },
128
+ "flags": {},
129
+ "order": 1,
130
+ "mode": 0,
131
+ "outputs": [
132
+ {
133
+ "name": "LATENT",
134
+ "type": "LATENT",
135
+ "links": [
136
+ 2
137
+ ],
138
+ "slot_index": 0
139
+ }
140
+ ],
141
+ "properties": {
142
+ "Node name for S&R": "EmptyLatentImage"
143
+ },
144
+ "widgets_values": [
145
+ 512,
146
+ 512,
147
+ 1
148
+ ]
149
+ },
150
+ {
151
+ "id": 15,
152
+ "type": "IPAdapterModelLoader",
153
+ "pos": [
154
+ 308,
155
+ 52
156
+ ],
157
+ "size": {
158
+ "0": 315,
159
+ "1": 58
160
+ },
161
+ "flags": {},
162
+ "order": 2,
163
+ "mode": 0,
164
+ "outputs": [
165
+ {
166
+ "name": "IPADAPTER",
167
+ "type": "IPADAPTER",
168
+ "links": [
169
+ 21
170
+ ],
171
+ "shape": 3
172
+ }
173
+ ],
174
+ "properties": {
175
+ "Node name for S&R": "IPAdapterModelLoader"
176
+ },
177
+ "widgets_values": [
178
+ "ip-adapter-plus_sd15.safetensors"
179
+ ]
180
+ },
181
+ {
182
+ "id": 6,
183
+ "type": "CLIPTextEncode",
184
+ "pos": [
185
+ 690,
186
+ 610
187
+ ],
188
+ "size": {
189
+ "0": 422.84503173828125,
190
+ "1": 164.31304931640625
191
+ },
192
+ "flags": {},
193
+ "order": 5,
194
+ "mode": 0,
195
+ "inputs": [
196
+ {
197
+ "name": "clip",
198
+ "type": "CLIP",
199
+ "link": 3
200
+ }
201
+ ],
202
+ "outputs": [
203
+ {
204
+ "name": "CONDITIONING",
205
+ "type": "CONDITIONING",
206
+ "links": [
207
+ 4
208
+ ],
209
+ "slot_index": 0
210
+ }
211
+ ],
212
+ "properties": {
213
+ "Node name for S&R": "CLIPTextEncode"
214
+ },
215
+ "widgets_values": [
216
+ "in a peaceful spring morning a woman wearing a white shirt is sitting in a park on a bench\n\nhigh quality, detailed, diffuse light"
217
+ ]
218
+ },
219
+ {
220
+ "id": 12,
221
+ "type": "LoadImage",
222
+ "pos": [
223
+ 311,
224
+ 270
225
+ ],
226
+ "size": {
227
+ "0": 315,
228
+ "1": 314
229
+ },
230
+ "flags": {},
231
+ "order": 3,
232
+ "mode": 0,
233
+ "outputs": [
234
+ {
235
+ "name": "IMAGE",
236
+ "type": "IMAGE",
237
+ "links": [
238
+ 25
239
+ ],
240
+ "shape": 3,
241
+ "slot_index": 0
242
+ },
243
+ {
244
+ "name": "MASK",
245
+ "type": "MASK",
246
+ "links": null,
247
+ "shape": 3
248
+ }
249
+ ],
250
+ "properties": {
251
+ "Node name for S&R": "LoadImage"
252
+ },
253
+ "widgets_values": [
254
+ "girl_sitting.png",
255
+ "image"
256
+ ]
257
+ },
258
+ {
259
+ "id": 17,
260
+ "type": "PrepImageForClipVision",
261
+ "pos": [
262
+ 728,
263
+ 290
264
+ ],
265
+ "size": {
266
+ "0": 210,
267
+ "1": 106
268
+ },
269
+ "flags": {},
270
+ "order": 7,
271
+ "mode": 0,
272
+ "inputs": [
273
+ {
274
+ "name": "image",
275
+ "type": "IMAGE",
276
+ "link": 25
277
+ }
278
+ ],
279
+ "outputs": [
280
+ {
281
+ "name": "IMAGE",
282
+ "type": "IMAGE",
283
+ "links": [
284
+ 26,
285
+ 29
286
+ ],
287
+ "shape": 3,
288
+ "slot_index": 0
289
+ }
290
+ ],
291
+ "properties": {
292
+ "Node name for S&R": "PrepImageForClipVision"
293
+ },
294
+ "widgets_values": [
295
+ "LANCZOS",
296
+ "top",
297
+ 0.15
298
+ ]
299
+ },
300
+ {
301
+ "id": 14,
302
+ "type": "IPAdapterAdvanced",
303
+ "pos": [
304
+ 1351,
305
+ 214
306
+ ],
307
+ "size": {
308
+ "0": 315,
309
+ "1": 278
310
+ },
311
+ "flags": {},
312
+ "order": 9,
313
+ "mode": 0,
314
+ "inputs": [
315
+ {
316
+ "name": "model",
317
+ "type": "MODEL",
318
+ "link": 20
319
+ },
320
+ {
321
+ "name": "ipadapter",
322
+ "type": "IPADAPTER",
323
+ "link": 21,
324
+ "slot_index": 1
325
+ },
326
+ {
327
+ "name": "image",
328
+ "type": "IMAGE",
329
+ "link": 26
330
+ },
331
+ {
332
+ "name": "image_negative",
333
+ "type": "IMAGE",
334
+ "link": 30
335
+ },
336
+ {
337
+ "name": "attn_mask",
338
+ "type": "MASK",
339
+ "link": null
340
+ },
341
+ {
342
+ "name": "clip_vision",
343
+ "type": "CLIP_VISION",
344
+ "link": 24,
345
+ "slot_index": 5
346
+ }
347
+ ],
348
+ "outputs": [
349
+ {
350
+ "name": "MODEL",
351
+ "type": "MODEL",
352
+ "links": [
353
+ 23
354
+ ],
355
+ "shape": 3,
356
+ "slot_index": 0
357
+ }
358
+ ],
359
+ "properties": {
360
+ "Node name for S&R": "IPAdapterAdvanced"
361
+ },
362
+ "widgets_values": [
363
+ 0.7000000000000001,
364
+ "linear",
365
+ "concat",
366
+ 0,
367
+ 1,
368
+ "V only"
369
+ ]
370
+ },
371
+ {
372
+ "id": 3,
373
+ "type": "KSampler",
374
+ "pos": [
375
+ 1210,
376
+ 700
377
+ ],
378
+ "size": {
379
+ "0": 315,
380
+ "1": 262
381
+ },
382
+ "flags": {},
383
+ "order": 10,
384
+ "mode": 0,
385
+ "inputs": [
386
+ {
387
+ "name": "model",
388
+ "type": "MODEL",
389
+ "link": 23
390
+ },
391
+ {
392
+ "name": "positive",
393
+ "type": "CONDITIONING",
394
+ "link": 4
395
+ },
396
+ {
397
+ "name": "negative",
398
+ "type": "CONDITIONING",
399
+ "link": 6
400
+ },
401
+ {
402
+ "name": "latent_image",
403
+ "type": "LATENT",
404
+ "link": 2
405
+ }
406
+ ],
407
+ "outputs": [
408
+ {
409
+ "name": "LATENT",
410
+ "type": "LATENT",
411
+ "links": [
412
+ 7
413
+ ],
414
+ "slot_index": 0
415
+ }
416
+ ],
417
+ "properties": {
418
+ "Node name for S&R": "KSampler"
419
+ },
420
+ "widgets_values": [
421
+ 0,
422
+ "fixed",
423
+ 30,
424
+ 6.5,
425
+ "dpmpp_2m_sde_gpu",
426
+ "exponential",
427
+ 1
428
+ ]
429
+ },
430
+ {
431
+ "id": 18,
432
+ "type": "IPAdapterNoise",
433
+ "pos": [
434
+ 1019,
435
+ 405
436
+ ],
437
+ "size": {
438
+ "0": 210,
439
+ "1": 106
440
+ },
441
+ "flags": {},
442
+ "order": 8,
443
+ "mode": 0,
444
+ "inputs": [
445
+ {
446
+ "name": "image_optional",
447
+ "type": "IMAGE",
448
+ "link": 29
449
+ }
450
+ ],
451
+ "outputs": [
452
+ {
453
+ "name": "IMAGE",
454
+ "type": "IMAGE",
455
+ "links": [
456
+ 30
457
+ ],
458
+ "shape": 3,
459
+ "slot_index": 0
460
+ }
461
+ ],
462
+ "properties": {
463
+ "Node name for S&R": "IPAdapterNoise"
464
+ },
465
+ "widgets_values": [
466
+ "fade",
467
+ 0.3,
468
+ 5
469
+ ]
470
+ },
471
+ {
472
+ "id": 8,
473
+ "type": "VAEDecode",
474
+ "pos": [
475
+ 1575,
476
+ 705
477
+ ],
478
+ "size": {
479
+ "0": 140,
480
+ "1": 46
481
+ },
482
+ "flags": {},
483
+ "order": 11,
484
+ "mode": 0,
485
+ "inputs": [
486
+ {
487
+ "name": "samples",
488
+ "type": "LATENT",
489
+ "link": 7
490
+ },
491
+ {
492
+ "name": "vae",
493
+ "type": "VAE",
494
+ "link": 8
495
+ }
496
+ ],
497
+ "outputs": [
498
+ {
499
+ "name": "IMAGE",
500
+ "type": "IMAGE",
501
+ "links": [
502
+ 9
503
+ ],
504
+ "slot_index": 0
505
+ }
506
+ ],
507
+ "properties": {
508
+ "Node name for S&R": "VAEDecode"
509
+ }
510
+ },
511
+ {
512
+ "id": 16,
513
+ "type": "CLIPVisionLoader",
514
+ "pos": [
515
+ 308,
516
+ 161
517
+ ],
518
+ "size": {
519
+ "0": 315,
520
+ "1": 58
521
+ },
522
+ "flags": {},
523
+ "order": 4,
524
+ "mode": 0,
525
+ "outputs": [
526
+ {
527
+ "name": "CLIP_VISION",
528
+ "type": "CLIP_VISION",
529
+ "links": [
530
+ 24
531
+ ],
532
+ "shape": 3
533
+ }
534
+ ],
535
+ "properties": {
536
+ "Node name for S&R": "CLIPVisionLoader"
537
+ },
538
+ "widgets_values": [
539
+ "CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors"
540
+ ]
541
+ }
542
+ ],
543
+ "links": [
544
+ [
545
+ 2,
546
+ 5,
547
+ 0,
548
+ 3,
549
+ 3,
550
+ "LATENT"
551
+ ],
552
+ [
553
+ 3,
554
+ 4,
555
+ 1,
556
+ 6,
557
+ 0,
558
+ "CLIP"
559
+ ],
560
+ [
561
+ 4,
562
+ 6,
563
+ 0,
564
+ 3,
565
+ 1,
566
+ "CONDITIONING"
567
+ ],
568
+ [
569
+ 5,
570
+ 4,
571
+ 1,
572
+ 7,
573
+ 0,
574
+ "CLIP"
575
+ ],
576
+ [
577
+ 6,
578
+ 7,
579
+ 0,
580
+ 3,
581
+ 2,
582
+ "CONDITIONING"
583
+ ],
584
+ [
585
+ 7,
586
+ 3,
587
+ 0,
588
+ 8,
589
+ 0,
590
+ "LATENT"
591
+ ],
592
+ [
593
+ 8,
594
+ 4,
595
+ 2,
596
+ 8,
597
+ 1,
598
+ "VAE"
599
+ ],
600
+ [
601
+ 9,
602
+ 8,
603
+ 0,
604
+ 9,
605
+ 0,
606
+ "IMAGE"
607
+ ],
608
+ [
609
+ 20,
610
+ 4,
611
+ 0,
612
+ 14,
613
+ 0,
614
+ "MODEL"
615
+ ],
616
+ [
617
+ 21,
618
+ 15,
619
+ 0,
620
+ 14,
621
+ 1,
622
+ "IPADAPTER"
623
+ ],
624
+ [
625
+ 23,
626
+ 14,
627
+ 0,
628
+ 3,
629
+ 0,
630
+ "MODEL"
631
+ ],
632
+ [
633
+ 24,
634
+ 16,
635
+ 0,
636
+ 14,
637
+ 5,
638
+ "CLIP_VISION"
639
+ ],
640
+ [
641
+ 25,
642
+ 12,
643
+ 0,
644
+ 17,
645
+ 0,
646
+ "IMAGE"
647
+ ],
648
+ [
649
+ 26,
650
+ 17,
651
+ 0,
652
+ 14,
653
+ 2,
654
+ "IMAGE"
655
+ ],
656
+ [
657
+ 29,
658
+ 17,
659
+ 0,
660
+ 18,
661
+ 0,
662
+ "IMAGE"
663
+ ],
664
+ [
665
+ 30,
666
+ 18,
667
+ 0,
668
+ 14,
669
+ 3,
670
+ "IMAGE"
671
+ ]
672
+ ],
673
+ "groups": [],
674
+ "config": {},
675
+ "extra": {},
676
+ "version": 0.4
677
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_portrait.json ADDED
@@ -0,0 +1,567 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 20,
3
+ "last_link_id": 36,
4
+ "nodes": [
5
+ {
6
+ "id": 8,
7
+ "type": "VAEDecode",
8
+ "pos": [
9
+ 1640,
10
+ 710
11
+ ],
12
+ "size": {
13
+ "0": 140,
14
+ "1": 46
15
+ },
16
+ "flags": {},
17
+ "order": 8,
18
+ "mode": 0,
19
+ "inputs": [
20
+ {
21
+ "name": "samples",
22
+ "type": "LATENT",
23
+ "link": 7
24
+ },
25
+ {
26
+ "name": "vae",
27
+ "type": "VAE",
28
+ "link": 8
29
+ }
30
+ ],
31
+ "outputs": [
32
+ {
33
+ "name": "IMAGE",
34
+ "type": "IMAGE",
35
+ "links": [
36
+ 9
37
+ ],
38
+ "slot_index": 0
39
+ }
40
+ ],
41
+ "properties": {
42
+ "Node name for S&R": "VAEDecode"
43
+ }
44
+ },
45
+ {
46
+ "id": 3,
47
+ "type": "KSampler",
48
+ "pos": [
49
+ 1280,
50
+ 710
51
+ ],
52
+ "size": {
53
+ "0": 315,
54
+ "1": 262
55
+ },
56
+ "flags": {},
57
+ "order": 7,
58
+ "mode": 0,
59
+ "inputs": [
60
+ {
61
+ "name": "model",
62
+ "type": "MODEL",
63
+ "link": 32
64
+ },
65
+ {
66
+ "name": "positive",
67
+ "type": "CONDITIONING",
68
+ "link": 4
69
+ },
70
+ {
71
+ "name": "negative",
72
+ "type": "CONDITIONING",
73
+ "link": 6
74
+ },
75
+ {
76
+ "name": "latent_image",
77
+ "type": "LATENT",
78
+ "link": 2
79
+ }
80
+ ],
81
+ "outputs": [
82
+ {
83
+ "name": "LATENT",
84
+ "type": "LATENT",
85
+ "links": [
86
+ 7
87
+ ],
88
+ "slot_index": 0
89
+ }
90
+ ],
91
+ "properties": {
92
+ "Node name for S&R": "KSampler"
93
+ },
94
+ "widgets_values": [
95
+ 0,
96
+ "fixed",
97
+ 30,
98
+ 6.5,
99
+ "ddpm",
100
+ "karras",
101
+ 1
102
+ ]
103
+ },
104
+ {
105
+ "id": 9,
106
+ "type": "SaveImage",
107
+ "pos": [
108
+ 1830,
109
+ 700
110
+ ],
111
+ "size": {
112
+ "0": 529.7760009765625,
113
+ "1": 582.3048095703125
114
+ },
115
+ "flags": {},
116
+ "order": 9,
117
+ "mode": 0,
118
+ "inputs": [
119
+ {
120
+ "name": "images",
121
+ "type": "IMAGE",
122
+ "link": 9
123
+ }
124
+ ],
125
+ "properties": {},
126
+ "widgets_values": [
127
+ "IPAdapter"
128
+ ]
129
+ },
130
+ {
131
+ "id": 20,
132
+ "type": "IPAdapterUnifiedLoaderFaceID",
133
+ "pos": [
134
+ 460,
135
+ 60
136
+ ],
137
+ "size": {
138
+ "0": 315,
139
+ "1": 126
140
+ },
141
+ "flags": {},
142
+ "order": 3,
143
+ "mode": 0,
144
+ "inputs": [
145
+ {
146
+ "name": "model",
147
+ "type": "MODEL",
148
+ "link": 36
149
+ },
150
+ {
151
+ "name": "ipadapter",
152
+ "type": "IPADAPTER",
153
+ "link": null
154
+ }
155
+ ],
156
+ "outputs": [
157
+ {
158
+ "name": "MODEL",
159
+ "type": "MODEL",
160
+ "links": [
161
+ 35
162
+ ],
163
+ "shape": 3,
164
+ "slot_index": 0
165
+ },
166
+ {
167
+ "name": "ipadapter",
168
+ "type": "IPADAPTER",
169
+ "links": [
170
+ 34
171
+ ],
172
+ "shape": 3
173
+ }
174
+ ],
175
+ "properties": {
176
+ "Node name for S&R": "IPAdapterUnifiedLoaderFaceID"
177
+ },
178
+ "widgets_values": [
179
+ "FACEID PORTRAIT (style transfer)",
180
+ 0.6,
181
+ "CPU"
182
+ ]
183
+ },
184
+ {
185
+ "id": 4,
186
+ "type": "CheckpointLoaderSimple",
187
+ "pos": [
188
+ 10,
189
+ 680
190
+ ],
191
+ "size": {
192
+ "0": 315,
193
+ "1": 98
194
+ },
195
+ "flags": {},
196
+ "order": 0,
197
+ "mode": 0,
198
+ "outputs": [
199
+ {
200
+ "name": "MODEL",
201
+ "type": "MODEL",
202
+ "links": [
203
+ 36
204
+ ],
205
+ "slot_index": 0
206
+ },
207
+ {
208
+ "name": "CLIP",
209
+ "type": "CLIP",
210
+ "links": [
211
+ 3,
212
+ 5
213
+ ],
214
+ "slot_index": 1
215
+ },
216
+ {
217
+ "name": "VAE",
218
+ "type": "VAE",
219
+ "links": [
220
+ 8
221
+ ],
222
+ "slot_index": 2
223
+ }
224
+ ],
225
+ "properties": {
226
+ "Node name for S&R": "CheckpointLoaderSimple"
227
+ },
228
+ "widgets_values": [
229
+ "sdxl/juggernautXL_version8Rundiffusion.safetensors"
230
+ ]
231
+ },
232
+ {
233
+ "id": 5,
234
+ "type": "EmptyLatentImage",
235
+ "pos": [
236
+ 870,
237
+ 1100
238
+ ],
239
+ "size": {
240
+ "0": 315,
241
+ "1": 106
242
+ },
243
+ "flags": {},
244
+ "order": 1,
245
+ "mode": 0,
246
+ "outputs": [
247
+ {
248
+ "name": "LATENT",
249
+ "type": "LATENT",
250
+ "links": [
251
+ 2
252
+ ],
253
+ "slot_index": 0
254
+ }
255
+ ],
256
+ "properties": {
257
+ "Node name for S&R": "EmptyLatentImage"
258
+ },
259
+ "widgets_values": [
260
+ 1024,
261
+ 1024,
262
+ 1
263
+ ]
264
+ },
265
+ {
266
+ "id": 12,
267
+ "type": "LoadImage",
268
+ "pos": [
269
+ 450,
270
+ 240
271
+ ],
272
+ "size": {
273
+ "0": 315,
274
+ "1": 314
275
+ },
276
+ "flags": {},
277
+ "order": 2,
278
+ "mode": 0,
279
+ "outputs": [
280
+ {
281
+ "name": "IMAGE",
282
+ "type": "IMAGE",
283
+ "links": [
284
+ 29
285
+ ],
286
+ "shape": 3,
287
+ "slot_index": 0
288
+ },
289
+ {
290
+ "name": "MASK",
291
+ "type": "MASK",
292
+ "links": null,
293
+ "shape": 3
294
+ }
295
+ ],
296
+ "properties": {
297
+ "Node name for S&R": "LoadImage"
298
+ },
299
+ "widgets_values": [
300
+ "face2.jpg",
301
+ "image"
302
+ ]
303
+ },
304
+ {
305
+ "id": 6,
306
+ "type": "CLIPTextEncode",
307
+ "pos": [
308
+ 760,
309
+ 620
310
+ ],
311
+ "size": {
312
+ "0": 422.84503173828125,
313
+ "1": 164.31304931640625
314
+ },
315
+ "flags": {},
316
+ "order": 4,
317
+ "mode": 0,
318
+ "inputs": [
319
+ {
320
+ "name": "clip",
321
+ "type": "CLIP",
322
+ "link": 3
323
+ }
324
+ ],
325
+ "outputs": [
326
+ {
327
+ "name": "CONDITIONING",
328
+ "type": "CONDITIONING",
329
+ "links": [
330
+ 4
331
+ ],
332
+ "slot_index": 0
333
+ }
334
+ ],
335
+ "properties": {
336
+ "Node name for S&R": "CLIPTextEncode"
337
+ },
338
+ "widgets_values": [
339
+ "a watercolor painting of a woman on the beach\n\nhigh quality artistry"
340
+ ]
341
+ },
342
+ {
343
+ "id": 7,
344
+ "type": "CLIPTextEncode",
345
+ "pos": [
346
+ 760,
347
+ 850
348
+ ],
349
+ "size": {
350
+ "0": 425.27801513671875,
351
+ "1": 180.6060791015625
352
+ },
353
+ "flags": {},
354
+ "order": 5,
355
+ "mode": 0,
356
+ "inputs": [
357
+ {
358
+ "name": "clip",
359
+ "type": "CLIP",
360
+ "link": 5
361
+ }
362
+ ],
363
+ "outputs": [
364
+ {
365
+ "name": "CONDITIONING",
366
+ "type": "CONDITIONING",
367
+ "links": [
368
+ 6
369
+ ],
370
+ "slot_index": 0
371
+ }
372
+ ],
373
+ "properties": {
374
+ "Node name for S&R": "CLIPTextEncode"
375
+ },
376
+ "widgets_values": [
377
+ "photo, blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed, naked"
378
+ ]
379
+ },
380
+ {
381
+ "id": 18,
382
+ "type": "IPAdapterFaceID",
383
+ "pos": [
384
+ 850,
385
+ 190
386
+ ],
387
+ "size": {
388
+ "0": 315,
389
+ "1": 322
390
+ },
391
+ "flags": {},
392
+ "order": 6,
393
+ "mode": 0,
394
+ "inputs": [
395
+ {
396
+ "name": "model",
397
+ "type": "MODEL",
398
+ "link": 35
399
+ },
400
+ {
401
+ "name": "ipadapter",
402
+ "type": "IPADAPTER",
403
+ "link": 34,
404
+ "slot_index": 1
405
+ },
406
+ {
407
+ "name": "image",
408
+ "type": "IMAGE",
409
+ "link": 29
410
+ },
411
+ {
412
+ "name": "image_negative",
413
+ "type": "IMAGE",
414
+ "link": null
415
+ },
416
+ {
417
+ "name": "attn_mask",
418
+ "type": "MASK",
419
+ "link": null
420
+ },
421
+ {
422
+ "name": "clip_vision",
423
+ "type": "CLIP_VISION",
424
+ "link": null
425
+ },
426
+ {
427
+ "name": "insightface",
428
+ "type": "INSIGHTFACE",
429
+ "link": null
430
+ }
431
+ ],
432
+ "outputs": [
433
+ {
434
+ "name": "MODEL",
435
+ "type": "MODEL",
436
+ "links": [
437
+ 32
438
+ ],
439
+ "shape": 3,
440
+ "slot_index": 0
441
+ }
442
+ ],
443
+ "properties": {
444
+ "Node name for S&R": "IPAdapterFaceID"
445
+ },
446
+ "widgets_values": [
447
+ 0.65,
448
+ 1,
449
+ "linear",
450
+ "concat",
451
+ 0,
452
+ 1,
453
+ "V only"
454
+ ]
455
+ }
456
+ ],
457
+ "links": [
458
+ [
459
+ 2,
460
+ 5,
461
+ 0,
462
+ 3,
463
+ 3,
464
+ "LATENT"
465
+ ],
466
+ [
467
+ 3,
468
+ 4,
469
+ 1,
470
+ 6,
471
+ 0,
472
+ "CLIP"
473
+ ],
474
+ [
475
+ 4,
476
+ 6,
477
+ 0,
478
+ 3,
479
+ 1,
480
+ "CONDITIONING"
481
+ ],
482
+ [
483
+ 5,
484
+ 4,
485
+ 1,
486
+ 7,
487
+ 0,
488
+ "CLIP"
489
+ ],
490
+ [
491
+ 6,
492
+ 7,
493
+ 0,
494
+ 3,
495
+ 2,
496
+ "CONDITIONING"
497
+ ],
498
+ [
499
+ 7,
500
+ 3,
501
+ 0,
502
+ 8,
503
+ 0,
504
+ "LATENT"
505
+ ],
506
+ [
507
+ 8,
508
+ 4,
509
+ 2,
510
+ 8,
511
+ 1,
512
+ "VAE"
513
+ ],
514
+ [
515
+ 9,
516
+ 8,
517
+ 0,
518
+ 9,
519
+ 0,
520
+ "IMAGE"
521
+ ],
522
+ [
523
+ 29,
524
+ 12,
525
+ 0,
526
+ 18,
527
+ 2,
528
+ "IMAGE"
529
+ ],
530
+ [
531
+ 32,
532
+ 18,
533
+ 0,
534
+ 3,
535
+ 0,
536
+ "MODEL"
537
+ ],
538
+ [
539
+ 34,
540
+ 20,
541
+ 1,
542
+ 18,
543
+ 1,
544
+ "IPADAPTER"
545
+ ],
546
+ [
547
+ 35,
548
+ 20,
549
+ 0,
550
+ 18,
551
+ 0,
552
+ "MODEL"
553
+ ],
554
+ [
555
+ 36,
556
+ 4,
557
+ 0,
558
+ 20,
559
+ 0,
560
+ "MODEL"
561
+ ]
562
+ ],
563
+ "groups": [],
564
+ "config": {},
565
+ "extra": {},
566
+ "version": 0.4
567
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_precise_composition.json ADDED
@@ -0,0 +1,861 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 19,
3
+ "last_link_id": 34,
4
+ "nodes": [
5
+ {
6
+ "id": 10,
7
+ "type": "PreviewImage",
8
+ "pos": [
9
+ 1730,
10
+ 139
11
+ ],
12
+ "size": {
13
+ "0": 1060.949462890625,
14
+ "1": 1076.0679931640625
15
+ },
16
+ "flags": {},
17
+ "order": 12,
18
+ "mode": 0,
19
+ "inputs": [
20
+ {
21
+ "name": "images",
22
+ "type": "IMAGE",
23
+ "link": 10
24
+ }
25
+ ],
26
+ "properties": {
27
+ "Node name for S&R": "PreviewImage"
28
+ }
29
+ },
30
+ {
31
+ "id": 4,
32
+ "type": "CheckpointLoaderSimple",
33
+ "pos": [
34
+ -491,
35
+ -138
36
+ ],
37
+ "size": {
38
+ "0": 315,
39
+ "1": 98
40
+ },
41
+ "flags": {},
42
+ "order": 0,
43
+ "mode": 0,
44
+ "outputs": [
45
+ {
46
+ "name": "MODEL",
47
+ "type": "MODEL",
48
+ "links": [
49
+ 15
50
+ ],
51
+ "slot_index": 0
52
+ },
53
+ {
54
+ "name": "CLIP",
55
+ "type": "CLIP",
56
+ "links": [
57
+ 3,
58
+ 5
59
+ ],
60
+ "slot_index": 1
61
+ },
62
+ {
63
+ "name": "VAE",
64
+ "type": "VAE",
65
+ "links": [
66
+ 8,
67
+ 30
68
+ ],
69
+ "slot_index": 2
70
+ }
71
+ ],
72
+ "properties": {
73
+ "Node name for S&R": "CheckpointLoaderSimple"
74
+ },
75
+ "widgets_values": [
76
+ "sdxl/ProteusV0.3.safetensors"
77
+ ]
78
+ },
79
+ {
80
+ "id": 13,
81
+ "type": "IPAdapterUnifiedLoader",
82
+ "pos": [
83
+ 237,
84
+ -374
85
+ ],
86
+ "size": {
87
+ "0": 225.859619140625,
88
+ "1": 78
89
+ },
90
+ "flags": {},
91
+ "order": 3,
92
+ "mode": 0,
93
+ "inputs": [
94
+ {
95
+ "name": "model",
96
+ "type": "MODEL",
97
+ "link": 15
98
+ },
99
+ {
100
+ "name": "ipadapter",
101
+ "type": "IPADAPTER",
102
+ "link": null
103
+ }
104
+ ],
105
+ "outputs": [
106
+ {
107
+ "name": "model",
108
+ "type": "MODEL",
109
+ "links": [
110
+ 18,
111
+ 22
112
+ ],
113
+ "shape": 3,
114
+ "slot_index": 0
115
+ },
116
+ {
117
+ "name": "ipadapter",
118
+ "type": "IPADAPTER",
119
+ "links": [
120
+ 19,
121
+ 23
122
+ ],
123
+ "shape": 3,
124
+ "slot_index": 1
125
+ }
126
+ ],
127
+ "properties": {
128
+ "Node name for S&R": "IPAdapterUnifiedLoader"
129
+ },
130
+ "widgets_values": [
131
+ "PLUS (high strength)"
132
+ ]
133
+ },
134
+ {
135
+ "id": 14,
136
+ "type": "LoadImage",
137
+ "pos": [
138
+ 177,
139
+ -764
140
+ ],
141
+ "size": {
142
+ "0": 315,
143
+ "1": 314
144
+ },
145
+ "flags": {},
146
+ "order": 1,
147
+ "mode": 0,
148
+ "outputs": [
149
+ {
150
+ "name": "IMAGE",
151
+ "type": "IMAGE",
152
+ "links": [
153
+ 20,
154
+ 24
155
+ ],
156
+ "shape": 3,
157
+ "slot_index": 0
158
+ },
159
+ {
160
+ "name": "MASK",
161
+ "type": "MASK",
162
+ "links": null,
163
+ "shape": 3
164
+ }
165
+ ],
166
+ "properties": {
167
+ "Node name for S&R": "LoadImage"
168
+ },
169
+ "widgets_values": [
170
+ "anime_illustration.png",
171
+ "image"
172
+ ]
173
+ },
174
+ {
175
+ "id": 3,
176
+ "type": "KSampler",
177
+ "pos": [
178
+ 1198,
179
+ 175
180
+ ],
181
+ "size": {
182
+ "0": 315,
183
+ "1": 262
184
+ },
185
+ "flags": {},
186
+ "order": 8,
187
+ "mode": 0,
188
+ "inputs": [
189
+ {
190
+ "name": "model",
191
+ "type": "MODEL",
192
+ "link": 21
193
+ },
194
+ {
195
+ "name": "positive",
196
+ "type": "CONDITIONING",
197
+ "link": 4
198
+ },
199
+ {
200
+ "name": "negative",
201
+ "type": "CONDITIONING",
202
+ "link": 6
203
+ },
204
+ {
205
+ "name": "latent_image",
206
+ "type": "LATENT",
207
+ "link": 34
208
+ }
209
+ ],
210
+ "outputs": [
211
+ {
212
+ "name": "LATENT",
213
+ "type": "LATENT",
214
+ "links": [
215
+ 7
216
+ ],
217
+ "slot_index": 0
218
+ }
219
+ ],
220
+ "properties": {
221
+ "Node name for S&R": "KSampler"
222
+ },
223
+ "widgets_values": [
224
+ 0,
225
+ "fixed",
226
+ 30,
227
+ 6,
228
+ "dpmpp_2m",
229
+ "karras",
230
+ 1
231
+ ]
232
+ },
233
+ {
234
+ "id": 6,
235
+ "type": "CLIPTextEncode",
236
+ "pos": [
237
+ 121,
238
+ -207
239
+ ],
240
+ "size": {
241
+ "0": 422.84503173828125,
242
+ "1": 164.31304931640625
243
+ },
244
+ "flags": {},
245
+ "order": 4,
246
+ "mode": 0,
247
+ "inputs": [
248
+ {
249
+ "name": "clip",
250
+ "type": "CLIP",
251
+ "link": 3
252
+ }
253
+ ],
254
+ "outputs": [
255
+ {
256
+ "name": "CONDITIONING",
257
+ "type": "CONDITIONING",
258
+ "links": [
259
+ 4,
260
+ 26
261
+ ],
262
+ "slot_index": 0
263
+ }
264
+ ],
265
+ "properties": {
266
+ "Node name for S&R": "CLIPTextEncode"
267
+ },
268
+ "widgets_values": [
269
+ "portrait of the most beautiful anthropomorphic cat, detailed, intricate, furry, 4k, bright"
270
+ ]
271
+ },
272
+ {
273
+ "id": 7,
274
+ "type": "CLIPTextEncode",
275
+ "pos": [
276
+ 125,
277
+ 47
278
+ ],
279
+ "size": {
280
+ "0": 425.27801513671875,
281
+ "1": 180.6060791015625
282
+ },
283
+ "flags": {},
284
+ "order": 5,
285
+ "mode": 0,
286
+ "inputs": [
287
+ {
288
+ "name": "clip",
289
+ "type": "CLIP",
290
+ "link": 5
291
+ }
292
+ ],
293
+ "outputs": [
294
+ {
295
+ "name": "CONDITIONING",
296
+ "type": "CONDITIONING",
297
+ "links": [
298
+ 6,
299
+ 27
300
+ ],
301
+ "slot_index": 0
302
+ }
303
+ ],
304
+ "properties": {
305
+ "Node name for S&R": "CLIPTextEncode"
306
+ },
307
+ "widgets_values": [
308
+ "blurry, glitch, artifact, distorted, malformed, messy, dirty"
309
+ ]
310
+ },
311
+ {
312
+ "id": 18,
313
+ "type": "PreviewImage",
314
+ "pos": [
315
+ 1743,
316
+ -1020
317
+ ],
318
+ "size": {
319
+ "0": 1060.949462890625,
320
+ "1": 1076.0679931640625
321
+ },
322
+ "flags": {},
323
+ "order": 13,
324
+ "mode": 0,
325
+ "inputs": [
326
+ {
327
+ "name": "images",
328
+ "type": "IMAGE",
329
+ "link": 31
330
+ }
331
+ ],
332
+ "properties": {
333
+ "Node name for S&R": "PreviewImage"
334
+ }
335
+ },
336
+ {
337
+ "id": 17,
338
+ "type": "VAEDecode",
339
+ "pos": [
340
+ 1544,
341
+ -1007
342
+ ],
343
+ "size": {
344
+ "0": 140,
345
+ "1": 46
346
+ },
347
+ "flags": {
348
+ "collapsed": true
349
+ },
350
+ "order": 11,
351
+ "mode": 0,
352
+ "inputs": [
353
+ {
354
+ "name": "samples",
355
+ "type": "LATENT",
356
+ "link": 29
357
+ },
358
+ {
359
+ "name": "vae",
360
+ "type": "VAE",
361
+ "link": 30
362
+ }
363
+ ],
364
+ "outputs": [
365
+ {
366
+ "name": "IMAGE",
367
+ "type": "IMAGE",
368
+ "links": [
369
+ 31
370
+ ],
371
+ "slot_index": 0
372
+ }
373
+ ],
374
+ "properties": {
375
+ "Node name for S&R": "VAEDecode"
376
+ }
377
+ },
378
+ {
379
+ "id": 8,
380
+ "type": "VAEDecode",
381
+ "pos": [
382
+ 1551,
383
+ 139
384
+ ],
385
+ "size": {
386
+ "0": 140,
387
+ "1": 46
388
+ },
389
+ "flags": {
390
+ "collapsed": true
391
+ },
392
+ "order": 10,
393
+ "mode": 0,
394
+ "inputs": [
395
+ {
396
+ "name": "samples",
397
+ "type": "LATENT",
398
+ "link": 7
399
+ },
400
+ {
401
+ "name": "vae",
402
+ "type": "VAE",
403
+ "link": 8
404
+ }
405
+ ],
406
+ "outputs": [
407
+ {
408
+ "name": "IMAGE",
409
+ "type": "IMAGE",
410
+ "links": [
411
+ 10
412
+ ],
413
+ "slot_index": 0
414
+ }
415
+ ],
416
+ "properties": {
417
+ "Node name for S&R": "VAEDecode"
418
+ }
419
+ },
420
+ {
421
+ "id": 15,
422
+ "type": "IPAdapterMS",
423
+ "pos": [
424
+ 787,
425
+ 180
426
+ ],
427
+ "size": {
428
+ "0": 319.27130126953125,
429
+ "1": 364
430
+ },
431
+ "flags": {},
432
+ "order": 6,
433
+ "mode": 0,
434
+ "inputs": [
435
+ {
436
+ "name": "model",
437
+ "type": "MODEL",
438
+ "link": 18
439
+ },
440
+ {
441
+ "name": "ipadapter",
442
+ "type": "IPADAPTER",
443
+ "link": 19
444
+ },
445
+ {
446
+ "name": "image",
447
+ "type": "IMAGE",
448
+ "link": 20
449
+ },
450
+ {
451
+ "name": "image_negative",
452
+ "type": "IMAGE",
453
+ "link": null
454
+ },
455
+ {
456
+ "name": "attn_mask",
457
+ "type": "MASK",
458
+ "link": null
459
+ },
460
+ {
461
+ "name": "clip_vision",
462
+ "type": "CLIP_VISION",
463
+ "link": null
464
+ },
465
+ {
466
+ "name": "insightface",
467
+ "type": "INSIGHTFACE",
468
+ "link": null
469
+ }
470
+ ],
471
+ "outputs": [
472
+ {
473
+ "name": "MODEL",
474
+ "type": "MODEL",
475
+ "links": [
476
+ 21
477
+ ],
478
+ "shape": 3,
479
+ "slot_index": 0
480
+ }
481
+ ],
482
+ "properties": {
483
+ "Node name for S&R": "IPAdapterMS"
484
+ },
485
+ "widgets_values": [
486
+ 1,
487
+ 1,
488
+ "composition precise",
489
+ "concat",
490
+ 0,
491
+ 1,
492
+ "K+mean(V) w/ C penalty",
493
+ "0:0, 1:0, 2:0, 3:0.8, 4:0, 5:0, 6:0.35, 7:0, 8:0, 9:0, 10:0"
494
+ ]
495
+ },
496
+ {
497
+ "id": 12,
498
+ "type": "IPAdapterPreciseComposition",
499
+ "pos": [
500
+ 743,
501
+ -902
502
+ ],
503
+ "size": {
504
+ "0": 315,
505
+ "1": 278
506
+ },
507
+ "flags": {},
508
+ "order": 7,
509
+ "mode": 0,
510
+ "inputs": [
511
+ {
512
+ "name": "model",
513
+ "type": "MODEL",
514
+ "link": 22
515
+ },
516
+ {
517
+ "name": "ipadapter",
518
+ "type": "IPADAPTER",
519
+ "link": 23,
520
+ "slot_index": 1
521
+ },
522
+ {
523
+ "name": "image",
524
+ "type": "IMAGE",
525
+ "link": 24,
526
+ "slot_index": 2
527
+ },
528
+ {
529
+ "name": "image_negative",
530
+ "type": "IMAGE",
531
+ "link": null
532
+ },
533
+ {
534
+ "name": "attn_mask",
535
+ "type": "MASK",
536
+ "link": null
537
+ },
538
+ {
539
+ "name": "clip_vision",
540
+ "type": "CLIP_VISION",
541
+ "link": null
542
+ }
543
+ ],
544
+ "outputs": [
545
+ {
546
+ "name": "MODEL",
547
+ "type": "MODEL",
548
+ "links": [
549
+ 32
550
+ ],
551
+ "shape": 3,
552
+ "slot_index": 0
553
+ }
554
+ ],
555
+ "properties": {
556
+ "Node name for S&R": "IPAdapterPreciseComposition"
557
+ },
558
+ "widgets_values": [
559
+ 0.8,
560
+ 0.35000000000000003,
561
+ "concat",
562
+ 0,
563
+ 1,
564
+ "K+mean(V) w/ C penalty"
565
+ ]
566
+ },
567
+ {
568
+ "id": 16,
569
+ "type": "KSampler",
570
+ "pos": [
571
+ 1183,
572
+ -909
573
+ ],
574
+ "size": {
575
+ "0": 315,
576
+ "1": 262
577
+ },
578
+ "flags": {},
579
+ "order": 9,
580
+ "mode": 0,
581
+ "inputs": [
582
+ {
583
+ "name": "model",
584
+ "type": "MODEL",
585
+ "link": 32
586
+ },
587
+ {
588
+ "name": "positive",
589
+ "type": "CONDITIONING",
590
+ "link": 26
591
+ },
592
+ {
593
+ "name": "negative",
594
+ "type": "CONDITIONING",
595
+ "link": 27
596
+ },
597
+ {
598
+ "name": "latent_image",
599
+ "type": "LATENT",
600
+ "link": 33,
601
+ "slot_index": 3
602
+ }
603
+ ],
604
+ "outputs": [
605
+ {
606
+ "name": "LATENT",
607
+ "type": "LATENT",
608
+ "links": [
609
+ 29
610
+ ],
611
+ "slot_index": 0
612
+ }
613
+ ],
614
+ "properties": {
615
+ "Node name for S&R": "KSampler"
616
+ },
617
+ "widgets_values": [
618
+ 0,
619
+ "fixed",
620
+ 30,
621
+ 6,
622
+ "dpmpp_2m",
623
+ "karras",
624
+ 1
625
+ ]
626
+ },
627
+ {
628
+ "id": 19,
629
+ "type": "EmptyLatentImage",
630
+ "pos": [
631
+ 697,
632
+ -303
633
+ ],
634
+ "size": {
635
+ "0": 315,
636
+ "1": 106
637
+ },
638
+ "flags": {},
639
+ "order": 2,
640
+ "mode": 0,
641
+ "outputs": [
642
+ {
643
+ "name": "LATENT",
644
+ "type": "LATENT",
645
+ "links": [
646
+ 33,
647
+ 34
648
+ ],
649
+ "shape": 3,
650
+ "slot_index": 0
651
+ }
652
+ ],
653
+ "properties": {
654
+ "Node name for S&R": "EmptyLatentImage"
655
+ },
656
+ "widgets_values": [
657
+ 1024,
658
+ 1024,
659
+ 1
660
+ ]
661
+ }
662
+ ],
663
+ "links": [
664
+ [
665
+ 3,
666
+ 4,
667
+ 1,
668
+ 6,
669
+ 0,
670
+ "CLIP"
671
+ ],
672
+ [
673
+ 4,
674
+ 6,
675
+ 0,
676
+ 3,
677
+ 1,
678
+ "CONDITIONING"
679
+ ],
680
+ [
681
+ 5,
682
+ 4,
683
+ 1,
684
+ 7,
685
+ 0,
686
+ "CLIP"
687
+ ],
688
+ [
689
+ 6,
690
+ 7,
691
+ 0,
692
+ 3,
693
+ 2,
694
+ "CONDITIONING"
695
+ ],
696
+ [
697
+ 7,
698
+ 3,
699
+ 0,
700
+ 8,
701
+ 0,
702
+ "LATENT"
703
+ ],
704
+ [
705
+ 8,
706
+ 4,
707
+ 2,
708
+ 8,
709
+ 1,
710
+ "VAE"
711
+ ],
712
+ [
713
+ 10,
714
+ 8,
715
+ 0,
716
+ 10,
717
+ 0,
718
+ "IMAGE"
719
+ ],
720
+ [
721
+ 15,
722
+ 4,
723
+ 0,
724
+ 13,
725
+ 0,
726
+ "MODEL"
727
+ ],
728
+ [
729
+ 18,
730
+ 13,
731
+ 0,
732
+ 15,
733
+ 0,
734
+ "MODEL"
735
+ ],
736
+ [
737
+ 19,
738
+ 13,
739
+ 1,
740
+ 15,
741
+ 1,
742
+ "IPADAPTER"
743
+ ],
744
+ [
745
+ 20,
746
+ 14,
747
+ 0,
748
+ 15,
749
+ 2,
750
+ "IMAGE"
751
+ ],
752
+ [
753
+ 21,
754
+ 15,
755
+ 0,
756
+ 3,
757
+ 0,
758
+ "MODEL"
759
+ ],
760
+ [
761
+ 22,
762
+ 13,
763
+ 0,
764
+ 12,
765
+ 0,
766
+ "MODEL"
767
+ ],
768
+ [
769
+ 23,
770
+ 13,
771
+ 1,
772
+ 12,
773
+ 1,
774
+ "IPADAPTER"
775
+ ],
776
+ [
777
+ 24,
778
+ 14,
779
+ 0,
780
+ 12,
781
+ 2,
782
+ "IMAGE"
783
+ ],
784
+ [
785
+ 26,
786
+ 6,
787
+ 0,
788
+ 16,
789
+ 1,
790
+ "CONDITIONING"
791
+ ],
792
+ [
793
+ 27,
794
+ 7,
795
+ 0,
796
+ 16,
797
+ 2,
798
+ "CONDITIONING"
799
+ ],
800
+ [
801
+ 29,
802
+ 16,
803
+ 0,
804
+ 17,
805
+ 0,
806
+ "LATENT"
807
+ ],
808
+ [
809
+ 30,
810
+ 4,
811
+ 2,
812
+ 17,
813
+ 1,
814
+ "VAE"
815
+ ],
816
+ [
817
+ 31,
818
+ 17,
819
+ 0,
820
+ 18,
821
+ 0,
822
+ "IMAGE"
823
+ ],
824
+ [
825
+ 32,
826
+ 12,
827
+ 0,
828
+ 16,
829
+ 0,
830
+ "MODEL"
831
+ ],
832
+ [
833
+ 33,
834
+ 19,
835
+ 0,
836
+ 16,
837
+ 3,
838
+ "LATENT"
839
+ ],
840
+ [
841
+ 34,
842
+ 19,
843
+ 0,
844
+ 3,
845
+ 3,
846
+ "LATENT"
847
+ ]
848
+ ],
849
+ "groups": [],
850
+ "config": {},
851
+ "extra": {
852
+ "ds": {
853
+ "scale": 0.5644739300537773,
854
+ "offset": {
855
+ "0": 684.6661725247097,
856
+ "1": 1204.878581445502
857
+ }
858
+ }
859
+ },
860
+ "version": 0.4
861
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_precise_weight_type.json ADDED
@@ -0,0 +1,965 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 21,
3
+ "last_link_id": 32,
4
+ "nodes": [
5
+ {
6
+ "id": 7,
7
+ "type": "CLIPTextEncode",
8
+ "pos": [
9
+ 176,
10
+ 345
11
+ ],
12
+ "size": {
13
+ "0": 425.27801513671875,
14
+ "1": 180.6060791015625
15
+ },
16
+ "flags": {},
17
+ "order": 8,
18
+ "mode": 0,
19
+ "inputs": [
20
+ {
21
+ "name": "clip",
22
+ "type": "CLIP",
23
+ "link": 5
24
+ }
25
+ ],
26
+ "outputs": [
27
+ {
28
+ "name": "CONDITIONING",
29
+ "type": "CONDITIONING",
30
+ "links": [
31
+ 6,
32
+ 22
33
+ ],
34
+ "slot_index": 0
35
+ }
36
+ ],
37
+ "properties": {
38
+ "Node name for S&R": "CLIPTextEncode"
39
+ },
40
+ "widgets_values": [
41
+ "horror"
42
+ ]
43
+ },
44
+ {
45
+ "id": 15,
46
+ "type": "KSampler",
47
+ "pos": [
48
+ 1170,
49
+ 820
50
+ ],
51
+ "size": [
52
+ 315,
53
+ 262
54
+ ],
55
+ "flags": {},
56
+ "order": 12,
57
+ "mode": 0,
58
+ "inputs": [
59
+ {
60
+ "name": "model",
61
+ "type": "MODEL",
62
+ "link": 20
63
+ },
64
+ {
65
+ "name": "positive",
66
+ "type": "CONDITIONING",
67
+ "link": 21
68
+ },
69
+ {
70
+ "name": "negative",
71
+ "type": "CONDITIONING",
72
+ "link": 22
73
+ },
74
+ {
75
+ "name": "latent_image",
76
+ "type": "LATENT",
77
+ "link": 23
78
+ },
79
+ {
80
+ "name": "seed",
81
+ "type": "INT",
82
+ "link": 32,
83
+ "widget": {
84
+ "name": "seed"
85
+ }
86
+ }
87
+ ],
88
+ "outputs": [
89
+ {
90
+ "name": "LATENT",
91
+ "type": "LATENT",
92
+ "links": [
93
+ 24
94
+ ],
95
+ "slot_index": 0
96
+ }
97
+ ],
98
+ "properties": {
99
+ "Node name for S&R": "KSampler"
100
+ },
101
+ "widgets_values": [
102
+ 46,
103
+ "fixed",
104
+ 20,
105
+ 7,
106
+ "dpmpp_2m",
107
+ "karras",
108
+ 1
109
+ ]
110
+ },
111
+ {
112
+ "id": 16,
113
+ "type": "VAEDecode",
114
+ "pos": [
115
+ 1520,
116
+ 820
117
+ ],
118
+ "size": {
119
+ "0": 210,
120
+ "1": 46
121
+ },
122
+ "flags": {},
123
+ "order": 14,
124
+ "mode": 0,
125
+ "inputs": [
126
+ {
127
+ "name": "samples",
128
+ "type": "LATENT",
129
+ "link": 24
130
+ },
131
+ {
132
+ "name": "vae",
133
+ "type": "VAE",
134
+ "link": 25
135
+ }
136
+ ],
137
+ "outputs": [
138
+ {
139
+ "name": "IMAGE",
140
+ "type": "IMAGE",
141
+ "links": [
142
+ 29
143
+ ],
144
+ "slot_index": 0
145
+ }
146
+ ],
147
+ "properties": {
148
+ "Node name for S&R": "VAEDecode"
149
+ }
150
+ },
151
+ {
152
+ "id": 11,
153
+ "type": "IPAdapterUnifiedLoader",
154
+ "pos": [
155
+ -217,
156
+ 460
157
+ ],
158
+ "size": {
159
+ "0": 210,
160
+ "1": 78
161
+ },
162
+ "flags": {},
163
+ "order": 6,
164
+ "mode": 0,
165
+ "inputs": [
166
+ {
167
+ "name": "model",
168
+ "type": "MODEL",
169
+ "link": 11
170
+ },
171
+ {
172
+ "name": "ipadapter",
173
+ "type": "IPADAPTER",
174
+ "link": null
175
+ }
176
+ ],
177
+ "outputs": [
178
+ {
179
+ "name": "model",
180
+ "type": "MODEL",
181
+ "links": [
182
+ 12,
183
+ 26
184
+ ],
185
+ "shape": 3,
186
+ "slot_index": 0
187
+ },
188
+ {
189
+ "name": "ipadapter",
190
+ "type": "IPADAPTER",
191
+ "links": [
192
+ 10,
193
+ 27
194
+ ],
195
+ "shape": 3
196
+ }
197
+ ],
198
+ "properties": {
199
+ "Node name for S&R": "IPAdapterUnifiedLoader"
200
+ },
201
+ "widgets_values": [
202
+ "PLUS (high strength)"
203
+ ]
204
+ },
205
+ {
206
+ "id": 6,
207
+ "type": "CLIPTextEncode",
208
+ "pos": [
209
+ 165,
210
+ 112
211
+ ],
212
+ "size": {
213
+ "0": 422.84503173828125,
214
+ "1": 164.31304931640625
215
+ },
216
+ "flags": {},
217
+ "order": 7,
218
+ "mode": 0,
219
+ "inputs": [
220
+ {
221
+ "name": "clip",
222
+ "type": "CLIP",
223
+ "link": 3
224
+ }
225
+ ],
226
+ "outputs": [
227
+ {
228
+ "name": "CONDITIONING",
229
+ "type": "CONDITIONING",
230
+ "links": [
231
+ 4,
232
+ 21
233
+ ],
234
+ "slot_index": 0
235
+ }
236
+ ],
237
+ "properties": {
238
+ "Node name for S&R": "CLIPTextEncode"
239
+ },
240
+ "widgets_values": [
241
+ "closeup of a woman"
242
+ ]
243
+ },
244
+ {
245
+ "id": 4,
246
+ "type": "CheckpointLoaderSimple",
247
+ "pos": [
248
+ -717,
249
+ 221
250
+ ],
251
+ "size": {
252
+ "0": 315,
253
+ "1": 98
254
+ },
255
+ "flags": {},
256
+ "order": 0,
257
+ "mode": 0,
258
+ "outputs": [
259
+ {
260
+ "name": "MODEL",
261
+ "type": "MODEL",
262
+ "links": [
263
+ 11
264
+ ],
265
+ "slot_index": 0
266
+ },
267
+ {
268
+ "name": "CLIP",
269
+ "type": "CLIP",
270
+ "links": [
271
+ 3,
272
+ 5
273
+ ],
274
+ "slot_index": 1
275
+ },
276
+ {
277
+ "name": "VAE",
278
+ "type": "VAE",
279
+ "links": [
280
+ 8,
281
+ 25
282
+ ],
283
+ "slot_index": 2
284
+ }
285
+ ],
286
+ "properties": {
287
+ "Node name for S&R": "CheckpointLoaderSimple"
288
+ },
289
+ "widgets_values": [
290
+ "sdxl/ProteusV0.3.safetensors"
291
+ ]
292
+ },
293
+ {
294
+ "id": 3,
295
+ "type": "KSampler",
296
+ "pos": [
297
+ 1120,
298
+ -160
299
+ ],
300
+ "size": [
301
+ 303.1144735315229,
302
+ 234
303
+ ],
304
+ "flags": {},
305
+ "order": 11,
306
+ "mode": 0,
307
+ "inputs": [
308
+ {
309
+ "name": "model",
310
+ "type": "MODEL",
311
+ "link": 13
312
+ },
313
+ {
314
+ "name": "positive",
315
+ "type": "CONDITIONING",
316
+ "link": 4
317
+ },
318
+ {
319
+ "name": "negative",
320
+ "type": "CONDITIONING",
321
+ "link": 6
322
+ },
323
+ {
324
+ "name": "latent_image",
325
+ "type": "LATENT",
326
+ "link": 2
327
+ },
328
+ {
329
+ "name": "seed",
330
+ "type": "INT",
331
+ "link": 31,
332
+ "widget": {
333
+ "name": "seed"
334
+ },
335
+ "slot_index": 4
336
+ }
337
+ ],
338
+ "outputs": [
339
+ {
340
+ "name": "LATENT",
341
+ "type": "LATENT",
342
+ "links": [
343
+ 7
344
+ ],
345
+ "slot_index": 0
346
+ }
347
+ ],
348
+ "properties": {
349
+ "Node name for S&R": "KSampler"
350
+ },
351
+ "widgets_values": [
352
+ 46,
353
+ "fixed",
354
+ 20,
355
+ 7,
356
+ "dpmpp_2m",
357
+ "karras",
358
+ 1
359
+ ]
360
+ },
361
+ {
362
+ "id": 8,
363
+ "type": "VAEDecode",
364
+ "pos": [
365
+ 1480,
366
+ -160
367
+ ],
368
+ "size": {
369
+ "0": 210,
370
+ "1": 46
371
+ },
372
+ "flags": {},
373
+ "order": 13,
374
+ "mode": 0,
375
+ "inputs": [
376
+ {
377
+ "name": "samples",
378
+ "type": "LATENT",
379
+ "link": 7
380
+ },
381
+ {
382
+ "name": "vae",
383
+ "type": "VAE",
384
+ "link": 8
385
+ }
386
+ ],
387
+ "outputs": [
388
+ {
389
+ "name": "IMAGE",
390
+ "type": "IMAGE",
391
+ "links": [
392
+ 19
393
+ ],
394
+ "slot_index": 0
395
+ }
396
+ ],
397
+ "properties": {
398
+ "Node name for S&R": "VAEDecode"
399
+ }
400
+ },
401
+ {
402
+ "id": 13,
403
+ "type": "PreviewImage",
404
+ "pos": [
405
+ 1420,
406
+ 180
407
+ ],
408
+ "size": {
409
+ "0": 470.4912414550781,
410
+ "1": 481.162353515625
411
+ },
412
+ "flags": {},
413
+ "order": 15,
414
+ "mode": 0,
415
+ "inputs": [
416
+ {
417
+ "name": "images",
418
+ "type": "IMAGE",
419
+ "link": 19
420
+ }
421
+ ],
422
+ "properties": {
423
+ "Node name for S&R": "PreviewImage"
424
+ }
425
+ },
426
+ {
427
+ "id": 18,
428
+ "type": "PreviewImage",
429
+ "pos": [
430
+ 1944,
431
+ 185
432
+ ],
433
+ "size": {
434
+ "0": 470.4912414550781,
435
+ "1": 481.162353515625
436
+ },
437
+ "flags": {},
438
+ "order": 16,
439
+ "mode": 0,
440
+ "inputs": [
441
+ {
442
+ "name": "images",
443
+ "type": "IMAGE",
444
+ "link": 29
445
+ }
446
+ ],
447
+ "properties": {
448
+ "Node name for S&R": "PreviewImage"
449
+ }
450
+ },
451
+ {
452
+ "id": 20,
453
+ "type": "Note",
454
+ "pos": [
455
+ 1670,
456
+ 73
457
+ ],
458
+ "size": {
459
+ "0": 210,
460
+ "1": 58
461
+ },
462
+ "flags": {},
463
+ "order": 1,
464
+ "mode": 0,
465
+ "properties": {
466
+ "text": ""
467
+ },
468
+ "widgets_values": [
469
+ "Standard"
470
+ ],
471
+ "color": "#432",
472
+ "bgcolor": "#653"
473
+ },
474
+ {
475
+ "id": 21,
476
+ "type": "Note",
477
+ "pos": [
478
+ 2199,
479
+ 78
480
+ ],
481
+ "size": {
482
+ "0": 210,
483
+ "1": 58
484
+ },
485
+ "flags": {},
486
+ "order": 2,
487
+ "mode": 0,
488
+ "properties": {
489
+ "text": ""
490
+ },
491
+ "widgets_values": [
492
+ "Precise"
493
+ ],
494
+ "color": "#432",
495
+ "bgcolor": "#653"
496
+ },
497
+ {
498
+ "id": 5,
499
+ "type": "EmptyLatentImage",
500
+ "pos": [
501
+ 276,
502
+ 612
503
+ ],
504
+ "size": {
505
+ "0": 315,
506
+ "1": 106
507
+ },
508
+ "flags": {},
509
+ "order": 3,
510
+ "mode": 0,
511
+ "outputs": [
512
+ {
513
+ "name": "LATENT",
514
+ "type": "LATENT",
515
+ "links": [
516
+ 2,
517
+ 23
518
+ ],
519
+ "slot_index": 0
520
+ }
521
+ ],
522
+ "properties": {
523
+ "Node name for S&R": "EmptyLatentImage"
524
+ },
525
+ "widgets_values": [
526
+ 1024,
527
+ 1024,
528
+ 1
529
+ ]
530
+ },
531
+ {
532
+ "id": 10,
533
+ "type": "IPAdapterAdvanced",
534
+ "pos": [
535
+ 740,
536
+ -160
537
+ ],
538
+ "size": {
539
+ "0": 315,
540
+ "1": 278
541
+ },
542
+ "flags": {},
543
+ "order": 9,
544
+ "mode": 0,
545
+ "inputs": [
546
+ {
547
+ "name": "model",
548
+ "type": "MODEL",
549
+ "link": 12
550
+ },
551
+ {
552
+ "name": "ipadapter",
553
+ "type": "IPADAPTER",
554
+ "link": 10,
555
+ "slot_index": 1
556
+ },
557
+ {
558
+ "name": "image",
559
+ "type": "IMAGE",
560
+ "link": 14,
561
+ "slot_index": 2
562
+ },
563
+ {
564
+ "name": "image_negative",
565
+ "type": "IMAGE",
566
+ "link": null
567
+ },
568
+ {
569
+ "name": "attn_mask",
570
+ "type": "MASK",
571
+ "link": null
572
+ },
573
+ {
574
+ "name": "clip_vision",
575
+ "type": "CLIP_VISION",
576
+ "link": null
577
+ }
578
+ ],
579
+ "outputs": [
580
+ {
581
+ "name": "MODEL",
582
+ "type": "MODEL",
583
+ "links": [
584
+ 13
585
+ ],
586
+ "shape": 3,
587
+ "slot_index": 0
588
+ }
589
+ ],
590
+ "properties": {
591
+ "Node name for S&R": "IPAdapterAdvanced"
592
+ },
593
+ "widgets_values": [
594
+ 1,
595
+ "style transfer",
596
+ "concat",
597
+ 0,
598
+ 1,
599
+ "V only"
600
+ ]
601
+ },
602
+ {
603
+ "id": 17,
604
+ "type": "IPAdapterAdvanced",
605
+ "pos": [
606
+ 760,
607
+ 820
608
+ ],
609
+ "size": {
610
+ "0": 315,
611
+ "1": 278
612
+ },
613
+ "flags": {},
614
+ "order": 10,
615
+ "mode": 0,
616
+ "inputs": [
617
+ {
618
+ "name": "model",
619
+ "type": "MODEL",
620
+ "link": 26
621
+ },
622
+ {
623
+ "name": "ipadapter",
624
+ "type": "IPADAPTER",
625
+ "link": 27,
626
+ "slot_index": 1
627
+ },
628
+ {
629
+ "name": "image",
630
+ "type": "IMAGE",
631
+ "link": 28,
632
+ "slot_index": 2
633
+ },
634
+ {
635
+ "name": "image_negative",
636
+ "type": "IMAGE",
637
+ "link": null
638
+ },
639
+ {
640
+ "name": "attn_mask",
641
+ "type": "MASK",
642
+ "link": null
643
+ },
644
+ {
645
+ "name": "clip_vision",
646
+ "type": "CLIP_VISION",
647
+ "link": null
648
+ }
649
+ ],
650
+ "outputs": [
651
+ {
652
+ "name": "MODEL",
653
+ "type": "MODEL",
654
+ "links": [
655
+ 20
656
+ ],
657
+ "shape": 3,
658
+ "slot_index": 0
659
+ }
660
+ ],
661
+ "properties": {
662
+ "Node name for S&R": "IPAdapterAdvanced"
663
+ },
664
+ "widgets_values": [
665
+ 1,
666
+ "style transfer precise",
667
+ "concat",
668
+ 0,
669
+ 1,
670
+ "V only"
671
+ ]
672
+ },
673
+ {
674
+ "id": 12,
675
+ "type": "LoadImage",
676
+ "pos": [
677
+ -173,
678
+ -259
679
+ ],
680
+ "size": [
681
+ 210,
682
+ 314
683
+ ],
684
+ "flags": {},
685
+ "order": 4,
686
+ "mode": 0,
687
+ "outputs": [
688
+ {
689
+ "name": "IMAGE",
690
+ "type": "IMAGE",
691
+ "links": [
692
+ 14,
693
+ 28
694
+ ],
695
+ "shape": 3,
696
+ "slot_index": 0
697
+ },
698
+ {
699
+ "name": "MASK",
700
+ "type": "MASK",
701
+ "links": null,
702
+ "shape": 3
703
+ }
704
+ ],
705
+ "properties": {
706
+ "Node name for S&R": "LoadImage"
707
+ },
708
+ "widgets_values": [
709
+ "coloring_landscape.png",
710
+ "image"
711
+ ]
712
+ },
713
+ {
714
+ "id": 19,
715
+ "type": "PrimitiveNode",
716
+ "pos": [
717
+ 849,
718
+ 385
719
+ ],
720
+ "size": {
721
+ "0": 210,
722
+ "1": 82
723
+ },
724
+ "flags": {},
725
+ "order": 5,
726
+ "mode": 0,
727
+ "outputs": [
728
+ {
729
+ "name": "INT",
730
+ "type": "INT",
731
+ "links": [
732
+ 31,
733
+ 32
734
+ ],
735
+ "widget": {
736
+ "name": "seed"
737
+ },
738
+ "slot_index": 0
739
+ }
740
+ ],
741
+ "title": "seed",
742
+ "properties": {
743
+ "Run widget replace on values": false
744
+ },
745
+ "widgets_values": [
746
+ 46,
747
+ "fixed"
748
+ ]
749
+ }
750
+ ],
751
+ "links": [
752
+ [
753
+ 2,
754
+ 5,
755
+ 0,
756
+ 3,
757
+ 3,
758
+ "LATENT"
759
+ ],
760
+ [
761
+ 3,
762
+ 4,
763
+ 1,
764
+ 6,
765
+ 0,
766
+ "CLIP"
767
+ ],
768
+ [
769
+ 4,
770
+ 6,
771
+ 0,
772
+ 3,
773
+ 1,
774
+ "CONDITIONING"
775
+ ],
776
+ [
777
+ 5,
778
+ 4,
779
+ 1,
780
+ 7,
781
+ 0,
782
+ "CLIP"
783
+ ],
784
+ [
785
+ 6,
786
+ 7,
787
+ 0,
788
+ 3,
789
+ 2,
790
+ "CONDITIONING"
791
+ ],
792
+ [
793
+ 7,
794
+ 3,
795
+ 0,
796
+ 8,
797
+ 0,
798
+ "LATENT"
799
+ ],
800
+ [
801
+ 8,
802
+ 4,
803
+ 2,
804
+ 8,
805
+ 1,
806
+ "VAE"
807
+ ],
808
+ [
809
+ 10,
810
+ 11,
811
+ 1,
812
+ 10,
813
+ 1,
814
+ "IPADAPTER"
815
+ ],
816
+ [
817
+ 11,
818
+ 4,
819
+ 0,
820
+ 11,
821
+ 0,
822
+ "MODEL"
823
+ ],
824
+ [
825
+ 12,
826
+ 11,
827
+ 0,
828
+ 10,
829
+ 0,
830
+ "MODEL"
831
+ ],
832
+ [
833
+ 13,
834
+ 10,
835
+ 0,
836
+ 3,
837
+ 0,
838
+ "MODEL"
839
+ ],
840
+ [
841
+ 14,
842
+ 12,
843
+ 0,
844
+ 10,
845
+ 2,
846
+ "IMAGE"
847
+ ],
848
+ [
849
+ 19,
850
+ 8,
851
+ 0,
852
+ 13,
853
+ 0,
854
+ "IMAGE"
855
+ ],
856
+ [
857
+ 20,
858
+ 17,
859
+ 0,
860
+ 15,
861
+ 0,
862
+ "MODEL"
863
+ ],
864
+ [
865
+ 21,
866
+ 6,
867
+ 0,
868
+ 15,
869
+ 1,
870
+ "CONDITIONING"
871
+ ],
872
+ [
873
+ 22,
874
+ 7,
875
+ 0,
876
+ 15,
877
+ 2,
878
+ "CONDITIONING"
879
+ ],
880
+ [
881
+ 23,
882
+ 5,
883
+ 0,
884
+ 15,
885
+ 3,
886
+ "LATENT"
887
+ ],
888
+ [
889
+ 24,
890
+ 15,
891
+ 0,
892
+ 16,
893
+ 0,
894
+ "LATENT"
895
+ ],
896
+ [
897
+ 25,
898
+ 4,
899
+ 2,
900
+ 16,
901
+ 1,
902
+ "VAE"
903
+ ],
904
+ [
905
+ 26,
906
+ 11,
907
+ 0,
908
+ 17,
909
+ 0,
910
+ "MODEL"
911
+ ],
912
+ [
913
+ 27,
914
+ 11,
915
+ 1,
916
+ 17,
917
+ 1,
918
+ "IPADAPTER"
919
+ ],
920
+ [
921
+ 28,
922
+ 12,
923
+ 0,
924
+ 17,
925
+ 2,
926
+ "IMAGE"
927
+ ],
928
+ [
929
+ 29,
930
+ 16,
931
+ 0,
932
+ 18,
933
+ 0,
934
+ "IMAGE"
935
+ ],
936
+ [
937
+ 31,
938
+ 19,
939
+ 0,
940
+ 3,
941
+ 4,
942
+ "INT"
943
+ ],
944
+ [
945
+ 32,
946
+ 19,
947
+ 0,
948
+ 15,
949
+ 4,
950
+ "INT"
951
+ ]
952
+ ],
953
+ "groups": [],
954
+ "config": {},
955
+ "extra": {
956
+ "ds": {
957
+ "scale": 0.26333125430607984,
958
+ "offset": [
959
+ 1597.1013613507125,
960
+ 1587.4809464007888
961
+ ]
962
+ }
963
+ },
964
+ "version": 0.4
965
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_regional_conditioning.json ADDED
@@ -0,0 +1,1512 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 96,
3
+ "last_link_id": 196,
4
+ "nodes": [
5
+ {
6
+ "id": 18,
7
+ "type": "PreviewImage",
8
+ "pos": [
9
+ 2770,
10
+ 1030
11
+ ],
12
+ "size": {
13
+ "0": 874.8703002929688,
14
+ "1": 614.3541259765625
15
+ },
16
+ "flags": {},
17
+ "order": 23,
18
+ "mode": 0,
19
+ "inputs": [
20
+ {
21
+ "name": "images",
22
+ "type": "IMAGE",
23
+ "link": 12
24
+ }
25
+ ],
26
+ "properties": {
27
+ "Node name for S&R": "PreviewImage"
28
+ }
29
+ },
30
+ {
31
+ "id": 8,
32
+ "type": "VAEDecode",
33
+ "pos": [
34
+ 2750,
35
+ 890
36
+ ],
37
+ "size": {
38
+ "0": 210,
39
+ "1": 46
40
+ },
41
+ "flags": {},
42
+ "order": 22,
43
+ "mode": 0,
44
+ "inputs": [
45
+ {
46
+ "name": "samples",
47
+ "type": "LATENT",
48
+ "link": 7
49
+ },
50
+ {
51
+ "name": "vae",
52
+ "type": "VAE",
53
+ "link": 8
54
+ }
55
+ ],
56
+ "outputs": [
57
+ {
58
+ "name": "IMAGE",
59
+ "type": "IMAGE",
60
+ "links": [
61
+ 12
62
+ ],
63
+ "slot_index": 0
64
+ }
65
+ ],
66
+ "properties": {
67
+ "Node name for S&R": "VAEDecode"
68
+ }
69
+ },
70
+ {
71
+ "id": 72,
72
+ "type": "LoadImage",
73
+ "pos": [
74
+ -110,
75
+ 510
76
+ ],
77
+ "size": {
78
+ "0": 315,
79
+ "1": 314
80
+ },
81
+ "flags": {},
82
+ "order": 0,
83
+ "mode": 0,
84
+ "outputs": [
85
+ {
86
+ "name": "IMAGE",
87
+ "type": "IMAGE",
88
+ "links": [
89
+ 150
90
+ ],
91
+ "shape": 3,
92
+ "slot_index": 0
93
+ },
94
+ {
95
+ "name": "MASK",
96
+ "type": "MASK",
97
+ "links": null,
98
+ "shape": 3
99
+ }
100
+ ],
101
+ "properties": {
102
+ "Node name for S&R": "LoadImage"
103
+ },
104
+ "widgets_values": [
105
+ "mask_red_green (1).png",
106
+ "image"
107
+ ]
108
+ },
109
+ {
110
+ "id": 73,
111
+ "type": "MaskFromRGBCMYBW+",
112
+ "pos": [
113
+ 250,
114
+ 510
115
+ ],
116
+ "size": {
117
+ "0": 315,
118
+ "1": 294
119
+ },
120
+ "flags": {},
121
+ "order": 6,
122
+ "mode": 0,
123
+ "inputs": [
124
+ {
125
+ "name": "image",
126
+ "type": "IMAGE",
127
+ "link": 150
128
+ }
129
+ ],
130
+ "outputs": [
131
+ {
132
+ "name": "red",
133
+ "type": "MASK",
134
+ "links": [
135
+ 159
136
+ ],
137
+ "shape": 3,
138
+ "slot_index": 0
139
+ },
140
+ {
141
+ "name": "green",
142
+ "type": "MASK",
143
+ "links": [
144
+ 157
145
+ ],
146
+ "shape": 3,
147
+ "slot_index": 1
148
+ },
149
+ {
150
+ "name": "blue",
151
+ "type": "MASK",
152
+ "links": null,
153
+ "shape": 3
154
+ },
155
+ {
156
+ "name": "cyan",
157
+ "type": "MASK",
158
+ "links": null,
159
+ "shape": 3
160
+ },
161
+ {
162
+ "name": "magenta",
163
+ "type": "MASK",
164
+ "links": null,
165
+ "shape": 3
166
+ },
167
+ {
168
+ "name": "yellow",
169
+ "type": "MASK",
170
+ "links": null,
171
+ "shape": 3
172
+ },
173
+ {
174
+ "name": "black",
175
+ "type": "MASK",
176
+ "links": [
177
+ 161
178
+ ],
179
+ "shape": 3,
180
+ "slot_index": 6
181
+ },
182
+ {
183
+ "name": "white",
184
+ "type": "MASK",
185
+ "links": null,
186
+ "shape": 3
187
+ }
188
+ ],
189
+ "properties": {
190
+ "Node name for S&R": "MaskFromRGBCMYBW+"
191
+ },
192
+ "widgets_values": [
193
+ 0.15,
194
+ 0.15,
195
+ 0.15,
196
+ 0,
197
+ false
198
+ ]
199
+ },
200
+ {
201
+ "id": 85,
202
+ "type": "CLIPTextEncode",
203
+ "pos": [
204
+ 660,
205
+ 460
206
+ ],
207
+ "size": {
208
+ "0": 228.78353881835938,
209
+ "1": 131.52040100097656
210
+ },
211
+ "flags": {},
212
+ "order": 12,
213
+ "mode": 0,
214
+ "inputs": [
215
+ {
216
+ "name": "clip",
217
+ "type": "CLIP",
218
+ "link": 166
219
+ }
220
+ ],
221
+ "outputs": [
222
+ {
223
+ "name": "CONDITIONING",
224
+ "type": "CONDITIONING",
225
+ "links": [
226
+ 168
227
+ ],
228
+ "slot_index": 0
229
+ }
230
+ ],
231
+ "properties": {
232
+ "Node name for S&R": "CLIPTextEncode"
233
+ },
234
+ "widgets_values": [
235
+ "anime illustration of a young woman with a black jacket"
236
+ ],
237
+ "color": "#232",
238
+ "bgcolor": "#353"
239
+ },
240
+ {
241
+ "id": 87,
242
+ "type": "IPAdapterCombineParams",
243
+ "pos": [
244
+ 1547,
245
+ 291
246
+ ],
247
+ "size": {
248
+ "0": 231.11573791503906,
249
+ "1": 106
250
+ },
251
+ "flags": {},
252
+ "order": 17,
253
+ "mode": 0,
254
+ "inputs": [
255
+ {
256
+ "name": "params_1",
257
+ "type": "IPADAPTER_PARAMS",
258
+ "link": 170
259
+ },
260
+ {
261
+ "name": "params_2",
262
+ "type": "IPADAPTER_PARAMS",
263
+ "link": 171
264
+ },
265
+ {
266
+ "name": "params_3",
267
+ "type": "IPADAPTER_PARAMS",
268
+ "link": 172
269
+ },
270
+ {
271
+ "name": "params_4",
272
+ "type": "IPADAPTER_PARAMS",
273
+ "link": null
274
+ },
275
+ {
276
+ "name": "params_5",
277
+ "type": "IPADAPTER_PARAMS",
278
+ "link": null
279
+ }
280
+ ],
281
+ "outputs": [
282
+ {
283
+ "name": "IPADAPTER_PARAMS",
284
+ "type": "IPADAPTER_PARAMS",
285
+ "links": [
286
+ 181
287
+ ],
288
+ "shape": 3,
289
+ "slot_index": 0
290
+ }
291
+ ],
292
+ "properties": {
293
+ "Node name for S&R": "IPAdapterCombineParams"
294
+ }
295
+ },
296
+ {
297
+ "id": 91,
298
+ "type": "IPAdapterFromParams",
299
+ "pos": [
300
+ 1968,
301
+ 258
302
+ ],
303
+ "size": {
304
+ "0": 315,
305
+ "1": 162
306
+ },
307
+ "flags": {},
308
+ "order": 20,
309
+ "mode": 0,
310
+ "inputs": [
311
+ {
312
+ "name": "model",
313
+ "type": "MODEL",
314
+ "link": 184
315
+ },
316
+ {
317
+ "name": "ipadapter",
318
+ "type": "IPADAPTER",
319
+ "link": 182,
320
+ "slot_index": 1
321
+ },
322
+ {
323
+ "name": "ipadapter_params",
324
+ "type": "IPADAPTER_PARAMS",
325
+ "link": 181
326
+ },
327
+ {
328
+ "name": "image_negative",
329
+ "type": "IMAGE",
330
+ "link": null
331
+ },
332
+ {
333
+ "name": "clip_vision",
334
+ "type": "CLIP_VISION",
335
+ "link": null
336
+ }
337
+ ],
338
+ "outputs": [
339
+ {
340
+ "name": "MODEL",
341
+ "type": "MODEL",
342
+ "links": [
343
+ 185
344
+ ],
345
+ "shape": 3,
346
+ "slot_index": 0
347
+ }
348
+ ],
349
+ "properties": {
350
+ "Node name for S&R": "IPAdapterFromParams"
351
+ },
352
+ "widgets_values": [
353
+ "concat",
354
+ "V only"
355
+ ]
356
+ },
357
+ {
358
+ "id": 88,
359
+ "type": "ConditioningCombineMultiple+",
360
+ "pos": [
361
+ 1517,
362
+ 556
363
+ ],
364
+ "size": {
365
+ "0": 285.6000061035156,
366
+ "1": 106
367
+ },
368
+ "flags": {},
369
+ "order": 18,
370
+ "mode": 0,
371
+ "inputs": [
372
+ {
373
+ "name": "conditioning_1",
374
+ "type": "CONDITIONING",
375
+ "link": 174
376
+ },
377
+ {
378
+ "name": "conditioning_2",
379
+ "type": "CONDITIONING",
380
+ "link": 175
381
+ },
382
+ {
383
+ "name": "conditioning_3",
384
+ "type": "CONDITIONING",
385
+ "link": 176
386
+ },
387
+ {
388
+ "name": "conditioning_4",
389
+ "type": "CONDITIONING",
390
+ "link": null
391
+ },
392
+ {
393
+ "name": "conditioning_5",
394
+ "type": "CONDITIONING",
395
+ "link": null
396
+ }
397
+ ],
398
+ "outputs": [
399
+ {
400
+ "name": "CONDITIONING",
401
+ "type": "CONDITIONING",
402
+ "links": [
403
+ 186
404
+ ],
405
+ "shape": 3,
406
+ "slot_index": 0
407
+ }
408
+ ],
409
+ "properties": {
410
+ "Node name for S&R": "ConditioningCombineMultiple+"
411
+ },
412
+ "color": "#232",
413
+ "bgcolor": "#353"
414
+ },
415
+ {
416
+ "id": 89,
417
+ "type": "ConditioningCombineMultiple+",
418
+ "pos": [
419
+ 1508,
420
+ 806
421
+ ],
422
+ "size": {
423
+ "0": 285.6000061035156,
424
+ "1": 106
425
+ },
426
+ "flags": {},
427
+ "order": 19,
428
+ "mode": 0,
429
+ "inputs": [
430
+ {
431
+ "name": "conditioning_1",
432
+ "type": "CONDITIONING",
433
+ "link": 177
434
+ },
435
+ {
436
+ "name": "conditioning_2",
437
+ "type": "CONDITIONING",
438
+ "link": 178
439
+ },
440
+ {
441
+ "name": "conditioning_3",
442
+ "type": "CONDITIONING",
443
+ "link": 179
444
+ },
445
+ {
446
+ "name": "conditioning_4",
447
+ "type": "CONDITIONING",
448
+ "link": null
449
+ },
450
+ {
451
+ "name": "conditioning_5",
452
+ "type": "CONDITIONING",
453
+ "link": null
454
+ }
455
+ ],
456
+ "outputs": [
457
+ {
458
+ "name": "CONDITIONING",
459
+ "type": "CONDITIONING",
460
+ "links": [
461
+ 187
462
+ ],
463
+ "shape": 3,
464
+ "slot_index": 0
465
+ }
466
+ ],
467
+ "properties": {
468
+ "Node name for S&R": "ConditioningCombineMultiple+"
469
+ },
470
+ "color": "#322",
471
+ "bgcolor": "#533"
472
+ },
473
+ {
474
+ "id": 80,
475
+ "type": "IPAdapterRegionalConditioning",
476
+ "pos": [
477
+ 980,
478
+ 470
479
+ ],
480
+ "size": {
481
+ "0": 317.4000244140625,
482
+ "1": 214
483
+ },
484
+ "flags": {},
485
+ "order": 16,
486
+ "mode": 0,
487
+ "inputs": [
488
+ {
489
+ "name": "image",
490
+ "type": "IMAGE",
491
+ "link": 158
492
+ },
493
+ {
494
+ "name": "mask",
495
+ "type": "MASK",
496
+ "link": 159
497
+ },
498
+ {
499
+ "name": "positive",
500
+ "type": "CONDITIONING",
501
+ "link": 168
502
+ },
503
+ {
504
+ "name": "negative",
505
+ "type": "CONDITIONING",
506
+ "link": 169
507
+ }
508
+ ],
509
+ "outputs": [
510
+ {
511
+ "name": "IPADAPTER_PARAMS",
512
+ "type": "IPADAPTER_PARAMS",
513
+ "links": [
514
+ 171
515
+ ],
516
+ "shape": 3,
517
+ "slot_index": 0
518
+ },
519
+ {
520
+ "name": "POSITIVE",
521
+ "type": "CONDITIONING",
522
+ "links": [
523
+ 175
524
+ ],
525
+ "shape": 3,
526
+ "slot_index": 1
527
+ },
528
+ {
529
+ "name": "NEGATIVE",
530
+ "type": "CONDITIONING",
531
+ "links": [
532
+ 178
533
+ ],
534
+ "shape": 3,
535
+ "slot_index": 2
536
+ }
537
+ ],
538
+ "properties": {
539
+ "Node name for S&R": "IPAdapterRegionalConditioning"
540
+ },
541
+ "widgets_values": [
542
+ 0.7000000000000001,
543
+ 1,
544
+ "linear",
545
+ 0,
546
+ 1
547
+ ]
548
+ },
549
+ {
550
+ "id": 81,
551
+ "type": "IPAdapterRegionalConditioning",
552
+ "pos": [
553
+ 980,
554
+ 850
555
+ ],
556
+ "size": {
557
+ "0": 317.4000244140625,
558
+ "1": 214
559
+ },
560
+ "flags": {},
561
+ "order": 14,
562
+ "mode": 0,
563
+ "inputs": [
564
+ {
565
+ "name": "image",
566
+ "type": "IMAGE",
567
+ "link": 160
568
+ },
569
+ {
570
+ "name": "mask",
571
+ "type": "MASK",
572
+ "link": 161
573
+ },
574
+ {
575
+ "name": "positive",
576
+ "type": "CONDITIONING",
577
+ "link": null
578
+ },
579
+ {
580
+ "name": "negative",
581
+ "type": "CONDITIONING",
582
+ "link": null
583
+ }
584
+ ],
585
+ "outputs": [
586
+ {
587
+ "name": "IPADAPTER_PARAMS",
588
+ "type": "IPADAPTER_PARAMS",
589
+ "links": [
590
+ 172
591
+ ],
592
+ "shape": 3,
593
+ "slot_index": 0
594
+ },
595
+ {
596
+ "name": "POSITIVE",
597
+ "type": "CONDITIONING",
598
+ "links": null,
599
+ "shape": 3
600
+ },
601
+ {
602
+ "name": "NEGATIVE",
603
+ "type": "CONDITIONING",
604
+ "links": null,
605
+ "shape": 3
606
+ }
607
+ ],
608
+ "properties": {
609
+ "Node name for S&R": "IPAdapterRegionalConditioning"
610
+ },
611
+ "widgets_values": [
612
+ 0.7000000000000001,
613
+ 1,
614
+ "linear",
615
+ 0,
616
+ 1
617
+ ]
618
+ },
619
+ {
620
+ "id": 84,
621
+ "type": "CLIPTextEncode",
622
+ "pos": [
623
+ 652,
624
+ 220
625
+ ],
626
+ "size": {
627
+ "0": 228.78353881835938,
628
+ "1": 131.52040100097656
629
+ },
630
+ "flags": {},
631
+ "order": 11,
632
+ "mode": 0,
633
+ "inputs": [
634
+ {
635
+ "name": "clip",
636
+ "type": "CLIP",
637
+ "link": 164
638
+ }
639
+ ],
640
+ "outputs": [
641
+ {
642
+ "name": "CONDITIONING",
643
+ "type": "CONDITIONING",
644
+ "links": [
645
+ 165
646
+ ],
647
+ "slot_index": 0
648
+ }
649
+ ],
650
+ "properties": {
651
+ "Node name for S&R": "CLIPTextEncode"
652
+ },
653
+ "widgets_values": [
654
+ "anime"
655
+ ],
656
+ "color": "#322",
657
+ "bgcolor": "#533"
658
+ },
659
+ {
660
+ "id": 79,
661
+ "type": "IPAdapterRegionalConditioning",
662
+ "pos": [
663
+ 980,
664
+ 110
665
+ ],
666
+ "size": {
667
+ "0": 317.4000244140625,
668
+ "1": 214
669
+ },
670
+ "flags": {},
671
+ "order": 15,
672
+ "mode": 0,
673
+ "inputs": [
674
+ {
675
+ "name": "image",
676
+ "type": "IMAGE",
677
+ "link": 156
678
+ },
679
+ {
680
+ "name": "mask",
681
+ "type": "MASK",
682
+ "link": 157
683
+ },
684
+ {
685
+ "name": "positive",
686
+ "type": "CONDITIONING",
687
+ "link": 163
688
+ },
689
+ {
690
+ "name": "negative",
691
+ "type": "CONDITIONING",
692
+ "link": 165
693
+ }
694
+ ],
695
+ "outputs": [
696
+ {
697
+ "name": "IPADAPTER_PARAMS",
698
+ "type": "IPADAPTER_PARAMS",
699
+ "links": [
700
+ 170
701
+ ],
702
+ "shape": 3,
703
+ "slot_index": 0
704
+ },
705
+ {
706
+ "name": "POSITIVE",
707
+ "type": "CONDITIONING",
708
+ "links": [
709
+ 174
710
+ ],
711
+ "shape": 3,
712
+ "slot_index": 1
713
+ },
714
+ {
715
+ "name": "NEGATIVE",
716
+ "type": "CONDITIONING",
717
+ "links": [
718
+ 177
719
+ ],
720
+ "shape": 3,
721
+ "slot_index": 2
722
+ }
723
+ ],
724
+ "properties": {
725
+ "Node name for S&R": "IPAdapterRegionalConditioning"
726
+ },
727
+ "widgets_values": [
728
+ 0.7000000000000001,
729
+ 1,
730
+ "linear",
731
+ 0,
732
+ 1
733
+ ]
734
+ },
735
+ {
736
+ "id": 41,
737
+ "type": "CLIPTextEncode",
738
+ "pos": [
739
+ 416,
740
+ 1189
741
+ ],
742
+ "size": {
743
+ "0": 422.84503173828125,
744
+ "1": 164.31304931640625
745
+ },
746
+ "flags": {},
747
+ "order": 9,
748
+ "mode": 0,
749
+ "inputs": [
750
+ {
751
+ "name": "clip",
752
+ "type": "CLIP",
753
+ "link": 57
754
+ }
755
+ ],
756
+ "outputs": [
757
+ {
758
+ "name": "CONDITIONING",
759
+ "type": "CONDITIONING",
760
+ "links": [
761
+ 176
762
+ ],
763
+ "slot_index": 0
764
+ }
765
+ ],
766
+ "properties": {
767
+ "Node name for S&R": "CLIPTextEncode"
768
+ },
769
+ "widgets_values": [
770
+ "closeup of two girl friends shopping in a sci-fi space station\n\nhigh quality, detailed"
771
+ ],
772
+ "color": "#232",
773
+ "bgcolor": "#353"
774
+ },
775
+ {
776
+ "id": 7,
777
+ "type": "CLIPTextEncode",
778
+ "pos": [
779
+ 415,
780
+ 1429
781
+ ],
782
+ "size": {
783
+ "0": 425.27801513671875,
784
+ "1": 180.6060791015625
785
+ },
786
+ "flags": {},
787
+ "order": 8,
788
+ "mode": 0,
789
+ "inputs": [
790
+ {
791
+ "name": "clip",
792
+ "type": "CLIP",
793
+ "link": 5
794
+ }
795
+ ],
796
+ "outputs": [
797
+ {
798
+ "name": "CONDITIONING",
799
+ "type": "CONDITIONING",
800
+ "links": [
801
+ 179
802
+ ],
803
+ "slot_index": 0
804
+ }
805
+ ],
806
+ "properties": {
807
+ "Node name for S&R": "CLIPTextEncode"
808
+ },
809
+ "widgets_values": [
810
+ "blurry, lowres, photo, distorted, ill, malformed, glitch, dirt, weird, text, naked"
811
+ ],
812
+ "color": "#322",
813
+ "bgcolor": "#533"
814
+ },
815
+ {
816
+ "id": 3,
817
+ "type": "KSampler",
818
+ "pos": [
819
+ 2370,
820
+ 880
821
+ ],
822
+ "size": {
823
+ "0": 315,
824
+ "1": 262
825
+ },
826
+ "flags": {},
827
+ "order": 21,
828
+ "mode": 0,
829
+ "inputs": [
830
+ {
831
+ "name": "model",
832
+ "type": "MODEL",
833
+ "link": 185
834
+ },
835
+ {
836
+ "name": "positive",
837
+ "type": "CONDITIONING",
838
+ "link": 186
839
+ },
840
+ {
841
+ "name": "negative",
842
+ "type": "CONDITIONING",
843
+ "link": 187
844
+ },
845
+ {
846
+ "name": "latent_image",
847
+ "type": "LATENT",
848
+ "link": 149,
849
+ "slot_index": 3
850
+ }
851
+ ],
852
+ "outputs": [
853
+ {
854
+ "name": "LATENT",
855
+ "type": "LATENT",
856
+ "links": [
857
+ 7
858
+ ],
859
+ "slot_index": 0
860
+ }
861
+ ],
862
+ "properties": {
863
+ "Node name for S&R": "KSampler"
864
+ },
865
+ "widgets_values": [
866
+ 5,
867
+ "fixed",
868
+ 40,
869
+ 8,
870
+ "dpmpp_2m",
871
+ "karras",
872
+ 1
873
+ ]
874
+ },
875
+ {
876
+ "id": 4,
877
+ "type": "CheckpointLoaderSimple",
878
+ "pos": [
879
+ -113,
880
+ 968
881
+ ],
882
+ "size": {
883
+ "0": 315,
884
+ "1": 98
885
+ },
886
+ "flags": {},
887
+ "order": 1,
888
+ "mode": 0,
889
+ "outputs": [
890
+ {
891
+ "name": "MODEL",
892
+ "type": "MODEL",
893
+ "links": [
894
+ 183
895
+ ],
896
+ "slot_index": 0
897
+ },
898
+ {
899
+ "name": "CLIP",
900
+ "type": "CLIP",
901
+ "links": [
902
+ 5,
903
+ 57,
904
+ 162,
905
+ 164,
906
+ 166,
907
+ 167
908
+ ],
909
+ "slot_index": 1
910
+ },
911
+ {
912
+ "name": "VAE",
913
+ "type": "VAE",
914
+ "links": [
915
+ 8
916
+ ],
917
+ "slot_index": 2
918
+ }
919
+ ],
920
+ "properties": {
921
+ "Node name for S&R": "CheckpointLoaderSimple"
922
+ },
923
+ "widgets_values": [
924
+ "sd15/juggernaut_reborn.safetensors"
925
+ ]
926
+ },
927
+ {
928
+ "id": 69,
929
+ "type": "LoadImage",
930
+ "pos": [
931
+ -565,
932
+ 90
933
+ ],
934
+ "size": {
935
+ "0": 315,
936
+ "1": 314
937
+ },
938
+ "flags": {},
939
+ "order": 2,
940
+ "mode": 0,
941
+ "outputs": [
942
+ {
943
+ "name": "IMAGE",
944
+ "type": "IMAGE",
945
+ "links": [
946
+ 156
947
+ ],
948
+ "shape": 3,
949
+ "slot_index": 0
950
+ },
951
+ {
952
+ "name": "MASK",
953
+ "type": "MASK",
954
+ "links": null,
955
+ "shape": 3
956
+ }
957
+ ],
958
+ "properties": {
959
+ "Node name for S&R": "LoadImage"
960
+ },
961
+ "widgets_values": [
962
+ "frazetta.jpg",
963
+ "image"
964
+ ]
965
+ },
966
+ {
967
+ "id": 70,
968
+ "type": "LoadImage",
969
+ "pos": [
970
+ -571,
971
+ 463
972
+ ],
973
+ "size": {
974
+ "0": 315,
975
+ "1": 314
976
+ },
977
+ "flags": {},
978
+ "order": 3,
979
+ "mode": 0,
980
+ "outputs": [
981
+ {
982
+ "name": "IMAGE",
983
+ "type": "IMAGE",
984
+ "links": [
985
+ 158
986
+ ],
987
+ "shape": 3,
988
+ "slot_index": 0
989
+ },
990
+ {
991
+ "name": "MASK",
992
+ "type": "MASK",
993
+ "links": null,
994
+ "shape": 3
995
+ }
996
+ ],
997
+ "properties": {
998
+ "Node name for S&R": "LoadImage"
999
+ },
1000
+ "widgets_values": [
1001
+ "anime_illustration.png",
1002
+ "image"
1003
+ ]
1004
+ },
1005
+ {
1006
+ "id": 71,
1007
+ "type": "LoadImage",
1008
+ "pos": [
1009
+ -575,
1010
+ 843
1011
+ ],
1012
+ "size": {
1013
+ "0": 315,
1014
+ "1": 314
1015
+ },
1016
+ "flags": {},
1017
+ "order": 4,
1018
+ "mode": 0,
1019
+ "outputs": [
1020
+ {
1021
+ "name": "IMAGE",
1022
+ "type": "IMAGE",
1023
+ "links": [
1024
+ 160
1025
+ ],
1026
+ "shape": 3,
1027
+ "slot_index": 0
1028
+ },
1029
+ {
1030
+ "name": "MASK",
1031
+ "type": "MASK",
1032
+ "links": null,
1033
+ "shape": 3
1034
+ }
1035
+ ],
1036
+ "properties": {
1037
+ "Node name for S&R": "LoadImage"
1038
+ },
1039
+ "widgets_values": [
1040
+ "alien5.jpeg",
1041
+ "image"
1042
+ ]
1043
+ },
1044
+ {
1045
+ "id": 83,
1046
+ "type": "CLIPTextEncode",
1047
+ "pos": [
1048
+ 649,
1049
+ 35
1050
+ ],
1051
+ "size": {
1052
+ "0": 228.78353881835938,
1053
+ "1": 131.52040100097656
1054
+ },
1055
+ "flags": {},
1056
+ "order": 10,
1057
+ "mode": 0,
1058
+ "inputs": [
1059
+ {
1060
+ "name": "clip",
1061
+ "type": "CLIP",
1062
+ "link": 162
1063
+ }
1064
+ ],
1065
+ "outputs": [
1066
+ {
1067
+ "name": "CONDITIONING",
1068
+ "type": "CONDITIONING",
1069
+ "links": [
1070
+ 163
1071
+ ],
1072
+ "slot_index": 0
1073
+ }
1074
+ ],
1075
+ "properties": {
1076
+ "Node name for S&R": "CLIPTextEncode"
1077
+ },
1078
+ "widgets_values": [
1079
+ "illustration of a blonde woman with beautiful eyes"
1080
+ ],
1081
+ "color": "#232",
1082
+ "bgcolor": "#353"
1083
+ },
1084
+ {
1085
+ "id": 86,
1086
+ "type": "CLIPTextEncode",
1087
+ "pos": [
1088
+ 653,
1089
+ 640
1090
+ ],
1091
+ "size": {
1092
+ "0": 228.78353881835938,
1093
+ "1": 131.52040100097656
1094
+ },
1095
+ "flags": {},
1096
+ "order": 13,
1097
+ "mode": 0,
1098
+ "inputs": [
1099
+ {
1100
+ "name": "clip",
1101
+ "type": "CLIP",
1102
+ "link": 167
1103
+ }
1104
+ ],
1105
+ "outputs": [
1106
+ {
1107
+ "name": "CONDITIONING",
1108
+ "type": "CONDITIONING",
1109
+ "links": [
1110
+ 169
1111
+ ],
1112
+ "slot_index": 0
1113
+ }
1114
+ ],
1115
+ "properties": {
1116
+ "Node name for S&R": "CLIPTextEncode"
1117
+ },
1118
+ "widgets_values": [
1119
+ "(dirt, scar, tattoo:1.1)"
1120
+ ],
1121
+ "color": "#322",
1122
+ "bgcolor": "#533"
1123
+ },
1124
+ {
1125
+ "id": 68,
1126
+ "type": "EmptyLatentImage",
1127
+ "pos": [
1128
+ 1978,
1129
+ 1033
1130
+ ],
1131
+ "size": {
1132
+ "0": 315,
1133
+ "1": 106
1134
+ },
1135
+ "flags": {},
1136
+ "order": 5,
1137
+ "mode": 0,
1138
+ "outputs": [
1139
+ {
1140
+ "name": "LATENT",
1141
+ "type": "LATENT",
1142
+ "links": [
1143
+ 149
1144
+ ],
1145
+ "shape": 3
1146
+ }
1147
+ ],
1148
+ "properties": {
1149
+ "Node name for S&R": "EmptyLatentImage"
1150
+ },
1151
+ "widgets_values": [
1152
+ 768,
1153
+ 512,
1154
+ 1
1155
+ ]
1156
+ },
1157
+ {
1158
+ "id": 92,
1159
+ "type": "IPAdapterUnifiedLoader",
1160
+ "pos": [
1161
+ 1539,
1162
+ 91
1163
+ ],
1164
+ "size": {
1165
+ "0": 315,
1166
+ "1": 78
1167
+ },
1168
+ "flags": {},
1169
+ "order": 7,
1170
+ "mode": 0,
1171
+ "inputs": [
1172
+ {
1173
+ "name": "model",
1174
+ "type": "MODEL",
1175
+ "link": 183
1176
+ },
1177
+ {
1178
+ "name": "ipadapter",
1179
+ "type": "IPADAPTER",
1180
+ "link": null
1181
+ }
1182
+ ],
1183
+ "outputs": [
1184
+ {
1185
+ "name": "model",
1186
+ "type": "MODEL",
1187
+ "links": [
1188
+ 184
1189
+ ],
1190
+ "shape": 3,
1191
+ "slot_index": 0
1192
+ },
1193
+ {
1194
+ "name": "ipadapter",
1195
+ "type": "IPADAPTER",
1196
+ "links": [
1197
+ 182
1198
+ ],
1199
+ "shape": 3
1200
+ }
1201
+ ],
1202
+ "properties": {
1203
+ "Node name for S&R": "IPAdapterUnifiedLoader"
1204
+ },
1205
+ "widgets_values": [
1206
+ "PLUS (high strength)"
1207
+ ]
1208
+ }
1209
+ ],
1210
+ "links": [
1211
+ [
1212
+ 5,
1213
+ 4,
1214
+ 1,
1215
+ 7,
1216
+ 0,
1217
+ "CLIP"
1218
+ ],
1219
+ [
1220
+ 7,
1221
+ 3,
1222
+ 0,
1223
+ 8,
1224
+ 0,
1225
+ "LATENT"
1226
+ ],
1227
+ [
1228
+ 8,
1229
+ 4,
1230
+ 2,
1231
+ 8,
1232
+ 1,
1233
+ "VAE"
1234
+ ],
1235
+ [
1236
+ 12,
1237
+ 8,
1238
+ 0,
1239
+ 18,
1240
+ 0,
1241
+ "IMAGE"
1242
+ ],
1243
+ [
1244
+ 57,
1245
+ 4,
1246
+ 1,
1247
+ 41,
1248
+ 0,
1249
+ "CLIP"
1250
+ ],
1251
+ [
1252
+ 149,
1253
+ 68,
1254
+ 0,
1255
+ 3,
1256
+ 3,
1257
+ "LATENT"
1258
+ ],
1259
+ [
1260
+ 150,
1261
+ 72,
1262
+ 0,
1263
+ 73,
1264
+ 0,
1265
+ "IMAGE"
1266
+ ],
1267
+ [
1268
+ 156,
1269
+ 69,
1270
+ 0,
1271
+ 79,
1272
+ 0,
1273
+ "IMAGE"
1274
+ ],
1275
+ [
1276
+ 157,
1277
+ 73,
1278
+ 1,
1279
+ 79,
1280
+ 1,
1281
+ "MASK"
1282
+ ],
1283
+ [
1284
+ 158,
1285
+ 70,
1286
+ 0,
1287
+ 80,
1288
+ 0,
1289
+ "IMAGE"
1290
+ ],
1291
+ [
1292
+ 159,
1293
+ 73,
1294
+ 0,
1295
+ 80,
1296
+ 1,
1297
+ "MASK"
1298
+ ],
1299
+ [
1300
+ 160,
1301
+ 71,
1302
+ 0,
1303
+ 81,
1304
+ 0,
1305
+ "IMAGE"
1306
+ ],
1307
+ [
1308
+ 161,
1309
+ 73,
1310
+ 6,
1311
+ 81,
1312
+ 1,
1313
+ "MASK"
1314
+ ],
1315
+ [
1316
+ 162,
1317
+ 4,
1318
+ 1,
1319
+ 83,
1320
+ 0,
1321
+ "CLIP"
1322
+ ],
1323
+ [
1324
+ 163,
1325
+ 83,
1326
+ 0,
1327
+ 79,
1328
+ 2,
1329
+ "CONDITIONING"
1330
+ ],
1331
+ [
1332
+ 164,
1333
+ 4,
1334
+ 1,
1335
+ 84,
1336
+ 0,
1337
+ "CLIP"
1338
+ ],
1339
+ [
1340
+ 165,
1341
+ 84,
1342
+ 0,
1343
+ 79,
1344
+ 3,
1345
+ "CONDITIONING"
1346
+ ],
1347
+ [
1348
+ 166,
1349
+ 4,
1350
+ 1,
1351
+ 85,
1352
+ 0,
1353
+ "CLIP"
1354
+ ],
1355
+ [
1356
+ 167,
1357
+ 4,
1358
+ 1,
1359
+ 86,
1360
+ 0,
1361
+ "CLIP"
1362
+ ],
1363
+ [
1364
+ 168,
1365
+ 85,
1366
+ 0,
1367
+ 80,
1368
+ 2,
1369
+ "CONDITIONING"
1370
+ ],
1371
+ [
1372
+ 169,
1373
+ 86,
1374
+ 0,
1375
+ 80,
1376
+ 3,
1377
+ "CONDITIONING"
1378
+ ],
1379
+ [
1380
+ 170,
1381
+ 79,
1382
+ 0,
1383
+ 87,
1384
+ 0,
1385
+ "IPADAPTER_PARAMS"
1386
+ ],
1387
+ [
1388
+ 171,
1389
+ 80,
1390
+ 0,
1391
+ 87,
1392
+ 1,
1393
+ "IPADAPTER_PARAMS"
1394
+ ],
1395
+ [
1396
+ 172,
1397
+ 81,
1398
+ 0,
1399
+ 87,
1400
+ 2,
1401
+ "IPADAPTER_PARAMS"
1402
+ ],
1403
+ [
1404
+ 174,
1405
+ 79,
1406
+ 1,
1407
+ 88,
1408
+ 0,
1409
+ "CONDITIONING"
1410
+ ],
1411
+ [
1412
+ 175,
1413
+ 80,
1414
+ 1,
1415
+ 88,
1416
+ 1,
1417
+ "CONDITIONING"
1418
+ ],
1419
+ [
1420
+ 176,
1421
+ 41,
1422
+ 0,
1423
+ 88,
1424
+ 2,
1425
+ "CONDITIONING"
1426
+ ],
1427
+ [
1428
+ 177,
1429
+ 79,
1430
+ 2,
1431
+ 89,
1432
+ 0,
1433
+ "CONDITIONING"
1434
+ ],
1435
+ [
1436
+ 178,
1437
+ 80,
1438
+ 2,
1439
+ 89,
1440
+ 1,
1441
+ "CONDITIONING"
1442
+ ],
1443
+ [
1444
+ 179,
1445
+ 7,
1446
+ 0,
1447
+ 89,
1448
+ 2,
1449
+ "CONDITIONING"
1450
+ ],
1451
+ [
1452
+ 181,
1453
+ 87,
1454
+ 0,
1455
+ 91,
1456
+ 2,
1457
+ "IPADAPTER_PARAMS"
1458
+ ],
1459
+ [
1460
+ 182,
1461
+ 92,
1462
+ 1,
1463
+ 91,
1464
+ 1,
1465
+ "IPADAPTER"
1466
+ ],
1467
+ [
1468
+ 183,
1469
+ 4,
1470
+ 0,
1471
+ 92,
1472
+ 0,
1473
+ "MODEL"
1474
+ ],
1475
+ [
1476
+ 184,
1477
+ 92,
1478
+ 0,
1479
+ 91,
1480
+ 0,
1481
+ "MODEL"
1482
+ ],
1483
+ [
1484
+ 185,
1485
+ 91,
1486
+ 0,
1487
+ 3,
1488
+ 0,
1489
+ "MODEL"
1490
+ ],
1491
+ [
1492
+ 186,
1493
+ 88,
1494
+ 0,
1495
+ 3,
1496
+ 1,
1497
+ "CONDITIONING"
1498
+ ],
1499
+ [
1500
+ 187,
1501
+ 89,
1502
+ 0,
1503
+ 3,
1504
+ 2,
1505
+ "CONDITIONING"
1506
+ ]
1507
+ ],
1508
+ "groups": [],
1509
+ "config": {},
1510
+ "extra": {},
1511
+ "version": 0.4
1512
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_simple.json ADDED
@@ -0,0 +1,546 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 13,
3
+ "last_link_id": 17,
4
+ "nodes": [
5
+ {
6
+ "id": 11,
7
+ "type": "IPAdapterUnifiedLoader",
8
+ "pos": [
9
+ 440,
10
+ 440
11
+ ],
12
+ "size": {
13
+ "0": 315,
14
+ "1": 78
15
+ },
16
+ "flags": {},
17
+ "order": 3,
18
+ "mode": 0,
19
+ "inputs": [
20
+ {
21
+ "name": "model",
22
+ "type": "MODEL",
23
+ "link": 10
24
+ },
25
+ {
26
+ "name": "ipadapter",
27
+ "type": "IPADAPTER",
28
+ "link": null
29
+ }
30
+ ],
31
+ "outputs": [
32
+ {
33
+ "name": "model",
34
+ "type": "MODEL",
35
+ "links": [
36
+ 11
37
+ ],
38
+ "shape": 3,
39
+ "slot_index": 0
40
+ },
41
+ {
42
+ "name": "ipadapter",
43
+ "type": "IPADAPTER",
44
+ "links": [
45
+ 12
46
+ ],
47
+ "shape": 3,
48
+ "slot_index": 1
49
+ }
50
+ ],
51
+ "properties": {
52
+ "Node name for S&R": "IPAdapterUnifiedLoader"
53
+ },
54
+ "widgets_values": [
55
+ "PLUS (high strength)"
56
+ ]
57
+ },
58
+ {
59
+ "id": 4,
60
+ "type": "CheckpointLoaderSimple",
61
+ "pos": [
62
+ 50,
63
+ 730
64
+ ],
65
+ "size": {
66
+ "0": 315,
67
+ "1": 98
68
+ },
69
+ "flags": {},
70
+ "order": 0,
71
+ "mode": 0,
72
+ "outputs": [
73
+ {
74
+ "name": "MODEL",
75
+ "type": "MODEL",
76
+ "links": [
77
+ 10
78
+ ],
79
+ "slot_index": 0
80
+ },
81
+ {
82
+ "name": "CLIP",
83
+ "type": "CLIP",
84
+ "links": [
85
+ 3,
86
+ 5
87
+ ],
88
+ "slot_index": 1
89
+ },
90
+ {
91
+ "name": "VAE",
92
+ "type": "VAE",
93
+ "links": [
94
+ 8
95
+ ],
96
+ "slot_index": 2
97
+ }
98
+ ],
99
+ "properties": {
100
+ "Node name for S&R": "CheckpointLoaderSimple"
101
+ },
102
+ "widgets_values": [
103
+ "sd15/realisticVisionV51_v51VAE.safetensors"
104
+ ]
105
+ },
106
+ {
107
+ "id": 12,
108
+ "type": "LoadImage",
109
+ "pos": [
110
+ 440,
111
+ 60
112
+ ],
113
+ "size": [
114
+ 315,
115
+ 314
116
+ ],
117
+ "flags": {},
118
+ "order": 1,
119
+ "mode": 0,
120
+ "outputs": [
121
+ {
122
+ "name": "IMAGE",
123
+ "type": "IMAGE",
124
+ "links": [
125
+ 17
126
+ ],
127
+ "shape": 3
128
+ },
129
+ {
130
+ "name": "MASK",
131
+ "type": "MASK",
132
+ "links": null,
133
+ "shape": 3
134
+ }
135
+ ],
136
+ "properties": {
137
+ "Node name for S&R": "LoadImage"
138
+ },
139
+ "widgets_values": [
140
+ "warrior_woman.png",
141
+ "image"
142
+ ]
143
+ },
144
+ {
145
+ "id": 3,
146
+ "type": "KSampler",
147
+ "pos": [
148
+ 1210,
149
+ 700
150
+ ],
151
+ "size": {
152
+ "0": 315,
153
+ "1": 262
154
+ },
155
+ "flags": {},
156
+ "order": 7,
157
+ "mode": 0,
158
+ "inputs": [
159
+ {
160
+ "name": "model",
161
+ "type": "MODEL",
162
+ "link": 13
163
+ },
164
+ {
165
+ "name": "positive",
166
+ "type": "CONDITIONING",
167
+ "link": 4
168
+ },
169
+ {
170
+ "name": "negative",
171
+ "type": "CONDITIONING",
172
+ "link": 6
173
+ },
174
+ {
175
+ "name": "latent_image",
176
+ "type": "LATENT",
177
+ "link": 2
178
+ }
179
+ ],
180
+ "outputs": [
181
+ {
182
+ "name": "LATENT",
183
+ "type": "LATENT",
184
+ "links": [
185
+ 7
186
+ ],
187
+ "slot_index": 0
188
+ }
189
+ ],
190
+ "properties": {
191
+ "Node name for S&R": "KSampler"
192
+ },
193
+ "widgets_values": [
194
+ 0,
195
+ "fixed",
196
+ 30,
197
+ 6.5,
198
+ "dpmpp_2m",
199
+ "karras",
200
+ 1
201
+ ]
202
+ },
203
+ {
204
+ "id": 6,
205
+ "type": "CLIPTextEncode",
206
+ "pos": [
207
+ 690,
208
+ 610
209
+ ],
210
+ "size": {
211
+ "0": 422.84503173828125,
212
+ "1": 164.31304931640625
213
+ },
214
+ "flags": {},
215
+ "order": 4,
216
+ "mode": 0,
217
+ "inputs": [
218
+ {
219
+ "name": "clip",
220
+ "type": "CLIP",
221
+ "link": 3
222
+ }
223
+ ],
224
+ "outputs": [
225
+ {
226
+ "name": "CONDITIONING",
227
+ "type": "CONDITIONING",
228
+ "links": [
229
+ 4
230
+ ],
231
+ "slot_index": 0
232
+ }
233
+ ],
234
+ "properties": {
235
+ "Node name for S&R": "CLIPTextEncode"
236
+ },
237
+ "widgets_values": [
238
+ "closeup of a fierce warrior woman wearing a full armor at the end of a battle\n\nhigh quality, detailed"
239
+ ]
240
+ },
241
+ {
242
+ "id": 10,
243
+ "type": "IPAdapter",
244
+ "pos": [
245
+ 820,
246
+ 350
247
+ ],
248
+ "size": {
249
+ "0": 315,
250
+ "1": 166
251
+ },
252
+ "flags": {},
253
+ "order": 6,
254
+ "mode": 0,
255
+ "inputs": [
256
+ {
257
+ "name": "model",
258
+ "type": "MODEL",
259
+ "link": 11
260
+ },
261
+ {
262
+ "name": "ipadapter",
263
+ "type": "IPADAPTER",
264
+ "link": 12
265
+ },
266
+ {
267
+ "name": "image",
268
+ "type": "IMAGE",
269
+ "link": 17,
270
+ "slot_index": 2
271
+ },
272
+ {
273
+ "name": "attn_mask",
274
+ "type": "MASK",
275
+ "link": null
276
+ }
277
+ ],
278
+ "outputs": [
279
+ {
280
+ "name": "MODEL",
281
+ "type": "MODEL",
282
+ "links": [
283
+ 13
284
+ ],
285
+ "shape": 3,
286
+ "slot_index": 0
287
+ }
288
+ ],
289
+ "properties": {
290
+ "Node name for S&R": "IPAdapter"
291
+ },
292
+ "widgets_values": [
293
+ 0.8,
294
+ 0,
295
+ 1
296
+ ]
297
+ },
298
+ {
299
+ "id": 9,
300
+ "type": "SaveImage",
301
+ "pos": [
302
+ 1770,
303
+ 710
304
+ ],
305
+ "size": [
306
+ 529.7760009765616,
307
+ 582.3048192804504
308
+ ],
309
+ "flags": {},
310
+ "order": 9,
311
+ "mode": 0,
312
+ "inputs": [
313
+ {
314
+ "name": "images",
315
+ "type": "IMAGE",
316
+ "link": 9
317
+ }
318
+ ],
319
+ "properties": {},
320
+ "widgets_values": [
321
+ "IPAdapter"
322
+ ]
323
+ },
324
+ {
325
+ "id": 7,
326
+ "type": "CLIPTextEncode",
327
+ "pos": [
328
+ 690,
329
+ 840
330
+ ],
331
+ "size": {
332
+ "0": 425.27801513671875,
333
+ "1": 180.6060791015625
334
+ },
335
+ "flags": {},
336
+ "order": 5,
337
+ "mode": 0,
338
+ "inputs": [
339
+ {
340
+ "name": "clip",
341
+ "type": "CLIP",
342
+ "link": 5
343
+ }
344
+ ],
345
+ "outputs": [
346
+ {
347
+ "name": "CONDITIONING",
348
+ "type": "CONDITIONING",
349
+ "links": [
350
+ 6
351
+ ],
352
+ "slot_index": 0
353
+ }
354
+ ],
355
+ "properties": {
356
+ "Node name for S&R": "CLIPTextEncode"
357
+ },
358
+ "widgets_values": [
359
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed"
360
+ ]
361
+ },
362
+ {
363
+ "id": 8,
364
+ "type": "VAEDecode",
365
+ "pos": [
366
+ 1570,
367
+ 700
368
+ ],
369
+ "size": [
370
+ 140,
371
+ 46
372
+ ],
373
+ "flags": {},
374
+ "order": 8,
375
+ "mode": 0,
376
+ "inputs": [
377
+ {
378
+ "name": "samples",
379
+ "type": "LATENT",
380
+ "link": 7
381
+ },
382
+ {
383
+ "name": "vae",
384
+ "type": "VAE",
385
+ "link": 8
386
+ }
387
+ ],
388
+ "outputs": [
389
+ {
390
+ "name": "IMAGE",
391
+ "type": "IMAGE",
392
+ "links": [
393
+ 9
394
+ ],
395
+ "slot_index": 0
396
+ }
397
+ ],
398
+ "properties": {
399
+ "Node name for S&R": "VAEDecode"
400
+ }
401
+ },
402
+ {
403
+ "id": 5,
404
+ "type": "EmptyLatentImage",
405
+ "pos": [
406
+ 801,
407
+ 1097
408
+ ],
409
+ "size": {
410
+ "0": 315,
411
+ "1": 106
412
+ },
413
+ "flags": {},
414
+ "order": 2,
415
+ "mode": 0,
416
+ "outputs": [
417
+ {
418
+ "name": "LATENT",
419
+ "type": "LATENT",
420
+ "links": [
421
+ 2
422
+ ],
423
+ "slot_index": 0
424
+ }
425
+ ],
426
+ "properties": {
427
+ "Node name for S&R": "EmptyLatentImage"
428
+ },
429
+ "widgets_values": [
430
+ 512,
431
+ 512,
432
+ 1
433
+ ]
434
+ }
435
+ ],
436
+ "links": [
437
+ [
438
+ 2,
439
+ 5,
440
+ 0,
441
+ 3,
442
+ 3,
443
+ "LATENT"
444
+ ],
445
+ [
446
+ 3,
447
+ 4,
448
+ 1,
449
+ 6,
450
+ 0,
451
+ "CLIP"
452
+ ],
453
+ [
454
+ 4,
455
+ 6,
456
+ 0,
457
+ 3,
458
+ 1,
459
+ "CONDITIONING"
460
+ ],
461
+ [
462
+ 5,
463
+ 4,
464
+ 1,
465
+ 7,
466
+ 0,
467
+ "CLIP"
468
+ ],
469
+ [
470
+ 6,
471
+ 7,
472
+ 0,
473
+ 3,
474
+ 2,
475
+ "CONDITIONING"
476
+ ],
477
+ [
478
+ 7,
479
+ 3,
480
+ 0,
481
+ 8,
482
+ 0,
483
+ "LATENT"
484
+ ],
485
+ [
486
+ 8,
487
+ 4,
488
+ 2,
489
+ 8,
490
+ 1,
491
+ "VAE"
492
+ ],
493
+ [
494
+ 9,
495
+ 8,
496
+ 0,
497
+ 9,
498
+ 0,
499
+ "IMAGE"
500
+ ],
501
+ [
502
+ 10,
503
+ 4,
504
+ 0,
505
+ 11,
506
+ 0,
507
+ "MODEL"
508
+ ],
509
+ [
510
+ 11,
511
+ 11,
512
+ 0,
513
+ 10,
514
+ 0,
515
+ "MODEL"
516
+ ],
517
+ [
518
+ 12,
519
+ 11,
520
+ 1,
521
+ 10,
522
+ 1,
523
+ "IPADAPTER"
524
+ ],
525
+ [
526
+ 13,
527
+ 10,
528
+ 0,
529
+ 3,
530
+ 0,
531
+ "MODEL"
532
+ ],
533
+ [
534
+ 17,
535
+ 12,
536
+ 0,
537
+ 10,
538
+ 2,
539
+ "IMAGE"
540
+ ]
541
+ ],
542
+ "groups": [],
543
+ "config": {},
544
+ "extra": {},
545
+ "version": 0.4
546
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_style_composition.json ADDED
@@ -0,0 +1,612 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 16,
3
+ "last_link_id": 25,
4
+ "nodes": [
5
+ {
6
+ "id": 7,
7
+ "type": "CLIPTextEncode",
8
+ "pos": [
9
+ 690,
10
+ 840
11
+ ],
12
+ "size": {
13
+ "0": 425.27801513671875,
14
+ "1": 180.6060791015625
15
+ },
16
+ "flags": {},
17
+ "order": 6,
18
+ "mode": 0,
19
+ "inputs": [
20
+ {
21
+ "name": "clip",
22
+ "type": "CLIP",
23
+ "link": 5
24
+ }
25
+ ],
26
+ "outputs": [
27
+ {
28
+ "name": "CONDITIONING",
29
+ "type": "CONDITIONING",
30
+ "links": [
31
+ 6
32
+ ],
33
+ "slot_index": 0
34
+ }
35
+ ],
36
+ "properties": {
37
+ "Node name for S&R": "CLIPTextEncode"
38
+ },
39
+ "widgets_values": [
40
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed"
41
+ ]
42
+ },
43
+ {
44
+ "id": 11,
45
+ "type": "IPAdapterUnifiedLoader",
46
+ "pos": [
47
+ 335,
48
+ 430
49
+ ],
50
+ "size": {
51
+ "0": 315,
52
+ "1": 78
53
+ },
54
+ "flags": {},
55
+ "order": 4,
56
+ "mode": 0,
57
+ "inputs": [
58
+ {
59
+ "name": "model",
60
+ "type": "MODEL",
61
+ "link": 10
62
+ },
63
+ {
64
+ "name": "ipadapter",
65
+ "type": "IPADAPTER",
66
+ "link": null
67
+ }
68
+ ],
69
+ "outputs": [
70
+ {
71
+ "name": "model",
72
+ "type": "MODEL",
73
+ "links": [
74
+ 21
75
+ ],
76
+ "shape": 3,
77
+ "slot_index": 0
78
+ },
79
+ {
80
+ "name": "ipadapter",
81
+ "type": "IPADAPTER",
82
+ "links": [
83
+ 22
84
+ ],
85
+ "shape": 3,
86
+ "slot_index": 1
87
+ }
88
+ ],
89
+ "properties": {
90
+ "Node name for S&R": "IPAdapterUnifiedLoader"
91
+ },
92
+ "widgets_values": [
93
+ "PLUS (high strength)"
94
+ ]
95
+ },
96
+ {
97
+ "id": 12,
98
+ "type": "LoadImage",
99
+ "pos": [
100
+ -102,
101
+ -46
102
+ ],
103
+ "size": {
104
+ "0": 315,
105
+ "1": 314
106
+ },
107
+ "flags": {},
108
+ "order": 0,
109
+ "mode": 0,
110
+ "outputs": [
111
+ {
112
+ "name": "IMAGE",
113
+ "type": "IMAGE",
114
+ "links": [
115
+ 25
116
+ ],
117
+ "shape": 3,
118
+ "slot_index": 0
119
+ },
120
+ {
121
+ "name": "MASK",
122
+ "type": "MASK",
123
+ "links": null,
124
+ "shape": 3
125
+ }
126
+ ],
127
+ "properties": {
128
+ "Node name for S&R": "LoadImage"
129
+ },
130
+ "widgets_values": [
131
+ "black_car.jpg",
132
+ "image"
133
+ ]
134
+ },
135
+ {
136
+ "id": 16,
137
+ "type": "LoadImage",
138
+ "pos": [
139
+ 310,
140
+ -40
141
+ ],
142
+ "size": {
143
+ "0": 315,
144
+ "1": 314
145
+ },
146
+ "flags": {},
147
+ "order": 1,
148
+ "mode": 0,
149
+ "outputs": [
150
+ {
151
+ "name": "IMAGE",
152
+ "type": "IMAGE",
153
+ "links": [
154
+ 24
155
+ ],
156
+ "shape": 3,
157
+ "slot_index": 0
158
+ },
159
+ {
160
+ "name": "MASK",
161
+ "type": "MASK",
162
+ "links": null,
163
+ "shape": 3
164
+ }
165
+ ],
166
+ "properties": {
167
+ "Node name for S&R": "LoadImage"
168
+ },
169
+ "widgets_values": [
170
+ "bw_texture_waves.jpg",
171
+ "image"
172
+ ]
173
+ },
174
+ {
175
+ "id": 5,
176
+ "type": "EmptyLatentImage",
177
+ "pos": [
178
+ 801,
179
+ 1097
180
+ ],
181
+ "size": {
182
+ "0": 315,
183
+ "1": 106
184
+ },
185
+ "flags": {},
186
+ "order": 2,
187
+ "mode": 0,
188
+ "outputs": [
189
+ {
190
+ "name": "LATENT",
191
+ "type": "LATENT",
192
+ "links": [
193
+ 2
194
+ ],
195
+ "slot_index": 0
196
+ }
197
+ ],
198
+ "properties": {
199
+ "Node name for S&R": "EmptyLatentImage"
200
+ },
201
+ "widgets_values": [
202
+ 1024,
203
+ 1024,
204
+ 1
205
+ ]
206
+ },
207
+ {
208
+ "id": 6,
209
+ "type": "CLIPTextEncode",
210
+ "pos": [
211
+ 690,
212
+ 610
213
+ ],
214
+ "size": {
215
+ "0": 422.84503173828125,
216
+ "1": 164.31304931640625
217
+ },
218
+ "flags": {},
219
+ "order": 5,
220
+ "mode": 0,
221
+ "inputs": [
222
+ {
223
+ "name": "clip",
224
+ "type": "CLIP",
225
+ "link": 3
226
+ }
227
+ ],
228
+ "outputs": [
229
+ {
230
+ "name": "CONDITIONING",
231
+ "type": "CONDITIONING",
232
+ "links": [
233
+ 4
234
+ ],
235
+ "slot_index": 0
236
+ }
237
+ ],
238
+ "properties": {
239
+ "Node name for S&R": "CLIPTextEncode"
240
+ },
241
+ "widgets_values": [
242
+ "sports car running fast on the highway\n\nhigh quality, detailed"
243
+ ]
244
+ },
245
+ {
246
+ "id": 15,
247
+ "type": "IPAdapterStyleComposition",
248
+ "pos": [
249
+ 772,
250
+ 219
251
+ ],
252
+ "size": {
253
+ "0": 315,
254
+ "1": 322
255
+ },
256
+ "flags": {},
257
+ "order": 7,
258
+ "mode": 0,
259
+ "inputs": [
260
+ {
261
+ "name": "model",
262
+ "type": "MODEL",
263
+ "link": 21
264
+ },
265
+ {
266
+ "name": "ipadapter",
267
+ "type": "IPADAPTER",
268
+ "link": 22
269
+ },
270
+ {
271
+ "name": "image_style",
272
+ "type": "IMAGE",
273
+ "link": 24
274
+ },
275
+ {
276
+ "name": "image_composition",
277
+ "type": "IMAGE",
278
+ "link": 25
279
+ },
280
+ {
281
+ "name": "image_negative",
282
+ "type": "IMAGE",
283
+ "link": null
284
+ },
285
+ {
286
+ "name": "attn_mask",
287
+ "type": "MASK",
288
+ "link": null
289
+ },
290
+ {
291
+ "name": "clip_vision",
292
+ "type": "CLIP_VISION",
293
+ "link": null
294
+ }
295
+ ],
296
+ "outputs": [
297
+ {
298
+ "name": "MODEL",
299
+ "type": "MODEL",
300
+ "links": [
301
+ 23
302
+ ],
303
+ "shape": 3,
304
+ "slot_index": 0
305
+ }
306
+ ],
307
+ "properties": {
308
+ "Node name for S&R": "IPAdapterStyleComposition"
309
+ },
310
+ "widgets_values": [
311
+ 1.2,
312
+ 1,
313
+ false,
314
+ "average",
315
+ 0,
316
+ 1,
317
+ "V only"
318
+ ]
319
+ },
320
+ {
321
+ "id": 3,
322
+ "type": "KSampler",
323
+ "pos": [
324
+ 1247,
325
+ 586
326
+ ],
327
+ "size": {
328
+ "0": 315,
329
+ "1": 262
330
+ },
331
+ "flags": {},
332
+ "order": 8,
333
+ "mode": 0,
334
+ "inputs": [
335
+ {
336
+ "name": "model",
337
+ "type": "MODEL",
338
+ "link": 23
339
+ },
340
+ {
341
+ "name": "positive",
342
+ "type": "CONDITIONING",
343
+ "link": 4
344
+ },
345
+ {
346
+ "name": "negative",
347
+ "type": "CONDITIONING",
348
+ "link": 6
349
+ },
350
+ {
351
+ "name": "latent_image",
352
+ "type": "LATENT",
353
+ "link": 2
354
+ }
355
+ ],
356
+ "outputs": [
357
+ {
358
+ "name": "LATENT",
359
+ "type": "LATENT",
360
+ "links": [
361
+ 7
362
+ ],
363
+ "slot_index": 0
364
+ }
365
+ ],
366
+ "properties": {
367
+ "Node name for S&R": "KSampler"
368
+ },
369
+ "widgets_values": [
370
+ 0,
371
+ "fixed",
372
+ 30,
373
+ 6.5,
374
+ "dpmpp_2m",
375
+ "karras",
376
+ 1
377
+ ]
378
+ },
379
+ {
380
+ "id": 8,
381
+ "type": "VAEDecode",
382
+ "pos": [
383
+ 1615,
384
+ 586
385
+ ],
386
+ "size": {
387
+ "0": 140,
388
+ "1": 46
389
+ },
390
+ "flags": {},
391
+ "order": 9,
392
+ "mode": 0,
393
+ "inputs": [
394
+ {
395
+ "name": "samples",
396
+ "type": "LATENT",
397
+ "link": 7
398
+ },
399
+ {
400
+ "name": "vae",
401
+ "type": "VAE",
402
+ "link": 8
403
+ }
404
+ ],
405
+ "outputs": [
406
+ {
407
+ "name": "IMAGE",
408
+ "type": "IMAGE",
409
+ "links": [
410
+ 9
411
+ ],
412
+ "slot_index": 0
413
+ }
414
+ ],
415
+ "properties": {
416
+ "Node name for S&R": "VAEDecode"
417
+ }
418
+ },
419
+ {
420
+ "id": 9,
421
+ "type": "SaveImage",
422
+ "pos": [
423
+ 1822,
424
+ 588
425
+ ],
426
+ "size": [
427
+ 691.0159878487498,
428
+ 716.6239849908982
429
+ ],
430
+ "flags": {},
431
+ "order": 10,
432
+ "mode": 0,
433
+ "inputs": [
434
+ {
435
+ "name": "images",
436
+ "type": "IMAGE",
437
+ "link": 9
438
+ }
439
+ ],
440
+ "properties": {},
441
+ "widgets_values": [
442
+ "IPAdapter"
443
+ ]
444
+ },
445
+ {
446
+ "id": 4,
447
+ "type": "CheckpointLoaderSimple",
448
+ "pos": [
449
+ -72,
450
+ 657
451
+ ],
452
+ "size": {
453
+ "0": 315,
454
+ "1": 98
455
+ },
456
+ "flags": {},
457
+ "order": 3,
458
+ "mode": 0,
459
+ "outputs": [
460
+ {
461
+ "name": "MODEL",
462
+ "type": "MODEL",
463
+ "links": [
464
+ 10
465
+ ],
466
+ "slot_index": 0
467
+ },
468
+ {
469
+ "name": "CLIP",
470
+ "type": "CLIP",
471
+ "links": [
472
+ 3,
473
+ 5
474
+ ],
475
+ "slot_index": 1
476
+ },
477
+ {
478
+ "name": "VAE",
479
+ "type": "VAE",
480
+ "links": [
481
+ 8
482
+ ],
483
+ "slot_index": 2
484
+ }
485
+ ],
486
+ "properties": {
487
+ "Node name for S&R": "CheckpointLoaderSimple"
488
+ },
489
+ "widgets_values": [
490
+ "sdxl/AlbedoBaseXL.safetensors"
491
+ ]
492
+ }
493
+ ],
494
+ "links": [
495
+ [
496
+ 2,
497
+ 5,
498
+ 0,
499
+ 3,
500
+ 3,
501
+ "LATENT"
502
+ ],
503
+ [
504
+ 3,
505
+ 4,
506
+ 1,
507
+ 6,
508
+ 0,
509
+ "CLIP"
510
+ ],
511
+ [
512
+ 4,
513
+ 6,
514
+ 0,
515
+ 3,
516
+ 1,
517
+ "CONDITIONING"
518
+ ],
519
+ [
520
+ 5,
521
+ 4,
522
+ 1,
523
+ 7,
524
+ 0,
525
+ "CLIP"
526
+ ],
527
+ [
528
+ 6,
529
+ 7,
530
+ 0,
531
+ 3,
532
+ 2,
533
+ "CONDITIONING"
534
+ ],
535
+ [
536
+ 7,
537
+ 3,
538
+ 0,
539
+ 8,
540
+ 0,
541
+ "LATENT"
542
+ ],
543
+ [
544
+ 8,
545
+ 4,
546
+ 2,
547
+ 8,
548
+ 1,
549
+ "VAE"
550
+ ],
551
+ [
552
+ 9,
553
+ 8,
554
+ 0,
555
+ 9,
556
+ 0,
557
+ "IMAGE"
558
+ ],
559
+ [
560
+ 10,
561
+ 4,
562
+ 0,
563
+ 11,
564
+ 0,
565
+ "MODEL"
566
+ ],
567
+ [
568
+ 21,
569
+ 11,
570
+ 0,
571
+ 15,
572
+ 0,
573
+ "MODEL"
574
+ ],
575
+ [
576
+ 22,
577
+ 11,
578
+ 1,
579
+ 15,
580
+ 1,
581
+ "IPADAPTER"
582
+ ],
583
+ [
584
+ 23,
585
+ 15,
586
+ 0,
587
+ 3,
588
+ 0,
589
+ "MODEL"
590
+ ],
591
+ [
592
+ 24,
593
+ 16,
594
+ 0,
595
+ 15,
596
+ 2,
597
+ "IMAGE"
598
+ ],
599
+ [
600
+ 25,
601
+ 12,
602
+ 0,
603
+ 15,
604
+ 3,
605
+ "IMAGE"
606
+ ]
607
+ ],
608
+ "groups": [],
609
+ "config": {},
610
+ "extra": {},
611
+ "version": 0.4
612
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_tiled.json ADDED
@@ -0,0 +1,583 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 18,
3
+ "last_link_id": 32,
4
+ "nodes": [
5
+ {
6
+ "id": 4,
7
+ "type": "CheckpointLoaderSimple",
8
+ "pos": [
9
+ 50,
10
+ 730
11
+ ],
12
+ "size": {
13
+ "0": 315,
14
+ "1": 98
15
+ },
16
+ "flags": {},
17
+ "order": 0,
18
+ "mode": 0,
19
+ "outputs": [
20
+ {
21
+ "name": "MODEL",
22
+ "type": "MODEL",
23
+ "links": [
24
+ 29
25
+ ],
26
+ "slot_index": 0
27
+ },
28
+ {
29
+ "name": "CLIP",
30
+ "type": "CLIP",
31
+ "links": [
32
+ 3,
33
+ 5
34
+ ],
35
+ "slot_index": 1
36
+ },
37
+ {
38
+ "name": "VAE",
39
+ "type": "VAE",
40
+ "links": [
41
+ 8
42
+ ],
43
+ "slot_index": 2
44
+ }
45
+ ],
46
+ "properties": {
47
+ "Node name for S&R": "CheckpointLoaderSimple"
48
+ },
49
+ "widgets_values": [
50
+ "sd15/realisticVisionV51_v51VAE.safetensors"
51
+ ]
52
+ },
53
+ {
54
+ "id": 7,
55
+ "type": "CLIPTextEncode",
56
+ "pos": [
57
+ 690,
58
+ 840
59
+ ],
60
+ "size": {
61
+ "0": 425.27801513671875,
62
+ "1": 180.6060791015625
63
+ },
64
+ "flags": {},
65
+ "order": 6,
66
+ "mode": 0,
67
+ "inputs": [
68
+ {
69
+ "name": "clip",
70
+ "type": "CLIP",
71
+ "link": 5
72
+ }
73
+ ],
74
+ "outputs": [
75
+ {
76
+ "name": "CONDITIONING",
77
+ "type": "CONDITIONING",
78
+ "links": [
79
+ 6
80
+ ],
81
+ "slot_index": 0
82
+ }
83
+ ],
84
+ "properties": {
85
+ "Node name for S&R": "CLIPTextEncode"
86
+ },
87
+ "widgets_values": [
88
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed"
89
+ ]
90
+ },
91
+ {
92
+ "id": 8,
93
+ "type": "VAEDecode",
94
+ "pos": [
95
+ 1570,
96
+ 700
97
+ ],
98
+ "size": {
99
+ "0": 140,
100
+ "1": 46
101
+ },
102
+ "flags": {},
103
+ "order": 9,
104
+ "mode": 0,
105
+ "inputs": [
106
+ {
107
+ "name": "samples",
108
+ "type": "LATENT",
109
+ "link": 7
110
+ },
111
+ {
112
+ "name": "vae",
113
+ "type": "VAE",
114
+ "link": 8
115
+ }
116
+ ],
117
+ "outputs": [
118
+ {
119
+ "name": "IMAGE",
120
+ "type": "IMAGE",
121
+ "links": [
122
+ 9
123
+ ],
124
+ "slot_index": 0
125
+ }
126
+ ],
127
+ "properties": {
128
+ "Node name for S&R": "VAEDecode"
129
+ }
130
+ },
131
+ {
132
+ "id": 12,
133
+ "type": "LoadImage",
134
+ "pos": [
135
+ 250,
136
+ 290
137
+ ],
138
+ "size": {
139
+ "0": 315,
140
+ "1": 314
141
+ },
142
+ "flags": {},
143
+ "order": 1,
144
+ "mode": 0,
145
+ "outputs": [
146
+ {
147
+ "name": "IMAGE",
148
+ "type": "IMAGE",
149
+ "links": [
150
+ 27
151
+ ],
152
+ "shape": 3,
153
+ "slot_index": 0
154
+ },
155
+ {
156
+ "name": "MASK",
157
+ "type": "MASK",
158
+ "links": null,
159
+ "shape": 3
160
+ }
161
+ ],
162
+ "properties": {
163
+ "Node name for S&R": "LoadImage"
164
+ },
165
+ "widgets_values": [
166
+ "girl_sitting.png",
167
+ "image"
168
+ ]
169
+ },
170
+ {
171
+ "id": 6,
172
+ "type": "CLIPTextEncode",
173
+ "pos": [
174
+ 690,
175
+ 610
176
+ ],
177
+ "size": {
178
+ "0": 422.84503173828125,
179
+ "1": 164.31304931640625
180
+ },
181
+ "flags": {},
182
+ "order": 5,
183
+ "mode": 0,
184
+ "inputs": [
185
+ {
186
+ "name": "clip",
187
+ "type": "CLIP",
188
+ "link": 3
189
+ }
190
+ ],
191
+ "outputs": [
192
+ {
193
+ "name": "CONDITIONING",
194
+ "type": "CONDITIONING",
195
+ "links": [
196
+ 4
197
+ ],
198
+ "slot_index": 0
199
+ }
200
+ ],
201
+ "properties": {
202
+ "Node name for S&R": "CLIPTextEncode"
203
+ },
204
+ "widgets_values": [
205
+ "in a peaceful spring morning a woman wearing a white shirt is sitting in a park on a bench\n\nhigh quality, detailed, diffuse light"
206
+ ]
207
+ },
208
+ {
209
+ "id": 5,
210
+ "type": "EmptyLatentImage",
211
+ "pos": [
212
+ 801,
213
+ 1097
214
+ ],
215
+ "size": {
216
+ "0": 315,
217
+ "1": 106
218
+ },
219
+ "flags": {},
220
+ "order": 2,
221
+ "mode": 0,
222
+ "outputs": [
223
+ {
224
+ "name": "LATENT",
225
+ "type": "LATENT",
226
+ "links": [
227
+ 2
228
+ ],
229
+ "slot_index": 0
230
+ }
231
+ ],
232
+ "properties": {
233
+ "Node name for S&R": "EmptyLatentImage"
234
+ },
235
+ "widgets_values": [
236
+ 512,
237
+ 768,
238
+ 1
239
+ ]
240
+ },
241
+ {
242
+ "id": 3,
243
+ "type": "KSampler",
244
+ "pos": [
245
+ 1210,
246
+ 700
247
+ ],
248
+ "size": {
249
+ "0": 315,
250
+ "1": 262
251
+ },
252
+ "flags": {},
253
+ "order": 8,
254
+ "mode": 0,
255
+ "inputs": [
256
+ {
257
+ "name": "model",
258
+ "type": "MODEL",
259
+ "link": 30
260
+ },
261
+ {
262
+ "name": "positive",
263
+ "type": "CONDITIONING",
264
+ "link": 4
265
+ },
266
+ {
267
+ "name": "negative",
268
+ "type": "CONDITIONING",
269
+ "link": 6
270
+ },
271
+ {
272
+ "name": "latent_image",
273
+ "type": "LATENT",
274
+ "link": 2
275
+ }
276
+ ],
277
+ "outputs": [
278
+ {
279
+ "name": "LATENT",
280
+ "type": "LATENT",
281
+ "links": [
282
+ 7
283
+ ],
284
+ "slot_index": 0
285
+ }
286
+ ],
287
+ "properties": {
288
+ "Node name for S&R": "KSampler"
289
+ },
290
+ "widgets_values": [
291
+ 2,
292
+ "fixed",
293
+ 30,
294
+ 6.5,
295
+ "ddpm",
296
+ "karras",
297
+ 1
298
+ ]
299
+ },
300
+ {
301
+ "id": 18,
302
+ "type": "IPAdapterTiled",
303
+ "pos": [
304
+ 700,
305
+ 230
306
+ ],
307
+ "size": {
308
+ "0": 315,
309
+ "1": 302
310
+ },
311
+ "flags": {},
312
+ "order": 7,
313
+ "mode": 0,
314
+ "inputs": [
315
+ {
316
+ "name": "model",
317
+ "type": "MODEL",
318
+ "link": 29
319
+ },
320
+ {
321
+ "name": "ipadapter",
322
+ "type": "IPADAPTER",
323
+ "link": 31
324
+ },
325
+ {
326
+ "name": "image",
327
+ "type": "IMAGE",
328
+ "link": 27
329
+ },
330
+ {
331
+ "name": "image_negative",
332
+ "type": "IMAGE",
333
+ "link": null
334
+ },
335
+ {
336
+ "name": "attn_mask",
337
+ "type": "MASK",
338
+ "link": null
339
+ },
340
+ {
341
+ "name": "clip_vision",
342
+ "type": "CLIP_VISION",
343
+ "link": 32
344
+ }
345
+ ],
346
+ "outputs": [
347
+ {
348
+ "name": "MODEL",
349
+ "type": "MODEL",
350
+ "links": [
351
+ 30
352
+ ],
353
+ "shape": 3,
354
+ "slot_index": 0
355
+ },
356
+ {
357
+ "name": "tiles",
358
+ "type": "IMAGE",
359
+ "links": null,
360
+ "shape": 3
361
+ },
362
+ {
363
+ "name": "masks",
364
+ "type": "MASK",
365
+ "links": null,
366
+ "shape": 3
367
+ }
368
+ ],
369
+ "properties": {
370
+ "Node name for S&R": "IPAdapterTiled"
371
+ },
372
+ "widgets_values": [
373
+ 0.7000000000000001,
374
+ "ease in",
375
+ "concat",
376
+ 0,
377
+ 1,
378
+ 0,
379
+ "V only"
380
+ ]
381
+ },
382
+ {
383
+ "id": 9,
384
+ "type": "SaveImage",
385
+ "pos": [
386
+ 1768,
387
+ 700
388
+ ],
389
+ "size": {
390
+ "0": 529.7760009765625,
391
+ "1": 582.3048095703125
392
+ },
393
+ "flags": {},
394
+ "order": 10,
395
+ "mode": 0,
396
+ "inputs": [
397
+ {
398
+ "name": "images",
399
+ "type": "IMAGE",
400
+ "link": 9
401
+ }
402
+ ],
403
+ "properties": {},
404
+ "widgets_values": [
405
+ "IPAdapter"
406
+ ]
407
+ },
408
+ {
409
+ "id": 15,
410
+ "type": "IPAdapterModelLoader",
411
+ "pos": [
412
+ 250,
413
+ 70
414
+ ],
415
+ "size": {
416
+ "0": 315,
417
+ "1": 58
418
+ },
419
+ "flags": {},
420
+ "order": 3,
421
+ "mode": 0,
422
+ "outputs": [
423
+ {
424
+ "name": "IPADAPTER",
425
+ "type": "IPADAPTER",
426
+ "links": [
427
+ 31
428
+ ],
429
+ "shape": 3,
430
+ "slot_index": 0
431
+ }
432
+ ],
433
+ "properties": {
434
+ "Node name for S&R": "IPAdapterModelLoader"
435
+ },
436
+ "widgets_values": [
437
+ "ip-adapter-plus_sd15.safetensors"
438
+ ]
439
+ },
440
+ {
441
+ "id": 16,
442
+ "type": "CLIPVisionLoader",
443
+ "pos": [
444
+ 250,
445
+ 180
446
+ ],
447
+ "size": {
448
+ "0": 315,
449
+ "1": 58
450
+ },
451
+ "flags": {},
452
+ "order": 4,
453
+ "mode": 0,
454
+ "outputs": [
455
+ {
456
+ "name": "CLIP_VISION",
457
+ "type": "CLIP_VISION",
458
+ "links": [
459
+ 32
460
+ ],
461
+ "shape": 3,
462
+ "slot_index": 0
463
+ }
464
+ ],
465
+ "properties": {
466
+ "Node name for S&R": "CLIPVisionLoader"
467
+ },
468
+ "widgets_values": [
469
+ "CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors"
470
+ ]
471
+ }
472
+ ],
473
+ "links": [
474
+ [
475
+ 2,
476
+ 5,
477
+ 0,
478
+ 3,
479
+ 3,
480
+ "LATENT"
481
+ ],
482
+ [
483
+ 3,
484
+ 4,
485
+ 1,
486
+ 6,
487
+ 0,
488
+ "CLIP"
489
+ ],
490
+ [
491
+ 4,
492
+ 6,
493
+ 0,
494
+ 3,
495
+ 1,
496
+ "CONDITIONING"
497
+ ],
498
+ [
499
+ 5,
500
+ 4,
501
+ 1,
502
+ 7,
503
+ 0,
504
+ "CLIP"
505
+ ],
506
+ [
507
+ 6,
508
+ 7,
509
+ 0,
510
+ 3,
511
+ 2,
512
+ "CONDITIONING"
513
+ ],
514
+ [
515
+ 7,
516
+ 3,
517
+ 0,
518
+ 8,
519
+ 0,
520
+ "LATENT"
521
+ ],
522
+ [
523
+ 8,
524
+ 4,
525
+ 2,
526
+ 8,
527
+ 1,
528
+ "VAE"
529
+ ],
530
+ [
531
+ 9,
532
+ 8,
533
+ 0,
534
+ 9,
535
+ 0,
536
+ "IMAGE"
537
+ ],
538
+ [
539
+ 27,
540
+ 12,
541
+ 0,
542
+ 18,
543
+ 2,
544
+ "IMAGE"
545
+ ],
546
+ [
547
+ 29,
548
+ 4,
549
+ 0,
550
+ 18,
551
+ 0,
552
+ "MODEL"
553
+ ],
554
+ [
555
+ 30,
556
+ 18,
557
+ 0,
558
+ 3,
559
+ 0,
560
+ "MODEL"
561
+ ],
562
+ [
563
+ 31,
564
+ 15,
565
+ 0,
566
+ 18,
567
+ 1,
568
+ "IPADAPTER"
569
+ ],
570
+ [
571
+ 32,
572
+ 16,
573
+ 0,
574
+ 18,
575
+ 5,
576
+ "CLIP_VISION"
577
+ ]
578
+ ],
579
+ "groups": [],
580
+ "config": {},
581
+ "extra": {},
582
+ "version": 0.4
583
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_weight_types.json ADDED
@@ -0,0 +1,1738 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 37,
3
+ "last_link_id": 82,
4
+ "nodes": [
5
+ {
6
+ "id": 4,
7
+ "type": "CheckpointLoaderSimple",
8
+ "pos": [
9
+ 50,
10
+ 730
11
+ ],
12
+ "size": {
13
+ "0": 315,
14
+ "1": 98
15
+ },
16
+ "flags": {},
17
+ "order": 0,
18
+ "mode": 0,
19
+ "outputs": [
20
+ {
21
+ "name": "MODEL",
22
+ "type": "MODEL",
23
+ "links": [
24
+ 20,
25
+ 35,
26
+ 46,
27
+ 57,
28
+ 68
29
+ ],
30
+ "slot_index": 0
31
+ },
32
+ {
33
+ "name": "CLIP",
34
+ "type": "CLIP",
35
+ "links": [
36
+ 3,
37
+ 5
38
+ ],
39
+ "slot_index": 1
40
+ },
41
+ {
42
+ "name": "VAE",
43
+ "type": "VAE",
44
+ "links": [
45
+ 8,
46
+ 33,
47
+ 44,
48
+ 55,
49
+ 66
50
+ ],
51
+ "slot_index": 2
52
+ }
53
+ ],
54
+ "properties": {
55
+ "Node name for S&R": "CheckpointLoaderSimple"
56
+ },
57
+ "widgets_values": [
58
+ "sd15/realisticVisionV51_v51VAE.safetensors"
59
+ ]
60
+ },
61
+ {
62
+ "id": 7,
63
+ "type": "CLIPTextEncode",
64
+ "pos": [
65
+ 690,
66
+ 840
67
+ ],
68
+ "size": {
69
+ "0": 425.27801513671875,
70
+ "1": 180.6060791015625
71
+ },
72
+ "flags": {},
73
+ "order": 6,
74
+ "mode": 0,
75
+ "inputs": [
76
+ {
77
+ "name": "clip",
78
+ "type": "CLIP",
79
+ "link": 5
80
+ }
81
+ ],
82
+ "outputs": [
83
+ {
84
+ "name": "CONDITIONING",
85
+ "type": "CONDITIONING",
86
+ "links": [
87
+ 6,
88
+ 30,
89
+ 41,
90
+ 52,
91
+ 63
92
+ ],
93
+ "slot_index": 0
94
+ }
95
+ ],
96
+ "properties": {
97
+ "Node name for S&R": "CLIPTextEncode"
98
+ },
99
+ "widgets_values": [
100
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed"
101
+ ]
102
+ },
103
+ {
104
+ "id": 5,
105
+ "type": "EmptyLatentImage",
106
+ "pos": [
107
+ 801,
108
+ 1097
109
+ ],
110
+ "size": {
111
+ "0": 315,
112
+ "1": 106
113
+ },
114
+ "flags": {},
115
+ "order": 1,
116
+ "mode": 0,
117
+ "outputs": [
118
+ {
119
+ "name": "LATENT",
120
+ "type": "LATENT",
121
+ "links": [
122
+ 2,
123
+ 31,
124
+ 42,
125
+ 53,
126
+ 64
127
+ ],
128
+ "slot_index": 0
129
+ }
130
+ ],
131
+ "properties": {
132
+ "Node name for S&R": "EmptyLatentImage"
133
+ },
134
+ "widgets_values": [
135
+ 512,
136
+ 512,
137
+ 1
138
+ ]
139
+ },
140
+ {
141
+ "id": 12,
142
+ "type": "LoadImage",
143
+ "pos": [
144
+ 311,
145
+ 270
146
+ ],
147
+ "size": {
148
+ "0": 315,
149
+ "1": 314
150
+ },
151
+ "flags": {},
152
+ "order": 2,
153
+ "mode": 0,
154
+ "outputs": [
155
+ {
156
+ "name": "IMAGE",
157
+ "type": "IMAGE",
158
+ "links": [
159
+ 27,
160
+ 37,
161
+ 48,
162
+ 59,
163
+ 70
164
+ ],
165
+ "shape": 3,
166
+ "slot_index": 0
167
+ },
168
+ {
169
+ "name": "MASK",
170
+ "type": "MASK",
171
+ "links": null,
172
+ "shape": 3
173
+ }
174
+ ],
175
+ "properties": {
176
+ "Node name for S&R": "LoadImage"
177
+ },
178
+ "widgets_values": [
179
+ "warrior_woman.png",
180
+ "image"
181
+ ]
182
+ },
183
+ {
184
+ "id": 3,
185
+ "type": "KSampler",
186
+ "pos": [
187
+ 1660,
188
+ 290
189
+ ],
190
+ "size": {
191
+ "0": 315,
192
+ "1": 262
193
+ },
194
+ "flags": {},
195
+ "order": 12,
196
+ "mode": 0,
197
+ "inputs": [
198
+ {
199
+ "name": "model",
200
+ "type": "MODEL",
201
+ "link": 23
202
+ },
203
+ {
204
+ "name": "positive",
205
+ "type": "CONDITIONING",
206
+ "link": 4
207
+ },
208
+ {
209
+ "name": "negative",
210
+ "type": "CONDITIONING",
211
+ "link": 6
212
+ },
213
+ {
214
+ "name": "latent_image",
215
+ "type": "LATENT",
216
+ "link": 2
217
+ }
218
+ ],
219
+ "outputs": [
220
+ {
221
+ "name": "LATENT",
222
+ "type": "LATENT",
223
+ "links": [
224
+ 7
225
+ ],
226
+ "slot_index": 0
227
+ }
228
+ ],
229
+ "properties": {
230
+ "Node name for S&R": "KSampler"
231
+ },
232
+ "widgets_values": [
233
+ 0,
234
+ "fixed",
235
+ 30,
236
+ 6.5,
237
+ "dpmpp_2m",
238
+ "karras",
239
+ 1
240
+ ]
241
+ },
242
+ {
243
+ "id": 20,
244
+ "type": "SaveImage",
245
+ "pos": [
246
+ 2030,
247
+ 940
248
+ ],
249
+ "size": {
250
+ "0": 529.7760009765625,
251
+ "1": 582.3048095703125
252
+ },
253
+ "flags": {},
254
+ "order": 23,
255
+ "mode": 0,
256
+ "inputs": [
257
+ {
258
+ "name": "images",
259
+ "type": "IMAGE",
260
+ "link": 34
261
+ }
262
+ ],
263
+ "properties": {},
264
+ "widgets_values": [
265
+ "IPAdapter"
266
+ ]
267
+ },
268
+ {
269
+ "id": 18,
270
+ "type": "KSampler",
271
+ "pos": [
272
+ 1660,
273
+ 940
274
+ ],
275
+ "size": {
276
+ "0": 315,
277
+ "1": 262
278
+ },
279
+ "flags": {},
280
+ "order": 13,
281
+ "mode": 0,
282
+ "inputs": [
283
+ {
284
+ "name": "model",
285
+ "type": "MODEL",
286
+ "link": 28
287
+ },
288
+ {
289
+ "name": "positive",
290
+ "type": "CONDITIONING",
291
+ "link": 29
292
+ },
293
+ {
294
+ "name": "negative",
295
+ "type": "CONDITIONING",
296
+ "link": 30
297
+ },
298
+ {
299
+ "name": "latent_image",
300
+ "type": "LATENT",
301
+ "link": 31
302
+ }
303
+ ],
304
+ "outputs": [
305
+ {
306
+ "name": "LATENT",
307
+ "type": "LATENT",
308
+ "links": [
309
+ 32
310
+ ],
311
+ "slot_index": 0
312
+ }
313
+ ],
314
+ "properties": {
315
+ "Node name for S&R": "KSampler"
316
+ },
317
+ "widgets_values": [
318
+ 0,
319
+ "fixed",
320
+ 30,
321
+ 6.5,
322
+ "dpmpp_2m",
323
+ "karras",
324
+ 1
325
+ ]
326
+ },
327
+ {
328
+ "id": 19,
329
+ "type": "VAEDecode",
330
+ "pos": [
331
+ 1830,
332
+ 1280
333
+ ],
334
+ "size": {
335
+ "0": 140,
336
+ "1": 46
337
+ },
338
+ "flags": {},
339
+ "order": 18,
340
+ "mode": 0,
341
+ "inputs": [
342
+ {
343
+ "name": "samples",
344
+ "type": "LATENT",
345
+ "link": 32
346
+ },
347
+ {
348
+ "name": "vae",
349
+ "type": "VAE",
350
+ "link": 33
351
+ }
352
+ ],
353
+ "outputs": [
354
+ {
355
+ "name": "IMAGE",
356
+ "type": "IMAGE",
357
+ "links": [
358
+ 34
359
+ ],
360
+ "slot_index": 0
361
+ }
362
+ ],
363
+ "properties": {
364
+ "Node name for S&R": "VAEDecode"
365
+ }
366
+ },
367
+ {
368
+ "id": 8,
369
+ "type": "VAEDecode",
370
+ "pos": [
371
+ 1820,
372
+ 610
373
+ ],
374
+ "size": {
375
+ "0": 140,
376
+ "1": 46
377
+ },
378
+ "flags": {},
379
+ "order": 17,
380
+ "mode": 0,
381
+ "inputs": [
382
+ {
383
+ "name": "samples",
384
+ "type": "LATENT",
385
+ "link": 7
386
+ },
387
+ {
388
+ "name": "vae",
389
+ "type": "VAE",
390
+ "link": 8
391
+ }
392
+ ],
393
+ "outputs": [
394
+ {
395
+ "name": "IMAGE",
396
+ "type": "IMAGE",
397
+ "links": [
398
+ 9
399
+ ],
400
+ "slot_index": 0
401
+ }
402
+ ],
403
+ "properties": {
404
+ "Node name for S&R": "VAEDecode"
405
+ }
406
+ },
407
+ {
408
+ "id": 9,
409
+ "type": "SaveImage",
410
+ "pos": [
411
+ 2040,
412
+ 300
413
+ ],
414
+ "size": {
415
+ "0": 529.7760009765625,
416
+ "1": 582.3048095703125
417
+ },
418
+ "flags": {},
419
+ "order": 22,
420
+ "mode": 0,
421
+ "inputs": [
422
+ {
423
+ "name": "images",
424
+ "type": "IMAGE",
425
+ "link": 9
426
+ }
427
+ ],
428
+ "properties": {},
429
+ "widgets_values": [
430
+ "IPAdapter"
431
+ ]
432
+ },
433
+ {
434
+ "id": 14,
435
+ "type": "IPAdapterAdvanced",
436
+ "pos": [
437
+ 1290,
438
+ 250
439
+ ],
440
+ "size": {
441
+ "0": 315,
442
+ "1": 278
443
+ },
444
+ "flags": {},
445
+ "order": 7,
446
+ "mode": 0,
447
+ "inputs": [
448
+ {
449
+ "name": "model",
450
+ "type": "MODEL",
451
+ "link": 20
452
+ },
453
+ {
454
+ "name": "ipadapter",
455
+ "type": "IPADAPTER",
456
+ "link": 21,
457
+ "slot_index": 1
458
+ },
459
+ {
460
+ "name": "image",
461
+ "type": "IMAGE",
462
+ "link": 27
463
+ },
464
+ {
465
+ "name": "image_negative",
466
+ "type": "IMAGE",
467
+ "link": null
468
+ },
469
+ {
470
+ "name": "attn_mask",
471
+ "type": "MASK",
472
+ "link": null
473
+ },
474
+ {
475
+ "name": "clip_vision",
476
+ "type": "CLIP_VISION",
477
+ "link": 24,
478
+ "slot_index": 5
479
+ }
480
+ ],
481
+ "outputs": [
482
+ {
483
+ "name": "MODEL",
484
+ "type": "MODEL",
485
+ "links": [
486
+ 23
487
+ ],
488
+ "shape": 3,
489
+ "slot_index": 0
490
+ }
491
+ ],
492
+ "properties": {
493
+ "Node name for S&R": "IPAdapterAdvanced"
494
+ },
495
+ "widgets_values": [
496
+ 0.8,
497
+ "linear",
498
+ "concat",
499
+ 0,
500
+ 1,
501
+ "V only"
502
+ ]
503
+ },
504
+ {
505
+ "id": 21,
506
+ "type": "IPAdapterAdvanced",
507
+ "pos": [
508
+ 1280,
509
+ 900
510
+ ],
511
+ "size": {
512
+ "0": 315,
513
+ "1": 278
514
+ },
515
+ "flags": {},
516
+ "order": 8,
517
+ "mode": 0,
518
+ "inputs": [
519
+ {
520
+ "name": "model",
521
+ "type": "MODEL",
522
+ "link": 35
523
+ },
524
+ {
525
+ "name": "ipadapter",
526
+ "type": "IPADAPTER",
527
+ "link": 36,
528
+ "slot_index": 1
529
+ },
530
+ {
531
+ "name": "image",
532
+ "type": "IMAGE",
533
+ "link": 37
534
+ },
535
+ {
536
+ "name": "image_negative",
537
+ "type": "IMAGE",
538
+ "link": null
539
+ },
540
+ {
541
+ "name": "attn_mask",
542
+ "type": "MASK",
543
+ "link": null
544
+ },
545
+ {
546
+ "name": "clip_vision",
547
+ "type": "CLIP_VISION",
548
+ "link": 38,
549
+ "slot_index": 5
550
+ }
551
+ ],
552
+ "outputs": [
553
+ {
554
+ "name": "MODEL",
555
+ "type": "MODEL",
556
+ "links": [
557
+ 28
558
+ ],
559
+ "shape": 3,
560
+ "slot_index": 0
561
+ }
562
+ ],
563
+ "properties": {
564
+ "Node name for S&R": "IPAdapterAdvanced"
565
+ },
566
+ "widgets_values": [
567
+ 0.8,
568
+ "ease in",
569
+ "concat",
570
+ 0,
571
+ 1,
572
+ "V only"
573
+ ]
574
+ },
575
+ {
576
+ "id": 22,
577
+ "type": "KSampler",
578
+ "pos": [
579
+ 1660,
580
+ 1580
581
+ ],
582
+ "size": {
583
+ "0": 315,
584
+ "1": 262
585
+ },
586
+ "flags": {},
587
+ "order": 14,
588
+ "mode": 0,
589
+ "inputs": [
590
+ {
591
+ "name": "model",
592
+ "type": "MODEL",
593
+ "link": 39
594
+ },
595
+ {
596
+ "name": "positive",
597
+ "type": "CONDITIONING",
598
+ "link": 40
599
+ },
600
+ {
601
+ "name": "negative",
602
+ "type": "CONDITIONING",
603
+ "link": 41
604
+ },
605
+ {
606
+ "name": "latent_image",
607
+ "type": "LATENT",
608
+ "link": 42
609
+ }
610
+ ],
611
+ "outputs": [
612
+ {
613
+ "name": "LATENT",
614
+ "type": "LATENT",
615
+ "links": [
616
+ 43
617
+ ],
618
+ "slot_index": 0
619
+ }
620
+ ],
621
+ "properties": {
622
+ "Node name for S&R": "KSampler"
623
+ },
624
+ "widgets_values": [
625
+ 0,
626
+ "fixed",
627
+ 30,
628
+ 6.5,
629
+ "dpmpp_2m",
630
+ "karras",
631
+ 1
632
+ ]
633
+ },
634
+ {
635
+ "id": 23,
636
+ "type": "VAEDecode",
637
+ "pos": [
638
+ 1830,
639
+ 1920
640
+ ],
641
+ "size": {
642
+ "0": 140,
643
+ "1": 46
644
+ },
645
+ "flags": {},
646
+ "order": 19,
647
+ "mode": 0,
648
+ "inputs": [
649
+ {
650
+ "name": "samples",
651
+ "type": "LATENT",
652
+ "link": 43
653
+ },
654
+ {
655
+ "name": "vae",
656
+ "type": "VAE",
657
+ "link": 44
658
+ }
659
+ ],
660
+ "outputs": [
661
+ {
662
+ "name": "IMAGE",
663
+ "type": "IMAGE",
664
+ "links": [
665
+ 45
666
+ ],
667
+ "slot_index": 0
668
+ }
669
+ ],
670
+ "properties": {
671
+ "Node name for S&R": "VAEDecode"
672
+ }
673
+ },
674
+ {
675
+ "id": 25,
676
+ "type": "IPAdapterAdvanced",
677
+ "pos": [
678
+ 1280,
679
+ 1540
680
+ ],
681
+ "size": {
682
+ "0": 315,
683
+ "1": 278
684
+ },
685
+ "flags": {},
686
+ "order": 9,
687
+ "mode": 0,
688
+ "inputs": [
689
+ {
690
+ "name": "model",
691
+ "type": "MODEL",
692
+ "link": 46
693
+ },
694
+ {
695
+ "name": "ipadapter",
696
+ "type": "IPADAPTER",
697
+ "link": 47,
698
+ "slot_index": 1
699
+ },
700
+ {
701
+ "name": "image",
702
+ "type": "IMAGE",
703
+ "link": 48
704
+ },
705
+ {
706
+ "name": "image_negative",
707
+ "type": "IMAGE",
708
+ "link": null
709
+ },
710
+ {
711
+ "name": "attn_mask",
712
+ "type": "MASK",
713
+ "link": null
714
+ },
715
+ {
716
+ "name": "clip_vision",
717
+ "type": "CLIP_VISION",
718
+ "link": 49,
719
+ "slot_index": 5
720
+ }
721
+ ],
722
+ "outputs": [
723
+ {
724
+ "name": "MODEL",
725
+ "type": "MODEL",
726
+ "links": [
727
+ 39
728
+ ],
729
+ "shape": 3,
730
+ "slot_index": 0
731
+ }
732
+ ],
733
+ "properties": {
734
+ "Node name for S&R": "IPAdapterAdvanced"
735
+ },
736
+ "widgets_values": [
737
+ 0.8,
738
+ "ease out",
739
+ "concat",
740
+ 0,
741
+ 1,
742
+ "V only"
743
+ ]
744
+ },
745
+ {
746
+ "id": 24,
747
+ "type": "SaveImage",
748
+ "pos": [
749
+ 2030,
750
+ 1580
751
+ ],
752
+ "size": {
753
+ "0": 529.7760009765625,
754
+ "1": 582.3048095703125
755
+ },
756
+ "flags": {},
757
+ "order": 24,
758
+ "mode": 0,
759
+ "inputs": [
760
+ {
761
+ "name": "images",
762
+ "type": "IMAGE",
763
+ "link": 45
764
+ }
765
+ ],
766
+ "properties": {},
767
+ "widgets_values": [
768
+ "IPAdapter"
769
+ ]
770
+ },
771
+ {
772
+ "id": 27,
773
+ "type": "VAEDecode",
774
+ "pos": [
775
+ 3750,
776
+ 670
777
+ ],
778
+ "size": {
779
+ "0": 140,
780
+ "1": 46
781
+ },
782
+ "flags": {},
783
+ "order": 20,
784
+ "mode": 0,
785
+ "inputs": [
786
+ {
787
+ "name": "samples",
788
+ "type": "LATENT",
789
+ "link": 54
790
+ },
791
+ {
792
+ "name": "vae",
793
+ "type": "VAE",
794
+ "link": 55
795
+ }
796
+ ],
797
+ "outputs": [
798
+ {
799
+ "name": "IMAGE",
800
+ "type": "IMAGE",
801
+ "links": [
802
+ 56
803
+ ],
804
+ "slot_index": 0
805
+ }
806
+ ],
807
+ "properties": {
808
+ "Node name for S&R": "VAEDecode"
809
+ }
810
+ },
811
+ {
812
+ "id": 28,
813
+ "type": "SaveImage",
814
+ "pos": [
815
+ 2620,
816
+ 300
817
+ ],
818
+ "size": {
819
+ "0": 529.7760009765625,
820
+ "1": 582.3048095703125
821
+ },
822
+ "flags": {},
823
+ "order": 25,
824
+ "mode": 0,
825
+ "inputs": [
826
+ {
827
+ "name": "images",
828
+ "type": "IMAGE",
829
+ "link": 56
830
+ }
831
+ ],
832
+ "properties": {},
833
+ "widgets_values": [
834
+ "IPAdapter"
835
+ ]
836
+ },
837
+ {
838
+ "id": 30,
839
+ "type": "KSampler",
840
+ "pos": [
841
+ 3590,
842
+ 1000
843
+ ],
844
+ "size": {
845
+ "0": 315,
846
+ "1": 262
847
+ },
848
+ "flags": {},
849
+ "order": 16,
850
+ "mode": 0,
851
+ "inputs": [
852
+ {
853
+ "name": "model",
854
+ "type": "MODEL",
855
+ "link": 61
856
+ },
857
+ {
858
+ "name": "positive",
859
+ "type": "CONDITIONING",
860
+ "link": 62
861
+ },
862
+ {
863
+ "name": "negative",
864
+ "type": "CONDITIONING",
865
+ "link": 63
866
+ },
867
+ {
868
+ "name": "latent_image",
869
+ "type": "LATENT",
870
+ "link": 64
871
+ }
872
+ ],
873
+ "outputs": [
874
+ {
875
+ "name": "LATENT",
876
+ "type": "LATENT",
877
+ "links": [
878
+ 65
879
+ ],
880
+ "slot_index": 0
881
+ }
882
+ ],
883
+ "properties": {
884
+ "Node name for S&R": "KSampler"
885
+ },
886
+ "widgets_values": [
887
+ 0,
888
+ "fixed",
889
+ 30,
890
+ 6.5,
891
+ "dpmpp_2m",
892
+ "karras",
893
+ 1
894
+ ]
895
+ },
896
+ {
897
+ "id": 31,
898
+ "type": "VAEDecode",
899
+ "pos": [
900
+ 3760,
901
+ 1340
902
+ ],
903
+ "size": {
904
+ "0": 140,
905
+ "1": 46
906
+ },
907
+ "flags": {},
908
+ "order": 21,
909
+ "mode": 0,
910
+ "inputs": [
911
+ {
912
+ "name": "samples",
913
+ "type": "LATENT",
914
+ "link": 65
915
+ },
916
+ {
917
+ "name": "vae",
918
+ "type": "VAE",
919
+ "link": 66
920
+ }
921
+ ],
922
+ "outputs": [
923
+ {
924
+ "name": "IMAGE",
925
+ "type": "IMAGE",
926
+ "links": [
927
+ 67
928
+ ],
929
+ "slot_index": 0
930
+ }
931
+ ],
932
+ "properties": {
933
+ "Node name for S&R": "VAEDecode"
934
+ }
935
+ },
936
+ {
937
+ "id": 32,
938
+ "type": "SaveImage",
939
+ "pos": [
940
+ 2610,
941
+ 940
942
+ ],
943
+ "size": {
944
+ "0": 529.7760009765625,
945
+ "1": 582.3048095703125
946
+ },
947
+ "flags": {},
948
+ "order": 26,
949
+ "mode": 0,
950
+ "inputs": [
951
+ {
952
+ "name": "images",
953
+ "type": "IMAGE",
954
+ "link": 67
955
+ }
956
+ ],
957
+ "properties": {},
958
+ "widgets_values": [
959
+ "IPAdapter"
960
+ ]
961
+ },
962
+ {
963
+ "id": 26,
964
+ "type": "KSampler",
965
+ "pos": [
966
+ 3590,
967
+ 350
968
+ ],
969
+ "size": {
970
+ "0": 315,
971
+ "1": 262
972
+ },
973
+ "flags": {},
974
+ "order": 15,
975
+ "mode": 0,
976
+ "inputs": [
977
+ {
978
+ "name": "model",
979
+ "type": "MODEL",
980
+ "link": 50
981
+ },
982
+ {
983
+ "name": "positive",
984
+ "type": "CONDITIONING",
985
+ "link": 51
986
+ },
987
+ {
988
+ "name": "negative",
989
+ "type": "CONDITIONING",
990
+ "link": 52
991
+ },
992
+ {
993
+ "name": "latent_image",
994
+ "type": "LATENT",
995
+ "link": 53
996
+ }
997
+ ],
998
+ "outputs": [
999
+ {
1000
+ "name": "LATENT",
1001
+ "type": "LATENT",
1002
+ "links": [
1003
+ 54
1004
+ ],
1005
+ "slot_index": 0
1006
+ }
1007
+ ],
1008
+ "properties": {
1009
+ "Node name for S&R": "KSampler"
1010
+ },
1011
+ "widgets_values": [
1012
+ 0,
1013
+ "fixed",
1014
+ 30,
1015
+ 6.5,
1016
+ "dpmpp_2m",
1017
+ "karras",
1018
+ 1
1019
+ ]
1020
+ },
1021
+ {
1022
+ "id": 29,
1023
+ "type": "IPAdapterAdvanced",
1024
+ "pos": [
1025
+ 3220,
1026
+ 310
1027
+ ],
1028
+ "size": {
1029
+ "0": 315,
1030
+ "1": 278
1031
+ },
1032
+ "flags": {},
1033
+ "order": 10,
1034
+ "mode": 0,
1035
+ "inputs": [
1036
+ {
1037
+ "name": "model",
1038
+ "type": "MODEL",
1039
+ "link": 57
1040
+ },
1041
+ {
1042
+ "name": "ipadapter",
1043
+ "type": "IPADAPTER",
1044
+ "link": 58,
1045
+ "slot_index": 1
1046
+ },
1047
+ {
1048
+ "name": "image",
1049
+ "type": "IMAGE",
1050
+ "link": 59
1051
+ },
1052
+ {
1053
+ "name": "image_negative",
1054
+ "type": "IMAGE",
1055
+ "link": null
1056
+ },
1057
+ {
1058
+ "name": "attn_mask",
1059
+ "type": "MASK",
1060
+ "link": null
1061
+ },
1062
+ {
1063
+ "name": "clip_vision",
1064
+ "type": "CLIP_VISION",
1065
+ "link": 60,
1066
+ "slot_index": 5
1067
+ }
1068
+ ],
1069
+ "outputs": [
1070
+ {
1071
+ "name": "MODEL",
1072
+ "type": "MODEL",
1073
+ "links": [
1074
+ 50
1075
+ ],
1076
+ "shape": 3,
1077
+ "slot_index": 0
1078
+ }
1079
+ ],
1080
+ "properties": {
1081
+ "Node name for S&R": "IPAdapterAdvanced"
1082
+ },
1083
+ "widgets_values": [
1084
+ 0.8,
1085
+ "ease in-out",
1086
+ "concat",
1087
+ 0,
1088
+ 1,
1089
+ "V only"
1090
+ ]
1091
+ },
1092
+ {
1093
+ "id": 33,
1094
+ "type": "IPAdapterAdvanced",
1095
+ "pos": [
1096
+ 3210,
1097
+ 960
1098
+ ],
1099
+ "size": {
1100
+ "0": 315,
1101
+ "1": 278
1102
+ },
1103
+ "flags": {},
1104
+ "order": 11,
1105
+ "mode": 0,
1106
+ "inputs": [
1107
+ {
1108
+ "name": "model",
1109
+ "type": "MODEL",
1110
+ "link": 68
1111
+ },
1112
+ {
1113
+ "name": "ipadapter",
1114
+ "type": "IPADAPTER",
1115
+ "link": 69,
1116
+ "slot_index": 1
1117
+ },
1118
+ {
1119
+ "name": "image",
1120
+ "type": "IMAGE",
1121
+ "link": 70
1122
+ },
1123
+ {
1124
+ "name": "image_negative",
1125
+ "type": "IMAGE",
1126
+ "link": null
1127
+ },
1128
+ {
1129
+ "name": "attn_mask",
1130
+ "type": "MASK",
1131
+ "link": null
1132
+ },
1133
+ {
1134
+ "name": "clip_vision",
1135
+ "type": "CLIP_VISION",
1136
+ "link": 71,
1137
+ "slot_index": 5
1138
+ }
1139
+ ],
1140
+ "outputs": [
1141
+ {
1142
+ "name": "MODEL",
1143
+ "type": "MODEL",
1144
+ "links": [
1145
+ 61
1146
+ ],
1147
+ "shape": 3,
1148
+ "slot_index": 0
1149
+ }
1150
+ ],
1151
+ "properties": {
1152
+ "Node name for S&R": "IPAdapterAdvanced"
1153
+ },
1154
+ "widgets_values": [
1155
+ 0.8,
1156
+ "reverse in-out",
1157
+ "concat",
1158
+ 0,
1159
+ 1,
1160
+ "V only"
1161
+ ]
1162
+ },
1163
+ {
1164
+ "id": 6,
1165
+ "type": "CLIPTextEncode",
1166
+ "pos": [
1167
+ 690,
1168
+ 610
1169
+ ],
1170
+ "size": {
1171
+ "0": 422.84503173828125,
1172
+ "1": 164.31304931640625
1173
+ },
1174
+ "flags": {},
1175
+ "order": 5,
1176
+ "mode": 0,
1177
+ "inputs": [
1178
+ {
1179
+ "name": "clip",
1180
+ "type": "CLIP",
1181
+ "link": 3
1182
+ }
1183
+ ],
1184
+ "outputs": [
1185
+ {
1186
+ "name": "CONDITIONING",
1187
+ "type": "CONDITIONING",
1188
+ "links": [
1189
+ 4,
1190
+ 29,
1191
+ 40,
1192
+ 51,
1193
+ 62
1194
+ ],
1195
+ "slot_index": 0
1196
+ }
1197
+ ],
1198
+ "properties": {
1199
+ "Node name for S&R": "CLIPTextEncode"
1200
+ },
1201
+ "widgets_values": [
1202
+ "closeup of a fierce warrior woman wearing a full armor at the end of a battle. cherry blossoms\n\nhigh quality, detailed"
1203
+ ]
1204
+ },
1205
+ {
1206
+ "id": 15,
1207
+ "type": "IPAdapterModelLoader",
1208
+ "pos": [
1209
+ 308,
1210
+ 52
1211
+ ],
1212
+ "size": {
1213
+ "0": 315,
1214
+ "1": 58
1215
+ },
1216
+ "flags": {},
1217
+ "order": 3,
1218
+ "mode": 0,
1219
+ "outputs": [
1220
+ {
1221
+ "name": "IPADAPTER",
1222
+ "type": "IPADAPTER",
1223
+ "links": [
1224
+ 21,
1225
+ 36,
1226
+ 47,
1227
+ 58,
1228
+ 69
1229
+ ],
1230
+ "shape": 3
1231
+ }
1232
+ ],
1233
+ "properties": {
1234
+ "Node name for S&R": "IPAdapterModelLoader"
1235
+ },
1236
+ "widgets_values": [
1237
+ "ip-adapter-plus_sd15.safetensors"
1238
+ ]
1239
+ },
1240
+ {
1241
+ "id": 16,
1242
+ "type": "CLIPVisionLoader",
1243
+ "pos": [
1244
+ 308,
1245
+ 161
1246
+ ],
1247
+ "size": {
1248
+ "0": 315,
1249
+ "1": 58
1250
+ },
1251
+ "flags": {},
1252
+ "order": 4,
1253
+ "mode": 0,
1254
+ "outputs": [
1255
+ {
1256
+ "name": "CLIP_VISION",
1257
+ "type": "CLIP_VISION",
1258
+ "links": [
1259
+ 24,
1260
+ 38,
1261
+ 49,
1262
+ 60,
1263
+ 71
1264
+ ],
1265
+ "shape": 3
1266
+ }
1267
+ ],
1268
+ "properties": {
1269
+ "Node name for S&R": "CLIPVisionLoader"
1270
+ },
1271
+ "widgets_values": [
1272
+ "CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors"
1273
+ ]
1274
+ }
1275
+ ],
1276
+ "links": [
1277
+ [
1278
+ 2,
1279
+ 5,
1280
+ 0,
1281
+ 3,
1282
+ 3,
1283
+ "LATENT"
1284
+ ],
1285
+ [
1286
+ 3,
1287
+ 4,
1288
+ 1,
1289
+ 6,
1290
+ 0,
1291
+ "CLIP"
1292
+ ],
1293
+ [
1294
+ 4,
1295
+ 6,
1296
+ 0,
1297
+ 3,
1298
+ 1,
1299
+ "CONDITIONING"
1300
+ ],
1301
+ [
1302
+ 5,
1303
+ 4,
1304
+ 1,
1305
+ 7,
1306
+ 0,
1307
+ "CLIP"
1308
+ ],
1309
+ [
1310
+ 6,
1311
+ 7,
1312
+ 0,
1313
+ 3,
1314
+ 2,
1315
+ "CONDITIONING"
1316
+ ],
1317
+ [
1318
+ 7,
1319
+ 3,
1320
+ 0,
1321
+ 8,
1322
+ 0,
1323
+ "LATENT"
1324
+ ],
1325
+ [
1326
+ 8,
1327
+ 4,
1328
+ 2,
1329
+ 8,
1330
+ 1,
1331
+ "VAE"
1332
+ ],
1333
+ [
1334
+ 9,
1335
+ 8,
1336
+ 0,
1337
+ 9,
1338
+ 0,
1339
+ "IMAGE"
1340
+ ],
1341
+ [
1342
+ 20,
1343
+ 4,
1344
+ 0,
1345
+ 14,
1346
+ 0,
1347
+ "MODEL"
1348
+ ],
1349
+ [
1350
+ 21,
1351
+ 15,
1352
+ 0,
1353
+ 14,
1354
+ 1,
1355
+ "IPADAPTER"
1356
+ ],
1357
+ [
1358
+ 23,
1359
+ 14,
1360
+ 0,
1361
+ 3,
1362
+ 0,
1363
+ "MODEL"
1364
+ ],
1365
+ [
1366
+ 24,
1367
+ 16,
1368
+ 0,
1369
+ 14,
1370
+ 5,
1371
+ "CLIP_VISION"
1372
+ ],
1373
+ [
1374
+ 27,
1375
+ 12,
1376
+ 0,
1377
+ 14,
1378
+ 2,
1379
+ "IMAGE"
1380
+ ],
1381
+ [
1382
+ 28,
1383
+ 21,
1384
+ 0,
1385
+ 18,
1386
+ 0,
1387
+ "MODEL"
1388
+ ],
1389
+ [
1390
+ 29,
1391
+ 6,
1392
+ 0,
1393
+ 18,
1394
+ 1,
1395
+ "CONDITIONING"
1396
+ ],
1397
+ [
1398
+ 30,
1399
+ 7,
1400
+ 0,
1401
+ 18,
1402
+ 2,
1403
+ "CONDITIONING"
1404
+ ],
1405
+ [
1406
+ 31,
1407
+ 5,
1408
+ 0,
1409
+ 18,
1410
+ 3,
1411
+ "LATENT"
1412
+ ],
1413
+ [
1414
+ 32,
1415
+ 18,
1416
+ 0,
1417
+ 19,
1418
+ 0,
1419
+ "LATENT"
1420
+ ],
1421
+ [
1422
+ 33,
1423
+ 4,
1424
+ 2,
1425
+ 19,
1426
+ 1,
1427
+ "VAE"
1428
+ ],
1429
+ [
1430
+ 34,
1431
+ 19,
1432
+ 0,
1433
+ 20,
1434
+ 0,
1435
+ "IMAGE"
1436
+ ],
1437
+ [
1438
+ 35,
1439
+ 4,
1440
+ 0,
1441
+ 21,
1442
+ 0,
1443
+ "MODEL"
1444
+ ],
1445
+ [
1446
+ 36,
1447
+ 15,
1448
+ 0,
1449
+ 21,
1450
+ 1,
1451
+ "IPADAPTER"
1452
+ ],
1453
+ [
1454
+ 37,
1455
+ 12,
1456
+ 0,
1457
+ 21,
1458
+ 2,
1459
+ "IMAGE"
1460
+ ],
1461
+ [
1462
+ 38,
1463
+ 16,
1464
+ 0,
1465
+ 21,
1466
+ 5,
1467
+ "CLIP_VISION"
1468
+ ],
1469
+ [
1470
+ 39,
1471
+ 25,
1472
+ 0,
1473
+ 22,
1474
+ 0,
1475
+ "MODEL"
1476
+ ],
1477
+ [
1478
+ 40,
1479
+ 6,
1480
+ 0,
1481
+ 22,
1482
+ 1,
1483
+ "CONDITIONING"
1484
+ ],
1485
+ [
1486
+ 41,
1487
+ 7,
1488
+ 0,
1489
+ 22,
1490
+ 2,
1491
+ "CONDITIONING"
1492
+ ],
1493
+ [
1494
+ 42,
1495
+ 5,
1496
+ 0,
1497
+ 22,
1498
+ 3,
1499
+ "LATENT"
1500
+ ],
1501
+ [
1502
+ 43,
1503
+ 22,
1504
+ 0,
1505
+ 23,
1506
+ 0,
1507
+ "LATENT"
1508
+ ],
1509
+ [
1510
+ 44,
1511
+ 4,
1512
+ 2,
1513
+ 23,
1514
+ 1,
1515
+ "VAE"
1516
+ ],
1517
+ [
1518
+ 45,
1519
+ 23,
1520
+ 0,
1521
+ 24,
1522
+ 0,
1523
+ "IMAGE"
1524
+ ],
1525
+ [
1526
+ 46,
1527
+ 4,
1528
+ 0,
1529
+ 25,
1530
+ 0,
1531
+ "MODEL"
1532
+ ],
1533
+ [
1534
+ 47,
1535
+ 15,
1536
+ 0,
1537
+ 25,
1538
+ 1,
1539
+ "IPADAPTER"
1540
+ ],
1541
+ [
1542
+ 48,
1543
+ 12,
1544
+ 0,
1545
+ 25,
1546
+ 2,
1547
+ "IMAGE"
1548
+ ],
1549
+ [
1550
+ 49,
1551
+ 16,
1552
+ 0,
1553
+ 25,
1554
+ 5,
1555
+ "CLIP_VISION"
1556
+ ],
1557
+ [
1558
+ 50,
1559
+ 29,
1560
+ 0,
1561
+ 26,
1562
+ 0,
1563
+ "MODEL"
1564
+ ],
1565
+ [
1566
+ 51,
1567
+ 6,
1568
+ 0,
1569
+ 26,
1570
+ 1,
1571
+ "CONDITIONING"
1572
+ ],
1573
+ [
1574
+ 52,
1575
+ 7,
1576
+ 0,
1577
+ 26,
1578
+ 2,
1579
+ "CONDITIONING"
1580
+ ],
1581
+ [
1582
+ 53,
1583
+ 5,
1584
+ 0,
1585
+ 26,
1586
+ 3,
1587
+ "LATENT"
1588
+ ],
1589
+ [
1590
+ 54,
1591
+ 26,
1592
+ 0,
1593
+ 27,
1594
+ 0,
1595
+ "LATENT"
1596
+ ],
1597
+ [
1598
+ 55,
1599
+ 4,
1600
+ 2,
1601
+ 27,
1602
+ 1,
1603
+ "VAE"
1604
+ ],
1605
+ [
1606
+ 56,
1607
+ 27,
1608
+ 0,
1609
+ 28,
1610
+ 0,
1611
+ "IMAGE"
1612
+ ],
1613
+ [
1614
+ 57,
1615
+ 4,
1616
+ 0,
1617
+ 29,
1618
+ 0,
1619
+ "MODEL"
1620
+ ],
1621
+ [
1622
+ 58,
1623
+ 15,
1624
+ 0,
1625
+ 29,
1626
+ 1,
1627
+ "IPADAPTER"
1628
+ ],
1629
+ [
1630
+ 59,
1631
+ 12,
1632
+ 0,
1633
+ 29,
1634
+ 2,
1635
+ "IMAGE"
1636
+ ],
1637
+ [
1638
+ 60,
1639
+ 16,
1640
+ 0,
1641
+ 29,
1642
+ 5,
1643
+ "CLIP_VISION"
1644
+ ],
1645
+ [
1646
+ 61,
1647
+ 33,
1648
+ 0,
1649
+ 30,
1650
+ 0,
1651
+ "MODEL"
1652
+ ],
1653
+ [
1654
+ 62,
1655
+ 6,
1656
+ 0,
1657
+ 30,
1658
+ 1,
1659
+ "CONDITIONING"
1660
+ ],
1661
+ [
1662
+ 63,
1663
+ 7,
1664
+ 0,
1665
+ 30,
1666
+ 2,
1667
+ "CONDITIONING"
1668
+ ],
1669
+ [
1670
+ 64,
1671
+ 5,
1672
+ 0,
1673
+ 30,
1674
+ 3,
1675
+ "LATENT"
1676
+ ],
1677
+ [
1678
+ 65,
1679
+ 30,
1680
+ 0,
1681
+ 31,
1682
+ 0,
1683
+ "LATENT"
1684
+ ],
1685
+ [
1686
+ 66,
1687
+ 4,
1688
+ 2,
1689
+ 31,
1690
+ 1,
1691
+ "VAE"
1692
+ ],
1693
+ [
1694
+ 67,
1695
+ 31,
1696
+ 0,
1697
+ 32,
1698
+ 0,
1699
+ "IMAGE"
1700
+ ],
1701
+ [
1702
+ 68,
1703
+ 4,
1704
+ 0,
1705
+ 33,
1706
+ 0,
1707
+ "MODEL"
1708
+ ],
1709
+ [
1710
+ 69,
1711
+ 15,
1712
+ 0,
1713
+ 33,
1714
+ 1,
1715
+ "IPADAPTER"
1716
+ ],
1717
+ [
1718
+ 70,
1719
+ 12,
1720
+ 0,
1721
+ 33,
1722
+ 2,
1723
+ "IMAGE"
1724
+ ],
1725
+ [
1726
+ 71,
1727
+ 16,
1728
+ 0,
1729
+ 33,
1730
+ 5,
1731
+ "CLIP_VISION"
1732
+ ]
1733
+ ],
1734
+ "groups": [],
1735
+ "config": {},
1736
+ "extra": {},
1737
+ "version": 0.4
1738
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_weighted_embeds.json ADDED
@@ -0,0 +1,836 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 18,
3
+ "last_link_id": 29,
4
+ "nodes": [
5
+ {
6
+ "id": 4,
7
+ "type": "CheckpointLoaderSimple",
8
+ "pos": [
9
+ 50,
10
+ 730
11
+ ],
12
+ "size": {
13
+ "0": 315,
14
+ "1": 98
15
+ },
16
+ "flags": {},
17
+ "order": 0,
18
+ "mode": 0,
19
+ "outputs": [
20
+ {
21
+ "name": "MODEL",
22
+ "type": "MODEL",
23
+ "links": [
24
+ 10
25
+ ],
26
+ "slot_index": 0
27
+ },
28
+ {
29
+ "name": "CLIP",
30
+ "type": "CLIP",
31
+ "links": [
32
+ 3,
33
+ 5
34
+ ],
35
+ "slot_index": 1
36
+ },
37
+ {
38
+ "name": "VAE",
39
+ "type": "VAE",
40
+ "links": [
41
+ 8
42
+ ],
43
+ "slot_index": 2
44
+ }
45
+ ],
46
+ "properties": {
47
+ "Node name for S&R": "CheckpointLoaderSimple"
48
+ },
49
+ "widgets_values": [
50
+ "sd15/realisticVisionV51_v51VAE.safetensors"
51
+ ]
52
+ },
53
+ {
54
+ "id": 6,
55
+ "type": "CLIPTextEncode",
56
+ "pos": [
57
+ 690,
58
+ 610
59
+ ],
60
+ "size": {
61
+ "0": 422.84503173828125,
62
+ "1": 164.31304931640625
63
+ },
64
+ "flags": {},
65
+ "order": 5,
66
+ "mode": 0,
67
+ "inputs": [
68
+ {
69
+ "name": "clip",
70
+ "type": "CLIP",
71
+ "link": 3
72
+ }
73
+ ],
74
+ "outputs": [
75
+ {
76
+ "name": "CONDITIONING",
77
+ "type": "CONDITIONING",
78
+ "links": [
79
+ 4
80
+ ],
81
+ "slot_index": 0
82
+ }
83
+ ],
84
+ "properties": {
85
+ "Node name for S&R": "CLIPTextEncode"
86
+ },
87
+ "widgets_values": [
88
+ "closeup of a fierce warrior woman wearing a full armor at the end of a battle\n\nhigh quality, detailed"
89
+ ]
90
+ },
91
+ {
92
+ "id": 9,
93
+ "type": "SaveImage",
94
+ "pos": [
95
+ 1770,
96
+ 710
97
+ ],
98
+ "size": {
99
+ "0": 529.7760009765625,
100
+ "1": 582.3048095703125
101
+ },
102
+ "flags": {},
103
+ "order": 13,
104
+ "mode": 0,
105
+ "inputs": [
106
+ {
107
+ "name": "images",
108
+ "type": "IMAGE",
109
+ "link": 9
110
+ }
111
+ ],
112
+ "properties": {},
113
+ "widgets_values": [
114
+ "IPAdapter"
115
+ ]
116
+ },
117
+ {
118
+ "id": 8,
119
+ "type": "VAEDecode",
120
+ "pos": [
121
+ 1570,
122
+ 700
123
+ ],
124
+ "size": {
125
+ "0": 140,
126
+ "1": 46
127
+ },
128
+ "flags": {},
129
+ "order": 12,
130
+ "mode": 0,
131
+ "inputs": [
132
+ {
133
+ "name": "samples",
134
+ "type": "LATENT",
135
+ "link": 7
136
+ },
137
+ {
138
+ "name": "vae",
139
+ "type": "VAE",
140
+ "link": 8
141
+ }
142
+ ],
143
+ "outputs": [
144
+ {
145
+ "name": "IMAGE",
146
+ "type": "IMAGE",
147
+ "links": [
148
+ 9
149
+ ],
150
+ "slot_index": 0
151
+ }
152
+ ],
153
+ "properties": {
154
+ "Node name for S&R": "VAEDecode"
155
+ }
156
+ },
157
+ {
158
+ "id": 5,
159
+ "type": "EmptyLatentImage",
160
+ "pos": [
161
+ 801,
162
+ 1097
163
+ ],
164
+ "size": {
165
+ "0": 315,
166
+ "1": 106
167
+ },
168
+ "flags": {},
169
+ "order": 1,
170
+ "mode": 0,
171
+ "outputs": [
172
+ {
173
+ "name": "LATENT",
174
+ "type": "LATENT",
175
+ "links": [
176
+ 2
177
+ ],
178
+ "slot_index": 0
179
+ }
180
+ ],
181
+ "properties": {
182
+ "Node name for S&R": "EmptyLatentImage"
183
+ },
184
+ "widgets_values": [
185
+ 512,
186
+ 512,
187
+ 1
188
+ ]
189
+ },
190
+ {
191
+ "id": 12,
192
+ "type": "LoadImage",
193
+ "pos": [
194
+ 453,
195
+ -296
196
+ ],
197
+ "size": {
198
+ "0": 315,
199
+ "1": 314
200
+ },
201
+ "flags": {},
202
+ "order": 2,
203
+ "mode": 0,
204
+ "outputs": [
205
+ {
206
+ "name": "IMAGE",
207
+ "type": "IMAGE",
208
+ "links": [
209
+ 21
210
+ ],
211
+ "shape": 3,
212
+ "slot_index": 0
213
+ },
214
+ {
215
+ "name": "MASK",
216
+ "type": "MASK",
217
+ "links": null,
218
+ "shape": 3
219
+ }
220
+ ],
221
+ "properties": {
222
+ "Node name for S&R": "LoadImage"
223
+ },
224
+ "widgets_values": [
225
+ "warrior_woman.png",
226
+ "image"
227
+ ]
228
+ },
229
+ {
230
+ "id": 15,
231
+ "type": "LoadImage",
232
+ "pos": [
233
+ 458,
234
+ 70
235
+ ],
236
+ "size": {
237
+ "0": 315,
238
+ "1": 314
239
+ },
240
+ "flags": {},
241
+ "order": 3,
242
+ "mode": 0,
243
+ "outputs": [
244
+ {
245
+ "name": "IMAGE",
246
+ "type": "IMAGE",
247
+ "links": [
248
+ 23
249
+ ],
250
+ "shape": 3,
251
+ "slot_index": 0
252
+ },
253
+ {
254
+ "name": "MASK",
255
+ "type": "MASK",
256
+ "links": null,
257
+ "shape": 3
258
+ }
259
+ ],
260
+ "properties": {
261
+ "Node name for S&R": "LoadImage"
262
+ },
263
+ "widgets_values": [
264
+ "anime_illustration.png",
265
+ "image"
266
+ ]
267
+ },
268
+ {
269
+ "id": 11,
270
+ "type": "IPAdapterUnifiedLoader",
271
+ "pos": [
272
+ 440,
273
+ 440
274
+ ],
275
+ "size": {
276
+ "0": 315,
277
+ "1": 78
278
+ },
279
+ "flags": {},
280
+ "order": 4,
281
+ "mode": 0,
282
+ "inputs": [
283
+ {
284
+ "name": "model",
285
+ "type": "MODEL",
286
+ "link": 10
287
+ },
288
+ {
289
+ "name": "ipadapter",
290
+ "type": "IPADAPTER",
291
+ "link": null
292
+ }
293
+ ],
294
+ "outputs": [
295
+ {
296
+ "name": "model",
297
+ "type": "MODEL",
298
+ "links": [
299
+ 19
300
+ ],
301
+ "shape": 3,
302
+ "slot_index": 0
303
+ },
304
+ {
305
+ "name": "ipadapter",
306
+ "type": "IPADAPTER",
307
+ "links": [
308
+ 20,
309
+ 22,
310
+ 27
311
+ ],
312
+ "shape": 3,
313
+ "slot_index": 1
314
+ }
315
+ ],
316
+ "properties": {
317
+ "Node name for S&R": "IPAdapterUnifiedLoader"
318
+ },
319
+ "widgets_values": [
320
+ "PLUS (high strength)"
321
+ ]
322
+ },
323
+ {
324
+ "id": 3,
325
+ "type": "KSampler",
326
+ "pos": [
327
+ 1210,
328
+ 700
329
+ ],
330
+ "size": {
331
+ "0": 315,
332
+ "1": 262
333
+ },
334
+ "flags": {},
335
+ "order": 11,
336
+ "mode": 0,
337
+ "inputs": [
338
+ {
339
+ "name": "model",
340
+ "type": "MODEL",
341
+ "link": 28
342
+ },
343
+ {
344
+ "name": "positive",
345
+ "type": "CONDITIONING",
346
+ "link": 4
347
+ },
348
+ {
349
+ "name": "negative",
350
+ "type": "CONDITIONING",
351
+ "link": 6
352
+ },
353
+ {
354
+ "name": "latent_image",
355
+ "type": "LATENT",
356
+ "link": 2
357
+ }
358
+ ],
359
+ "outputs": [
360
+ {
361
+ "name": "LATENT",
362
+ "type": "LATENT",
363
+ "links": [
364
+ 7
365
+ ],
366
+ "slot_index": 0
367
+ }
368
+ ],
369
+ "properties": {
370
+ "Node name for S&R": "KSampler"
371
+ },
372
+ "widgets_values": [
373
+ 0,
374
+ "fixed",
375
+ 30,
376
+ 6.5,
377
+ "dpmpp_2m",
378
+ "karras",
379
+ 1
380
+ ]
381
+ },
382
+ {
383
+ "id": 7,
384
+ "type": "CLIPTextEncode",
385
+ "pos": [
386
+ 690,
387
+ 840
388
+ ],
389
+ "size": {
390
+ "0": 425.27801513671875,
391
+ "1": 180.6060791015625
392
+ },
393
+ "flags": {},
394
+ "order": 6,
395
+ "mode": 0,
396
+ "inputs": [
397
+ {
398
+ "name": "clip",
399
+ "type": "CLIP",
400
+ "link": 5
401
+ }
402
+ ],
403
+ "outputs": [
404
+ {
405
+ "name": "CONDITIONING",
406
+ "type": "CONDITIONING",
407
+ "links": [
408
+ 6
409
+ ],
410
+ "slot_index": 0
411
+ }
412
+ ],
413
+ "properties": {
414
+ "Node name for S&R": "CLIPTextEncode"
415
+ },
416
+ "widgets_values": [
417
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed, hat, hood, scars, blood"
418
+ ]
419
+ },
420
+ {
421
+ "id": 17,
422
+ "type": "IPAdapterEncoder",
423
+ "pos": [
424
+ 859,
425
+ 69
426
+ ],
427
+ "size": [
428
+ 210,
429
+ 118
430
+ ],
431
+ "flags": {},
432
+ "order": 8,
433
+ "mode": 0,
434
+ "inputs": [
435
+ {
436
+ "name": "ipadapter",
437
+ "type": "IPADAPTER",
438
+ "link": 22
439
+ },
440
+ {
441
+ "name": "image",
442
+ "type": "IMAGE",
443
+ "link": 23
444
+ },
445
+ {
446
+ "name": "mask",
447
+ "type": "MASK",
448
+ "link": null
449
+ },
450
+ {
451
+ "name": "clip_vision",
452
+ "type": "CLIP_VISION",
453
+ "link": null
454
+ }
455
+ ],
456
+ "outputs": [
457
+ {
458
+ "name": "pos_embed",
459
+ "type": "EMBEDS",
460
+ "links": [
461
+ 25
462
+ ],
463
+ "shape": 3,
464
+ "slot_index": 0
465
+ },
466
+ {
467
+ "name": "neg_embed",
468
+ "type": "EMBEDS",
469
+ "links": null,
470
+ "shape": 3
471
+ }
472
+ ],
473
+ "properties": {
474
+ "Node name for S&R": "IPAdapterEncoder"
475
+ },
476
+ "widgets_values": [
477
+ 1.5
478
+ ]
479
+ },
480
+ {
481
+ "id": 18,
482
+ "type": "IPAdapterCombineEmbeds",
483
+ "pos": [
484
+ 1136,
485
+ -95
486
+ ],
487
+ "size": [
488
+ 210,
489
+ 138
490
+ ],
491
+ "flags": {},
492
+ "order": 9,
493
+ "mode": 0,
494
+ "inputs": [
495
+ {
496
+ "name": "embed1",
497
+ "type": "EMBEDS",
498
+ "link": 24
499
+ },
500
+ {
501
+ "name": "embed2",
502
+ "type": "EMBEDS",
503
+ "link": 25
504
+ },
505
+ {
506
+ "name": "embed3",
507
+ "type": "EMBEDS",
508
+ "link": null
509
+ },
510
+ {
511
+ "name": "embed4",
512
+ "type": "EMBEDS",
513
+ "link": null
514
+ },
515
+ {
516
+ "name": "embed5",
517
+ "type": "EMBEDS",
518
+ "link": null
519
+ }
520
+ ],
521
+ "outputs": [
522
+ {
523
+ "name": "EMBEDS",
524
+ "type": "EMBEDS",
525
+ "links": [
526
+ 26
527
+ ],
528
+ "shape": 3,
529
+ "slot_index": 0
530
+ }
531
+ ],
532
+ "properties": {
533
+ "Node name for S&R": "IPAdapterCombineEmbeds"
534
+ },
535
+ "widgets_values": [
536
+ "average"
537
+ ]
538
+ },
539
+ {
540
+ "id": 14,
541
+ "type": "IPAdapterEmbeds",
542
+ "pos": [
543
+ 1143,
544
+ 160
545
+ ],
546
+ "size": {
547
+ "0": 315,
548
+ "1": 230
549
+ },
550
+ "flags": {},
551
+ "order": 10,
552
+ "mode": 0,
553
+ "inputs": [
554
+ {
555
+ "name": "model",
556
+ "type": "MODEL",
557
+ "link": 19
558
+ },
559
+ {
560
+ "name": "ipadapter",
561
+ "type": "IPADAPTER",
562
+ "link": 27
563
+ },
564
+ {
565
+ "name": "pos_embed",
566
+ "type": "EMBEDS",
567
+ "link": 26
568
+ },
569
+ {
570
+ "name": "neg_embed",
571
+ "type": "EMBEDS",
572
+ "link": 29
573
+ },
574
+ {
575
+ "name": "attn_mask",
576
+ "type": "MASK",
577
+ "link": null
578
+ },
579
+ {
580
+ "name": "clip_vision",
581
+ "type": "CLIP_VISION",
582
+ "link": null
583
+ }
584
+ ],
585
+ "outputs": [
586
+ {
587
+ "name": "MODEL",
588
+ "type": "MODEL",
589
+ "links": [
590
+ 28
591
+ ],
592
+ "shape": 3,
593
+ "slot_index": 0
594
+ }
595
+ ],
596
+ "properties": {
597
+ "Node name for S&R": "IPAdapterEmbeds"
598
+ },
599
+ "widgets_values": [
600
+ 0.8,
601
+ "linear",
602
+ 0,
603
+ 1
604
+ ]
605
+ },
606
+ {
607
+ "id": 16,
608
+ "type": "IPAdapterEncoder",
609
+ "pos": [
610
+ 863,
611
+ -285
612
+ ],
613
+ "size": [
614
+ 210,
615
+ 118
616
+ ],
617
+ "flags": {},
618
+ "order": 7,
619
+ "mode": 0,
620
+ "inputs": [
621
+ {
622
+ "name": "ipadapter",
623
+ "type": "IPADAPTER",
624
+ "link": 20
625
+ },
626
+ {
627
+ "name": "image",
628
+ "type": "IMAGE",
629
+ "link": 21
630
+ },
631
+ {
632
+ "name": "mask",
633
+ "type": "MASK",
634
+ "link": null
635
+ },
636
+ {
637
+ "name": "clip_vision",
638
+ "type": "CLIP_VISION",
639
+ "link": null
640
+ }
641
+ ],
642
+ "outputs": [
643
+ {
644
+ "name": "pos_embed",
645
+ "type": "EMBEDS",
646
+ "links": [
647
+ 24
648
+ ],
649
+ "shape": 3,
650
+ "slot_index": 0
651
+ },
652
+ {
653
+ "name": "neg_embed",
654
+ "type": "EMBEDS",
655
+ "links": [
656
+ 29
657
+ ],
658
+ "shape": 3,
659
+ "slot_index": 1
660
+ }
661
+ ],
662
+ "properties": {
663
+ "Node name for S&R": "IPAdapterEncoder"
664
+ },
665
+ "widgets_values": [
666
+ 0.6
667
+ ]
668
+ }
669
+ ],
670
+ "links": [
671
+ [
672
+ 2,
673
+ 5,
674
+ 0,
675
+ 3,
676
+ 3,
677
+ "LATENT"
678
+ ],
679
+ [
680
+ 3,
681
+ 4,
682
+ 1,
683
+ 6,
684
+ 0,
685
+ "CLIP"
686
+ ],
687
+ [
688
+ 4,
689
+ 6,
690
+ 0,
691
+ 3,
692
+ 1,
693
+ "CONDITIONING"
694
+ ],
695
+ [
696
+ 5,
697
+ 4,
698
+ 1,
699
+ 7,
700
+ 0,
701
+ "CLIP"
702
+ ],
703
+ [
704
+ 6,
705
+ 7,
706
+ 0,
707
+ 3,
708
+ 2,
709
+ "CONDITIONING"
710
+ ],
711
+ [
712
+ 7,
713
+ 3,
714
+ 0,
715
+ 8,
716
+ 0,
717
+ "LATENT"
718
+ ],
719
+ [
720
+ 8,
721
+ 4,
722
+ 2,
723
+ 8,
724
+ 1,
725
+ "VAE"
726
+ ],
727
+ [
728
+ 9,
729
+ 8,
730
+ 0,
731
+ 9,
732
+ 0,
733
+ "IMAGE"
734
+ ],
735
+ [
736
+ 10,
737
+ 4,
738
+ 0,
739
+ 11,
740
+ 0,
741
+ "MODEL"
742
+ ],
743
+ [
744
+ 19,
745
+ 11,
746
+ 0,
747
+ 14,
748
+ 0,
749
+ "MODEL"
750
+ ],
751
+ [
752
+ 20,
753
+ 11,
754
+ 1,
755
+ 16,
756
+ 0,
757
+ "IPADAPTER"
758
+ ],
759
+ [
760
+ 21,
761
+ 12,
762
+ 0,
763
+ 16,
764
+ 1,
765
+ "IMAGE"
766
+ ],
767
+ [
768
+ 22,
769
+ 11,
770
+ 1,
771
+ 17,
772
+ 0,
773
+ "IPADAPTER"
774
+ ],
775
+ [
776
+ 23,
777
+ 15,
778
+ 0,
779
+ 17,
780
+ 1,
781
+ "IMAGE"
782
+ ],
783
+ [
784
+ 24,
785
+ 16,
786
+ 0,
787
+ 18,
788
+ 0,
789
+ "EMBEDS"
790
+ ],
791
+ [
792
+ 25,
793
+ 17,
794
+ 0,
795
+ 18,
796
+ 1,
797
+ "EMBEDS"
798
+ ],
799
+ [
800
+ 26,
801
+ 18,
802
+ 0,
803
+ 14,
804
+ 2,
805
+ "EMBEDS"
806
+ ],
807
+ [
808
+ 27,
809
+ 11,
810
+ 1,
811
+ 14,
812
+ 1,
813
+ "IPADAPTER"
814
+ ],
815
+ [
816
+ 28,
817
+ 14,
818
+ 0,
819
+ 3,
820
+ 0,
821
+ "MODEL"
822
+ ],
823
+ [
824
+ 29,
825
+ 16,
826
+ 1,
827
+ 14,
828
+ 3,
829
+ "EMBEDS"
830
+ ]
831
+ ],
832
+ "groups": [],
833
+ "config": {},
834
+ "extra": {},
835
+ "version": 0.4
836
+ }
ComfyUI_IPAdapter_plus/examples/ipadapter_weights.json ADDED
@@ -0,0 +1,764 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "last_node_id": 22,
3
+ "last_link_id": 40,
4
+ "nodes": [
5
+ {
6
+ "id": 7,
7
+ "type": "CLIPTextEncode",
8
+ "pos": [
9
+ 690,
10
+ 840
11
+ ],
12
+ "size": {
13
+ "0": 425.27801513671875,
14
+ "1": 180.6060791015625
15
+ },
16
+ "flags": {},
17
+ "order": 5,
18
+ "mode": 0,
19
+ "inputs": [
20
+ {
21
+ "name": "clip",
22
+ "type": "CLIP",
23
+ "link": 5
24
+ }
25
+ ],
26
+ "outputs": [
27
+ {
28
+ "name": "CONDITIONING",
29
+ "type": "CONDITIONING",
30
+ "links": [
31
+ 6
32
+ ],
33
+ "slot_index": 0
34
+ }
35
+ ],
36
+ "properties": {
37
+ "Node name for S&R": "CLIPTextEncode"
38
+ },
39
+ "widgets_values": [
40
+ "blurry, noisy, messy, lowres, jpeg, artifacts, ill, distorted, malformed"
41
+ ]
42
+ },
43
+ {
44
+ "id": 8,
45
+ "type": "VAEDecode",
46
+ "pos": [
47
+ 1570,
48
+ 700
49
+ ],
50
+ "size": {
51
+ "0": 140,
52
+ "1": 46
53
+ },
54
+ "flags": {},
55
+ "order": 11,
56
+ "mode": 0,
57
+ "inputs": [
58
+ {
59
+ "name": "samples",
60
+ "type": "LATENT",
61
+ "link": 7
62
+ },
63
+ {
64
+ "name": "vae",
65
+ "type": "VAE",
66
+ "link": 8
67
+ }
68
+ ],
69
+ "outputs": [
70
+ {
71
+ "name": "IMAGE",
72
+ "type": "IMAGE",
73
+ "links": [
74
+ 9
75
+ ],
76
+ "slot_index": 0
77
+ }
78
+ ],
79
+ "properties": {
80
+ "Node name for S&R": "VAEDecode"
81
+ }
82
+ },
83
+ {
84
+ "id": 6,
85
+ "type": "CLIPTextEncode",
86
+ "pos": [
87
+ 690,
88
+ 610
89
+ ],
90
+ "size": {
91
+ "0": 422.84503173828125,
92
+ "1": 164.31304931640625
93
+ },
94
+ "flags": {},
95
+ "order": 4,
96
+ "mode": 0,
97
+ "inputs": [
98
+ {
99
+ "name": "clip",
100
+ "type": "CLIP",
101
+ "link": 3
102
+ }
103
+ ],
104
+ "outputs": [
105
+ {
106
+ "name": "CONDITIONING",
107
+ "type": "CONDITIONING",
108
+ "links": [
109
+ 4
110
+ ],
111
+ "slot_index": 0
112
+ }
113
+ ],
114
+ "properties": {
115
+ "Node name for S&R": "CLIPTextEncode"
116
+ },
117
+ "widgets_values": [
118
+ "in a peaceful spring morning a woman wearing a white shirt is sitting in a park on a bench\n\nhigh quality, detailed, diffuse light"
119
+ ]
120
+ },
121
+ {
122
+ "id": 3,
123
+ "type": "KSampler",
124
+ "pos": [
125
+ 1210,
126
+ 700
127
+ ],
128
+ "size": {
129
+ "0": 315,
130
+ "1": 262
131
+ },
132
+ "flags": {},
133
+ "order": 10,
134
+ "mode": 0,
135
+ "inputs": [
136
+ {
137
+ "name": "model",
138
+ "type": "MODEL",
139
+ "link": 31
140
+ },
141
+ {
142
+ "name": "positive",
143
+ "type": "CONDITIONING",
144
+ "link": 4
145
+ },
146
+ {
147
+ "name": "negative",
148
+ "type": "CONDITIONING",
149
+ "link": 6
150
+ },
151
+ {
152
+ "name": "latent_image",
153
+ "type": "LATENT",
154
+ "link": 2
155
+ }
156
+ ],
157
+ "outputs": [
158
+ {
159
+ "name": "LATENT",
160
+ "type": "LATENT",
161
+ "links": [
162
+ 7
163
+ ],
164
+ "slot_index": 0
165
+ }
166
+ ],
167
+ "properties": {
168
+ "Node name for S&R": "KSampler"
169
+ },
170
+ "widgets_values": [
171
+ 0,
172
+ "fixed",
173
+ 30,
174
+ 6.5,
175
+ "ddpm",
176
+ "karras",
177
+ 1
178
+ ]
179
+ },
180
+ {
181
+ "id": 19,
182
+ "type": "IPAdapterBatch",
183
+ "pos": [
184
+ 1173,
185
+ 251
186
+ ],
187
+ "size": {
188
+ "0": 315,
189
+ "1": 254
190
+ },
191
+ "flags": {},
192
+ "order": 9,
193
+ "mode": 0,
194
+ "inputs": [
195
+ {
196
+ "name": "model",
197
+ "type": "MODEL",
198
+ "link": 37
199
+ },
200
+ {
201
+ "name": "ipadapter",
202
+ "type": "IPADAPTER",
203
+ "link": 29
204
+ },
205
+ {
206
+ "name": "image",
207
+ "type": "IMAGE",
208
+ "link": 30
209
+ },
210
+ {
211
+ "name": "image_negative",
212
+ "type": "IMAGE",
213
+ "link": null
214
+ },
215
+ {
216
+ "name": "attn_mask",
217
+ "type": "MASK",
218
+ "link": null
219
+ },
220
+ {
221
+ "name": "clip_vision",
222
+ "type": "CLIP_VISION",
223
+ "link": null
224
+ },
225
+ {
226
+ "name": "weight",
227
+ "type": "FLOAT",
228
+ "link": 38,
229
+ "widget": {
230
+ "name": "weight"
231
+ },
232
+ "slot_index": 6
233
+ }
234
+ ],
235
+ "outputs": [
236
+ {
237
+ "name": "MODEL",
238
+ "type": "MODEL",
239
+ "links": [
240
+ 31
241
+ ],
242
+ "shape": 3,
243
+ "slot_index": 0
244
+ }
245
+ ],
246
+ "properties": {
247
+ "Node name for S&R": "IPAdapterBatch"
248
+ },
249
+ "widgets_values": [
250
+ 1,
251
+ "linear",
252
+ 0,
253
+ 1,
254
+ "V only"
255
+ ]
256
+ },
257
+ {
258
+ "id": 18,
259
+ "type": "IPAdapterUnifiedLoader",
260
+ "pos": [
261
+ 303,
262
+ 132
263
+ ],
264
+ "size": {
265
+ "0": 315,
266
+ "1": 78
267
+ },
268
+ "flags": {},
269
+ "order": 3,
270
+ "mode": 0,
271
+ "inputs": [
272
+ {
273
+ "name": "model",
274
+ "type": "MODEL",
275
+ "link": 36
276
+ },
277
+ {
278
+ "name": "ipadapter",
279
+ "type": "IPADAPTER",
280
+ "link": null
281
+ }
282
+ ],
283
+ "outputs": [
284
+ {
285
+ "name": "model",
286
+ "type": "MODEL",
287
+ "links": [
288
+ 37
289
+ ],
290
+ "shape": 3,
291
+ "slot_index": 0
292
+ },
293
+ {
294
+ "name": "ipadapter",
295
+ "type": "IPADAPTER",
296
+ "links": [
297
+ 29
298
+ ],
299
+ "shape": 3
300
+ }
301
+ ],
302
+ "properties": {
303
+ "Node name for S&R": "IPAdapterUnifiedLoader"
304
+ },
305
+ "widgets_values": [
306
+ "PLUS (high strength)"
307
+ ]
308
+ },
309
+ {
310
+ "id": 4,
311
+ "type": "CheckpointLoaderSimple",
312
+ "pos": [
313
+ -79,
314
+ 712
315
+ ],
316
+ "size": {
317
+ "0": 315,
318
+ "1": 98
319
+ },
320
+ "flags": {},
321
+ "order": 0,
322
+ "mode": 0,
323
+ "outputs": [
324
+ {
325
+ "name": "MODEL",
326
+ "type": "MODEL",
327
+ "links": [
328
+ 36
329
+ ],
330
+ "slot_index": 0
331
+ },
332
+ {
333
+ "name": "CLIP",
334
+ "type": "CLIP",
335
+ "links": [
336
+ 3,
337
+ 5
338
+ ],
339
+ "slot_index": 1
340
+ },
341
+ {
342
+ "name": "VAE",
343
+ "type": "VAE",
344
+ "links": [
345
+ 8
346
+ ],
347
+ "slot_index": 2
348
+ }
349
+ ],
350
+ "properties": {
351
+ "Node name for S&R": "CheckpointLoaderSimple"
352
+ },
353
+ "widgets_values": [
354
+ "sd15/realisticVisionV51_v51VAE.safetensors"
355
+ ]
356
+ },
357
+ {
358
+ "id": 17,
359
+ "type": "PrepImageForClipVision",
360
+ "pos": [
361
+ 788,
362
+ 43
363
+ ],
364
+ "size": {
365
+ "0": 315,
366
+ "1": 106
367
+ },
368
+ "flags": {},
369
+ "order": 6,
370
+ "mode": 0,
371
+ "inputs": [
372
+ {
373
+ "name": "image",
374
+ "type": "IMAGE",
375
+ "link": 25
376
+ }
377
+ ],
378
+ "outputs": [
379
+ {
380
+ "name": "IMAGE",
381
+ "type": "IMAGE",
382
+ "links": [
383
+ 30
384
+ ],
385
+ "shape": 3,
386
+ "slot_index": 0
387
+ }
388
+ ],
389
+ "properties": {
390
+ "Node name for S&R": "PrepImageForClipVision"
391
+ },
392
+ "widgets_values": [
393
+ "LANCZOS",
394
+ "top",
395
+ 0.15
396
+ ]
397
+ },
398
+ {
399
+ "id": 9,
400
+ "type": "SaveImage",
401
+ "pos": [
402
+ 1770,
403
+ 710
404
+ ],
405
+ "size": {
406
+ "0": 556.2374267578125,
407
+ "1": 892.1895751953125
408
+ },
409
+ "flags": {},
410
+ "order": 12,
411
+ "mode": 0,
412
+ "inputs": [
413
+ {
414
+ "name": "images",
415
+ "type": "IMAGE",
416
+ "link": 9
417
+ }
418
+ ],
419
+ "properties": {},
420
+ "widgets_values": [
421
+ "IPAdapter"
422
+ ]
423
+ },
424
+ {
425
+ "id": 12,
426
+ "type": "LoadImage",
427
+ "pos": [
428
+ 311,
429
+ 270
430
+ ],
431
+ "size": {
432
+ "0": 315,
433
+ "1": 314
434
+ },
435
+ "flags": {},
436
+ "order": 1,
437
+ "mode": 0,
438
+ "outputs": [
439
+ {
440
+ "name": "IMAGE",
441
+ "type": "IMAGE",
442
+ "links": [
443
+ 25
444
+ ],
445
+ "shape": 3,
446
+ "slot_index": 0
447
+ },
448
+ {
449
+ "name": "MASK",
450
+ "type": "MASK",
451
+ "links": null,
452
+ "shape": 3
453
+ }
454
+ ],
455
+ "properties": {
456
+ "Node name for S&R": "LoadImage"
457
+ },
458
+ "widgets_values": [
459
+ "warrior_woman.png",
460
+ "image"
461
+ ]
462
+ },
463
+ {
464
+ "id": 5,
465
+ "type": "EmptyLatentImage",
466
+ "pos": [
467
+ 801,
468
+ 1097
469
+ ],
470
+ "size": [
471
+ 309.1109879864148,
472
+ 82
473
+ ],
474
+ "flags": {},
475
+ "order": 7,
476
+ "mode": 0,
477
+ "inputs": [
478
+ {
479
+ "name": "batch_size",
480
+ "type": "INT",
481
+ "link": 35,
482
+ "widget": {
483
+ "name": "batch_size"
484
+ }
485
+ }
486
+ ],
487
+ "outputs": [
488
+ {
489
+ "name": "LATENT",
490
+ "type": "LATENT",
491
+ "links": [
492
+ 2
493
+ ],
494
+ "slot_index": 0
495
+ }
496
+ ],
497
+ "properties": {
498
+ "Node name for S&R": "EmptyLatentImage"
499
+ },
500
+ "widgets_values": [
501
+ 512,
502
+ 512,
503
+ 6
504
+ ]
505
+ },
506
+ {
507
+ "id": 21,
508
+ "type": "PrimitiveNode",
509
+ "pos": [
510
+ 340,
511
+ 1093
512
+ ],
513
+ "size": {
514
+ "0": 210,
515
+ "1": 82
516
+ },
517
+ "flags": {},
518
+ "order": 2,
519
+ "mode": 0,
520
+ "outputs": [
521
+ {
522
+ "name": "INT",
523
+ "type": "INT",
524
+ "links": [
525
+ 35,
526
+ 40
527
+ ],
528
+ "widget": {
529
+ "name": "batch_size"
530
+ },
531
+ "slot_index": 0
532
+ }
533
+ ],
534
+ "title": "frames",
535
+ "properties": {
536
+ "Run widget replace on values": false
537
+ },
538
+ "widgets_values": [
539
+ 6,
540
+ "fixed"
541
+ ]
542
+ },
543
+ {
544
+ "id": 22,
545
+ "type": "IPAdapterWeights",
546
+ "pos": [
547
+ 761,
548
+ 208
549
+ ],
550
+ "size": [
551
+ 299.9049990375719,
552
+ 324.00000762939453
553
+ ],
554
+ "flags": {},
555
+ "order": 8,
556
+ "mode": 0,
557
+ "inputs": [
558
+ {
559
+ "name": "image",
560
+ "type": "IMAGE",
561
+ "link": null
562
+ },
563
+ {
564
+ "name": "frames",
565
+ "type": "INT",
566
+ "link": 40,
567
+ "widget": {
568
+ "name": "frames"
569
+ }
570
+ }
571
+ ],
572
+ "outputs": [
573
+ {
574
+ "name": "weights",
575
+ "type": "FLOAT",
576
+ "links": [
577
+ 38
578
+ ],
579
+ "shape": 3,
580
+ "slot_index": 0
581
+ },
582
+ {
583
+ "name": "weights_invert",
584
+ "type": "FLOAT",
585
+ "links": null,
586
+ "shape": 3
587
+ },
588
+ {
589
+ "name": "total_frames",
590
+ "type": "INT",
591
+ "links": null,
592
+ "shape": 3
593
+ },
594
+ {
595
+ "name": "image_1",
596
+ "type": "IMAGE",
597
+ "links": null,
598
+ "shape": 3
599
+ },
600
+ {
601
+ "name": "image_2",
602
+ "type": "IMAGE",
603
+ "links": null,
604
+ "shape": 3
605
+ }
606
+ ],
607
+ "properties": {
608
+ "Node name for S&R": "IPAdapterWeights"
609
+ },
610
+ "widgets_values": [
611
+ "1.0, 0.0",
612
+ "linear",
613
+ 6,
614
+ 0,
615
+ 9999,
616
+ 0,
617
+ 0,
618
+ "full batch"
619
+ ]
620
+ }
621
+ ],
622
+ "links": [
623
+ [
624
+ 2,
625
+ 5,
626
+ 0,
627
+ 3,
628
+ 3,
629
+ "LATENT"
630
+ ],
631
+ [
632
+ 3,
633
+ 4,
634
+ 1,
635
+ 6,
636
+ 0,
637
+ "CLIP"
638
+ ],
639
+ [
640
+ 4,
641
+ 6,
642
+ 0,
643
+ 3,
644
+ 1,
645
+ "CONDITIONING"
646
+ ],
647
+ [
648
+ 5,
649
+ 4,
650
+ 1,
651
+ 7,
652
+ 0,
653
+ "CLIP"
654
+ ],
655
+ [
656
+ 6,
657
+ 7,
658
+ 0,
659
+ 3,
660
+ 2,
661
+ "CONDITIONING"
662
+ ],
663
+ [
664
+ 7,
665
+ 3,
666
+ 0,
667
+ 8,
668
+ 0,
669
+ "LATENT"
670
+ ],
671
+ [
672
+ 8,
673
+ 4,
674
+ 2,
675
+ 8,
676
+ 1,
677
+ "VAE"
678
+ ],
679
+ [
680
+ 9,
681
+ 8,
682
+ 0,
683
+ 9,
684
+ 0,
685
+ "IMAGE"
686
+ ],
687
+ [
688
+ 25,
689
+ 12,
690
+ 0,
691
+ 17,
692
+ 0,
693
+ "IMAGE"
694
+ ],
695
+ [
696
+ 29,
697
+ 18,
698
+ 1,
699
+ 19,
700
+ 1,
701
+ "IPADAPTER"
702
+ ],
703
+ [
704
+ 30,
705
+ 17,
706
+ 0,
707
+ 19,
708
+ 2,
709
+ "IMAGE"
710
+ ],
711
+ [
712
+ 31,
713
+ 19,
714
+ 0,
715
+ 3,
716
+ 0,
717
+ "MODEL"
718
+ ],
719
+ [
720
+ 35,
721
+ 21,
722
+ 0,
723
+ 5,
724
+ 0,
725
+ "INT"
726
+ ],
727
+ [
728
+ 36,
729
+ 4,
730
+ 0,
731
+ 18,
732
+ 0,
733
+ "MODEL"
734
+ ],
735
+ [
736
+ 37,
737
+ 18,
738
+ 0,
739
+ 19,
740
+ 0,
741
+ "MODEL"
742
+ ],
743
+ [
744
+ 38,
745
+ 22,
746
+ 0,
747
+ 19,
748
+ 6,
749
+ "FLOAT"
750
+ ],
751
+ [
752
+ 40,
753
+ 21,
754
+ 0,
755
+ 22,
756
+ 1,
757
+ "INT"
758
+ ]
759
+ ],
760
+ "groups": [],
761
+ "config": {},
762
+ "extra": {},
763
+ "version": 0.4
764
+ }
ComfyUI_IPAdapter_plus/image_proj_models.py ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import math
2
+ import torch
3
+ import torch.nn as nn
4
+ from einops import rearrange
5
+ from einops.layers.torch import Rearrange
6
+
7
+
8
+ # FFN
9
+ def FeedForward(dim, mult=4):
10
+ inner_dim = int(dim * mult)
11
+ return nn.Sequential(
12
+ nn.LayerNorm(dim),
13
+ nn.Linear(dim, inner_dim, bias=False),
14
+ nn.GELU(),
15
+ nn.Linear(inner_dim, dim, bias=False),
16
+ )
17
+
18
+
19
+ def reshape_tensor(x, heads):
20
+ bs, length, width = x.shape
21
+ # (bs, length, width) --> (bs, length, n_heads, dim_per_head)
22
+ x = x.view(bs, length, heads, -1)
23
+ # (bs, length, n_heads, dim_per_head) --> (bs, n_heads, length, dim_per_head)
24
+ x = x.transpose(1, 2)
25
+ # (bs, n_heads, length, dim_per_head) --> (bs*n_heads, length, dim_per_head)
26
+ x = x.reshape(bs, heads, length, -1)
27
+ return x
28
+
29
+
30
+ class PerceiverAttention(nn.Module):
31
+ def __init__(self, *, dim, dim_head=64, heads=8):
32
+ super().__init__()
33
+ self.scale = dim_head**-0.5
34
+ self.dim_head = dim_head
35
+ self.heads = heads
36
+ inner_dim = dim_head * heads
37
+
38
+ self.norm1 = nn.LayerNorm(dim)
39
+ self.norm2 = nn.LayerNorm(dim)
40
+
41
+ self.to_q = nn.Linear(dim, inner_dim, bias=False)
42
+ self.to_kv = nn.Linear(dim, inner_dim * 2, bias=False)
43
+ self.to_out = nn.Linear(inner_dim, dim, bias=False)
44
+
45
+ def forward(self, x, latents):
46
+ """
47
+ Args:
48
+ x (torch.Tensor): image features
49
+ shape (b, n1, D)
50
+ latent (torch.Tensor): latent features
51
+ shape (b, n2, D)
52
+ """
53
+ x = self.norm1(x)
54
+ latents = self.norm2(latents)
55
+
56
+ b, l, _ = latents.shape
57
+
58
+ q = self.to_q(latents)
59
+ kv_input = torch.cat((x, latents), dim=-2)
60
+ k, v = self.to_kv(kv_input).chunk(2, dim=-1)
61
+
62
+ q = reshape_tensor(q, self.heads)
63
+ k = reshape_tensor(k, self.heads)
64
+ v = reshape_tensor(v, self.heads)
65
+
66
+ # attention
67
+ scale = 1 / math.sqrt(math.sqrt(self.dim_head))
68
+ weight = (q * scale) @ (k * scale).transpose(-2, -1) # More stable with f16 than dividing afterwards
69
+ weight = torch.softmax(weight.float(), dim=-1).type(weight.dtype)
70
+ out = weight @ v
71
+
72
+ out = out.permute(0, 2, 1, 3).reshape(b, l, -1)
73
+
74
+ return self.to_out(out)
75
+
76
+
77
+ class Resampler(nn.Module):
78
+ def __init__(
79
+ self,
80
+ dim=1024,
81
+ depth=8,
82
+ dim_head=64,
83
+ heads=16,
84
+ num_queries=8,
85
+ embedding_dim=768,
86
+ output_dim=1024,
87
+ ff_mult=4,
88
+ max_seq_len: int = 257, # CLIP tokens + CLS token
89
+ apply_pos_emb: bool = False,
90
+ num_latents_mean_pooled: int = 0, # number of latents derived from mean pooled representation of the sequence
91
+ ):
92
+ super().__init__()
93
+ self.pos_emb = nn.Embedding(max_seq_len, embedding_dim) if apply_pos_emb else None
94
+
95
+ self.latents = nn.Parameter(torch.randn(1, num_queries, dim) / dim**0.5)
96
+
97
+ self.proj_in = nn.Linear(embedding_dim, dim)
98
+
99
+ self.proj_out = nn.Linear(dim, output_dim)
100
+ self.norm_out = nn.LayerNorm(output_dim)
101
+
102
+ self.to_latents_from_mean_pooled_seq = (
103
+ nn.Sequential(
104
+ nn.LayerNorm(dim),
105
+ nn.Linear(dim, dim * num_latents_mean_pooled),
106
+ Rearrange("b (n d) -> b n d", n=num_latents_mean_pooled),
107
+ )
108
+ if num_latents_mean_pooled > 0
109
+ else None
110
+ )
111
+
112
+ self.layers = nn.ModuleList([])
113
+ for _ in range(depth):
114
+ self.layers.append(
115
+ nn.ModuleList(
116
+ [
117
+ PerceiverAttention(dim=dim, dim_head=dim_head, heads=heads),
118
+ FeedForward(dim=dim, mult=ff_mult),
119
+ ]
120
+ )
121
+ )
122
+
123
+ def forward(self, x):
124
+ if self.pos_emb is not None:
125
+ n, device = x.shape[1], x.device
126
+ pos_emb = self.pos_emb(torch.arange(n, device=device))
127
+ x = x + pos_emb
128
+
129
+ latents = self.latents.repeat(x.size(0), 1, 1)
130
+
131
+ x = self.proj_in(x)
132
+
133
+ if self.to_latents_from_mean_pooled_seq:
134
+ meanpooled_seq = masked_mean(x, dim=1, mask=torch.ones(x.shape[:2], device=x.device, dtype=torch.bool))
135
+ meanpooled_latents = self.to_latents_from_mean_pooled_seq(meanpooled_seq)
136
+ latents = torch.cat((meanpooled_latents, latents), dim=-2)
137
+
138
+ for attn, ff in self.layers:
139
+ latents = attn(x, latents) + latents
140
+ latents = ff(latents) + latents
141
+
142
+ latents = self.proj_out(latents)
143
+ return self.norm_out(latents)
144
+
145
+
146
+ def masked_mean(t, *, dim, mask=None):
147
+ if mask is None:
148
+ return t.mean(dim=dim)
149
+
150
+ denom = mask.sum(dim=dim, keepdim=True)
151
+ mask = rearrange(mask, "b n -> b n 1")
152
+ masked_t = t.masked_fill(~mask, 0.0)
153
+
154
+ return masked_t.sum(dim=dim) / denom.clamp(min=1e-5)
155
+
156
+
157
+ class FacePerceiverResampler(nn.Module):
158
+ def __init__(
159
+ self,
160
+ *,
161
+ dim=768,
162
+ depth=4,
163
+ dim_head=64,
164
+ heads=16,
165
+ embedding_dim=1280,
166
+ output_dim=768,
167
+ ff_mult=4,
168
+ ):
169
+ super().__init__()
170
+
171
+ self.proj_in = nn.Linear(embedding_dim, dim)
172
+ self.proj_out = nn.Linear(dim, output_dim)
173
+ self.norm_out = nn.LayerNorm(output_dim)
174
+ self.layers = nn.ModuleList([])
175
+ for _ in range(depth):
176
+ self.layers.append(
177
+ nn.ModuleList(
178
+ [
179
+ PerceiverAttention(dim=dim, dim_head=dim_head, heads=heads),
180
+ FeedForward(dim=dim, mult=ff_mult),
181
+ ]
182
+ )
183
+ )
184
+
185
+ def forward(self, latents, x):
186
+ x = self.proj_in(x)
187
+ for attn, ff in self.layers:
188
+ latents = attn(x, latents) + latents
189
+ latents = ff(latents) + latents
190
+ latents = self.proj_out(latents)
191
+ return self.norm_out(latents)
192
+
193
+
194
+ class MLPProjModel(nn.Module):
195
+ def __init__(self, cross_attention_dim=1024, clip_embeddings_dim=1024):
196
+ super().__init__()
197
+
198
+ self.proj = nn.Sequential(
199
+ nn.Linear(clip_embeddings_dim, clip_embeddings_dim),
200
+ nn.GELU(),
201
+ nn.Linear(clip_embeddings_dim, cross_attention_dim),
202
+ nn.LayerNorm(cross_attention_dim)
203
+ )
204
+
205
+ def forward(self, image_embeds):
206
+ clip_extra_context_tokens = self.proj(image_embeds)
207
+ return clip_extra_context_tokens
208
+
209
+ class MLPProjModelFaceId(nn.Module):
210
+ def __init__(self, cross_attention_dim=768, id_embeddings_dim=512, num_tokens=4):
211
+ super().__init__()
212
+
213
+ self.cross_attention_dim = cross_attention_dim
214
+ self.num_tokens = num_tokens
215
+
216
+ self.proj = nn.Sequential(
217
+ nn.Linear(id_embeddings_dim, id_embeddings_dim*2),
218
+ nn.GELU(),
219
+ nn.Linear(id_embeddings_dim*2, cross_attention_dim*num_tokens),
220
+ )
221
+ self.norm = nn.LayerNorm(cross_attention_dim)
222
+
223
+ def forward(self, id_embeds):
224
+ x = self.proj(id_embeds)
225
+ x = x.reshape(-1, self.num_tokens, self.cross_attention_dim)
226
+ x = self.norm(x)
227
+ return x
228
+
229
+ class ProjModelFaceIdPlus(nn.Module):
230
+ def __init__(self, cross_attention_dim=768, id_embeddings_dim=512, clip_embeddings_dim=1280, num_tokens=4):
231
+ super().__init__()
232
+
233
+ self.cross_attention_dim = cross_attention_dim
234
+ self.num_tokens = num_tokens
235
+
236
+ self.proj = nn.Sequential(
237
+ nn.Linear(id_embeddings_dim, id_embeddings_dim*2),
238
+ nn.GELU(),
239
+ nn.Linear(id_embeddings_dim*2, cross_attention_dim*num_tokens),
240
+ )
241
+ self.norm = nn.LayerNorm(cross_attention_dim)
242
+
243
+ self.perceiver_resampler = FacePerceiverResampler(
244
+ dim=cross_attention_dim,
245
+ depth=4,
246
+ dim_head=64,
247
+ heads=cross_attention_dim // 64,
248
+ embedding_dim=clip_embeddings_dim,
249
+ output_dim=cross_attention_dim,
250
+ ff_mult=4,
251
+ )
252
+
253
+ def forward(self, id_embeds, clip_embeds, scale=1.0, shortcut=False):
254
+ x = self.proj(id_embeds)
255
+ x = x.reshape(-1, self.num_tokens, self.cross_attention_dim)
256
+ x = self.norm(x)
257
+ out = self.perceiver_resampler(x, clip_embeds)
258
+ if shortcut:
259
+ out = x + scale * out
260
+ return out
261
+
262
+ class ImageProjModel(nn.Module):
263
+ def __init__(self, cross_attention_dim=1024, clip_embeddings_dim=1024, clip_extra_context_tokens=4):
264
+ super().__init__()
265
+
266
+ self.cross_attention_dim = cross_attention_dim
267
+ self.clip_extra_context_tokens = clip_extra_context_tokens
268
+ self.proj = nn.Linear(clip_embeddings_dim, self.clip_extra_context_tokens * cross_attention_dim)
269
+ self.norm = nn.LayerNorm(cross_attention_dim)
270
+
271
+ def forward(self, image_embeds):
272
+ embeds = image_embeds
273
+ x = self.proj(embeds).reshape(-1, self.clip_extra_context_tokens, self.cross_attention_dim)
274
+ x = self.norm(x)
275
+ return x
ComfyUI_IPAdapter_plus/models/legacy_directory_do_not_use.txt ADDED
File without changes
ComfyUI_IPAdapter_plus/pyproject.toml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "comfyui_ipadapter_plus"
3
+ description = "ComfyUI reference implementation for the IPAdapter models. The IPAdapter are very powerful models for image conditioning. The style and composition of a reference can be easily transferred to the generation. Think of it as a 1-image lora."
4
+ version = "2.0.0"
5
+ license = "GPL-3.0 license"
6
+
7
+ [project.urls]
8
+ Repository = "https://github.com/cubiq/ComfyUI_IPAdapter_plus"
9
+ # Used by Comfy Registry https://comfyregistry.org
10
+
11
+ [tool.comfy]
12
+ PublisherId = "matteo"
13
+ DisplayName = "ComfyUI_IPAdapter_plus"
14
+ Icon = ""
ComfyUI_IPAdapter_plus/utils.py ADDED
@@ -0,0 +1,388 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import re
2
+ import torch
3
+ import os
4
+ import folder_paths
5
+ from comfy.clip_vision import clip_preprocess, Output
6
+ import comfy.utils
7
+ import comfy.model_management as model_management
8
+ try:
9
+ import torchvision.transforms.v2 as T
10
+ except ImportError:
11
+ import torchvision.transforms as T
12
+
13
+ def get_clipvision_file(preset):
14
+ preset = preset.lower()
15
+ clipvision_list = folder_paths.get_filename_list("clip_vision")
16
+
17
+ if preset.startswith("vit-g"):
18
+ pattern = r'(ViT.bigG.14.*39B.b160k|ipadapter.*sdxl|sdxl.*model)\.(bin|safetensors)'
19
+ elif preset.startswith("kolors"):
20
+ pattern = r'clip.vit.large.patch14.336\.(bin|safetensors)'
21
+ else:
22
+ pattern = r'(ViT.H.14.*s32B.b79K|ipadapter.*sd15|sd1.?5.*model)\.(bin|safetensors)'
23
+ clipvision_file = [e for e in clipvision_list if re.search(pattern, e, re.IGNORECASE)]
24
+
25
+ clipvision_file = folder_paths.get_full_path("clip_vision", clipvision_file[0]) if clipvision_file else None
26
+
27
+ return clipvision_file
28
+
29
+ def get_ipadapter_file(preset, is_sdxl):
30
+ preset = preset.lower()
31
+ ipadapter_list = folder_paths.get_filename_list("ipadapter")
32
+ is_insightface = False
33
+ lora_pattern = None
34
+
35
+ if preset.startswith("light"):
36
+ if is_sdxl:
37
+ raise Exception("light model is not supported for SDXL")
38
+ pattern = r'sd15.light.v11\.(safetensors|bin)$'
39
+ # if v11 is not found, try with the old version
40
+ if not [e for e in ipadapter_list if re.search(pattern, e, re.IGNORECASE)]:
41
+ pattern = r'sd15.light\.(safetensors|bin)$'
42
+ elif preset.startswith("standard"):
43
+ if is_sdxl:
44
+ pattern = r'ip.adapter.sdxl.vit.h\.(safetensors|bin)$'
45
+ else:
46
+ pattern = r'ip.adapter.sd15\.(safetensors|bin)$'
47
+ elif preset.startswith("vit-g"):
48
+ if is_sdxl:
49
+ pattern = r'ip.adapter.sdxl\.(safetensors|bin)$'
50
+ else:
51
+ pattern = r'sd15.vit.g\.(safetensors|bin)$'
52
+ elif preset.startswith("plus ("):
53
+ if is_sdxl:
54
+ pattern = r'plus.sdxl.vit.h\.(safetensors|bin)$'
55
+ else:
56
+ pattern = r'ip.adapter.plus.sd15\.(safetensors|bin)$'
57
+ elif preset.startswith("plus face"):
58
+ if is_sdxl:
59
+ pattern = r'plus.face.sdxl.vit.h\.(safetensors|bin)$'
60
+ else:
61
+ pattern = r'plus.face.sd15\.(safetensors|bin)$'
62
+ elif preset.startswith("full"):
63
+ if is_sdxl:
64
+ raise Exception("full face model is not supported for SDXL")
65
+ pattern = r'full.face.sd15\.(safetensors|bin)$'
66
+ elif preset.startswith("faceid portrait ("):
67
+ if is_sdxl:
68
+ pattern = r'portrait.sdxl\.(safetensors|bin)$'
69
+ else:
70
+ pattern = r'portrait.v11.sd15\.(safetensors|bin)$'
71
+ # if v11 is not found, try with the old version
72
+ if not [e for e in ipadapter_list if re.search(pattern, e, re.IGNORECASE)]:
73
+ pattern = r'portrait.sd15\.(safetensors|bin)$'
74
+ is_insightface = True
75
+ elif preset.startswith("faceid portrait unnorm"):
76
+ if is_sdxl:
77
+ pattern = r'portrait.sdxl.unnorm\.(safetensors|bin)$'
78
+ else:
79
+ raise Exception("portrait unnorm model is not supported for SD1.5")
80
+ is_insightface = True
81
+ elif preset == "faceid":
82
+ if is_sdxl:
83
+ pattern = r'faceid.sdxl\.(safetensors|bin)$'
84
+ lora_pattern = r'faceid.sdxl.lora\.safetensors$'
85
+ else:
86
+ pattern = r'faceid.sd15\.(safetensors|bin)$'
87
+ lora_pattern = r'faceid.sd15.lora\.safetensors$'
88
+ is_insightface = True
89
+ elif preset.startswith("faceid plus -"):
90
+ if is_sdxl:
91
+ raise Exception("faceid plus model is not supported for SDXL")
92
+ pattern = r'faceid.plus.sd15\.(safetensors|bin)$'
93
+ lora_pattern = r'faceid.plus.sd15.lora\.safetensors$'
94
+ is_insightface = True
95
+ elif preset.startswith("faceid plus v2"):
96
+ if is_sdxl:
97
+ pattern = r'faceid.plusv2.sdxl\.(safetensors|bin)$'
98
+ lora_pattern = r'faceid.plusv2.sdxl.lora\.safetensors$'
99
+ else:
100
+ pattern = r'faceid.plusv2.sd15\.(safetensors|bin)$'
101
+ lora_pattern = r'faceid.plusv2.sd15.lora\.safetensors$'
102
+ is_insightface = True
103
+ # Community's models
104
+ elif preset.startswith("composition"):
105
+ if is_sdxl:
106
+ pattern = r'plus.composition.sdxl\.safetensors$'
107
+ else:
108
+ pattern = r'plus.composition.sd15\.safetensors$'
109
+ elif preset.startswith("kolors"):
110
+ if is_sdxl:
111
+ pattern = r'(ip_adapter_plus_general|kolors.ip.adapter.plus)\.(safetensors|bin)$'
112
+ else:
113
+ raise Exception("Only supported for Kolors model")
114
+ else:
115
+ raise Exception(f"invalid type '{preset}'")
116
+
117
+ ipadapter_file = [e for e in ipadapter_list if re.search(pattern, e, re.IGNORECASE)]
118
+ ipadapter_file = folder_paths.get_full_path("ipadapter", ipadapter_file[0]) if ipadapter_file else None
119
+
120
+ return ipadapter_file, is_insightface, lora_pattern
121
+
122
+ def get_lora_file(pattern):
123
+ lora_list = folder_paths.get_filename_list("loras")
124
+ lora_file = [e for e in lora_list if re.search(pattern, e, re.IGNORECASE)]
125
+ lora_file = folder_paths.get_full_path("loras", lora_file[0]) if lora_file else None
126
+
127
+ return lora_file
128
+
129
+ def ipadapter_model_loader(file):
130
+ model = comfy.utils.load_torch_file(file, safe_load=True)
131
+
132
+ if file.lower().endswith(".safetensors"):
133
+ st_model = {"image_proj": {}, "ip_adapter": {}}
134
+ for key in model.keys():
135
+ if key.startswith("image_proj."):
136
+ st_model["image_proj"][key.replace("image_proj.", "")] = model[key]
137
+ elif key.startswith("ip_adapter."):
138
+ st_model["ip_adapter"][key.replace("ip_adapter.", "")] = model[key]
139
+ elif key.startswith("adapter_modules."):
140
+ st_model["ip_adapter"][key.replace("adapter_modules.", "")] = model[key]
141
+ model = st_model
142
+ del st_model
143
+ elif "adapter_modules" in model.keys():
144
+ model["ip_adapter"] = model.pop("adapter_modules")
145
+
146
+ if not "ip_adapter" in model.keys() or not model["ip_adapter"]:
147
+ raise Exception("invalid IPAdapter model {}".format(file))
148
+
149
+ if 'plusv2' in file.lower():
150
+ model["faceidplusv2"] = True
151
+
152
+ if 'unnorm' in file.lower():
153
+ model["portraitunnorm"] = True
154
+
155
+ return model
156
+
157
+ def insightface_loader(provider, model_name='buffalo_l'):
158
+ try:
159
+ from insightface.app import FaceAnalysis
160
+ except ImportError as e:
161
+ raise Exception(e)
162
+
163
+ path = os.path.join(folder_paths.models_dir, "insightface")
164
+ model = FaceAnalysis(name=model_name, root=path, providers=[provider + 'ExecutionProvider',])
165
+ model.prepare(ctx_id=0, det_size=(640, 640))
166
+ return model
167
+
168
+ def split_tiles(embeds, num_split):
169
+ _, H, W, _ = embeds.shape
170
+ out = []
171
+ for x in embeds:
172
+ x = x.unsqueeze(0)
173
+ h, w = H // num_split, W // num_split
174
+ x_split = torch.cat([x[:, i*h:(i+1)*h, j*w:(j+1)*w, :] for i in range(num_split) for j in range(num_split)], dim=0)
175
+ out.append(x_split)
176
+
177
+ x_split = torch.stack(out, dim=0)
178
+
179
+ return x_split
180
+
181
+ def merge_hiddenstates(x, tiles):
182
+ chunk_size = tiles*tiles
183
+ x = x.split(chunk_size)
184
+
185
+ out = []
186
+ for embeds in x:
187
+ num_tiles = embeds.shape[0]
188
+ tile_size = int((embeds.shape[1]-1) ** 0.5)
189
+ grid_size = int(num_tiles ** 0.5)
190
+
191
+ # Extract class tokens
192
+ class_tokens = embeds[:, 0, :] # Save class tokens: [num_tiles, embeds[-1]]
193
+ avg_class_token = class_tokens.mean(dim=0, keepdim=True).unsqueeze(0) # Average token, shape: [1, 1, embeds[-1]]
194
+
195
+ patch_embeds = embeds[:, 1:, :] # Shape: [num_tiles, tile_size^2, embeds[-1]]
196
+ reshaped = patch_embeds.reshape(grid_size, grid_size, tile_size, tile_size, embeds.shape[-1])
197
+
198
+ merged = torch.cat([torch.cat([reshaped[i, j] for j in range(grid_size)], dim=1)
199
+ for i in range(grid_size)], dim=0)
200
+
201
+ merged = merged.unsqueeze(0) # Shape: [1, grid_size*tile_size, grid_size*tile_size, embeds[-1]]
202
+
203
+ # Pool to original size
204
+ pooled = torch.nn.functional.adaptive_avg_pool2d(merged.permute(0, 3, 1, 2), (tile_size, tile_size)).permute(0, 2, 3, 1)
205
+ flattened = pooled.reshape(1, tile_size*tile_size, embeds.shape[-1])
206
+
207
+ # Add back the class token
208
+ with_class = torch.cat([avg_class_token, flattened], dim=1) # Shape: original shape
209
+ out.append(with_class)
210
+
211
+ out = torch.cat(out, dim=0)
212
+
213
+ return out
214
+
215
+ def merge_embeddings(x, tiles): # TODO: this needs so much testing that I don't even
216
+ chunk_size = tiles*tiles
217
+ x = x.split(chunk_size)
218
+
219
+ out = []
220
+ for embeds in x:
221
+ num_tiles = embeds.shape[0]
222
+ grid_size = int(num_tiles ** 0.5)
223
+ tile_size = int(embeds.shape[1] ** 0.5)
224
+ reshaped = embeds.reshape(grid_size, grid_size, tile_size, tile_size)
225
+
226
+ # Merge the tiles
227
+ merged = torch.cat([torch.cat([reshaped[i, j] for j in range(grid_size)], dim=1)
228
+ for i in range(grid_size)], dim=0)
229
+
230
+ merged = merged.unsqueeze(0) # Shape: [1, grid_size*tile_size, grid_size*tile_size]
231
+
232
+ # Pool to original size
233
+ pooled = torch.nn.functional.adaptive_avg_pool2d(merged, (tile_size, tile_size)) # pool to [1, tile_size, tile_size]
234
+ pooled = pooled.flatten(1) # flatten to [1, tile_size^2]
235
+ out.append(pooled)
236
+ out = torch.cat(out, dim=0)
237
+
238
+ return out
239
+
240
+ def encode_image_masked(clip_vision, image, mask=None, batch_size=0, tiles=1, ratio=1.0, clipvision_size=224):
241
+ # full image embeds
242
+ embeds = encode_image_masked_(clip_vision, image, mask, batch_size, clipvision_size=clipvision_size)
243
+ tiles = min(tiles, 16)
244
+
245
+ if tiles > 1:
246
+ # split in tiles
247
+ image_split = split_tiles(image, tiles)
248
+
249
+ # get the embeds for each tile
250
+ embeds_split = Output()
251
+ for i in image_split:
252
+ encoded = encode_image_masked_(clip_vision, i, mask, batch_size, clipvision_size=clipvision_size)
253
+ if not hasattr(embeds_split, "image_embeds"):
254
+ #embeds_split["last_hidden_state"] = encoded["last_hidden_state"]
255
+ embeds_split["image_embeds"] = encoded["image_embeds"]
256
+ embeds_split["penultimate_hidden_states"] = encoded["penultimate_hidden_states"]
257
+ else:
258
+ #embeds_split["last_hidden_state"] = torch.cat((embeds_split["last_hidden_state"], encoded["last_hidden_state"]), dim=0)
259
+ embeds_split["image_embeds"] = torch.cat((embeds_split["image_embeds"], encoded["image_embeds"]), dim=0)
260
+ embeds_split["penultimate_hidden_states"] = torch.cat((embeds_split["penultimate_hidden_states"], encoded["penultimate_hidden_states"]), dim=0)
261
+
262
+ #embeds_split['last_hidden_state'] = merge_hiddenstates(embeds_split['last_hidden_state'])
263
+ embeds_split["image_embeds"] = merge_embeddings(embeds_split["image_embeds"], tiles)
264
+ embeds_split["penultimate_hidden_states"] = merge_hiddenstates(embeds_split["penultimate_hidden_states"], tiles)
265
+
266
+ #embeds['last_hidden_state'] = torch.cat([embeds_split['last_hidden_state'], embeds['last_hidden_state']])
267
+ if embeds['image_embeds'].shape[0] > 1: # if we have more than one image we need to average the embeddings for consistency
268
+ embeds['image_embeds'] = embeds['image_embeds']*ratio + embeds_split['image_embeds']*(1-ratio)
269
+ embeds['penultimate_hidden_states'] = embeds['penultimate_hidden_states']*ratio + embeds_split['penultimate_hidden_states']*(1-ratio)
270
+ #embeds['image_embeds'] = (embeds['image_embeds']*ratio + embeds_split['image_embeds']) / 2
271
+ #embeds['penultimate_hidden_states'] = (embeds['penultimate_hidden_states']*ratio + embeds_split['penultimate_hidden_states']) / 2
272
+ else: # otherwise we can concatenate them, they can be averaged later
273
+ embeds['image_embeds'] = torch.cat([embeds['image_embeds']*ratio, embeds_split['image_embeds']])
274
+ embeds['penultimate_hidden_states'] = torch.cat([embeds['penultimate_hidden_states']*ratio, embeds_split['penultimate_hidden_states']])
275
+
276
+ #del embeds_split
277
+
278
+ return embeds
279
+
280
+ def encode_image_masked_(clip_vision, image, mask=None, batch_size=0, clipvision_size=224):
281
+ model_management.load_model_gpu(clip_vision.patcher)
282
+ outputs = Output()
283
+
284
+ if batch_size == 0:
285
+ batch_size = image.shape[0]
286
+ elif batch_size > image.shape[0]:
287
+ batch_size = image.shape[0]
288
+
289
+ image_batch = torch.split(image, batch_size, dim=0)
290
+
291
+ for img in image_batch:
292
+ img = img.to(clip_vision.load_device)
293
+ pixel_values = clip_preprocess(img, size=clipvision_size).float()
294
+
295
+ # TODO: support for multiple masks
296
+ if mask is not None:
297
+ pixel_values = pixel_values * mask.to(clip_vision.load_device)
298
+
299
+ out = clip_vision.model(pixel_values=pixel_values, intermediate_output=-2)
300
+
301
+ if not hasattr(outputs, "last_hidden_state"):
302
+ outputs["last_hidden_state"] = out[0].to(model_management.intermediate_device())
303
+ outputs["image_embeds"] = out[2].to(model_management.intermediate_device())
304
+ outputs["penultimate_hidden_states"] = out[1].to(model_management.intermediate_device())
305
+ else:
306
+ outputs["last_hidden_state"] = torch.cat((outputs["last_hidden_state"], out[0].to(model_management.intermediate_device())), dim=0)
307
+ outputs["image_embeds"] = torch.cat((outputs["image_embeds"], out[2].to(model_management.intermediate_device())), dim=0)
308
+ outputs["penultimate_hidden_states"] = torch.cat((outputs["penultimate_hidden_states"], out[1].to(model_management.intermediate_device())), dim=0)
309
+
310
+ del img, pixel_values, out
311
+ torch.cuda.empty_cache()
312
+
313
+ return outputs
314
+
315
+ def tensor_to_size(source, dest_size):
316
+ if isinstance(dest_size, torch.Tensor):
317
+ dest_size = dest_size.shape[0]
318
+ source_size = source.shape[0]
319
+
320
+ if source_size < dest_size:
321
+ shape = [dest_size - source_size] + [1]*(source.dim()-1)
322
+ source = torch.cat((source, source[-1:].repeat(shape)), dim=0)
323
+ elif source_size > dest_size:
324
+ source = source[:dest_size]
325
+
326
+ return source
327
+
328
+ def min_(tensor_list):
329
+ # return the element-wise min of the tensor list.
330
+ x = torch.stack(tensor_list)
331
+ mn = x.min(axis=0)[0]
332
+ return torch.clamp(mn, min=0)
333
+
334
+ def max_(tensor_list):
335
+ # return the element-wise max of the tensor list.
336
+ x = torch.stack(tensor_list)
337
+ mx = x.max(axis=0)[0]
338
+ return torch.clamp(mx, max=1)
339
+
340
+ # From https://github.com/Jamy-L/Pytorch-Contrast-Adaptive-Sharpening/
341
+ def contrast_adaptive_sharpening(image, amount):
342
+ img = T.functional.pad(image, (1, 1, 1, 1)).cpu()
343
+
344
+ a = img[..., :-2, :-2]
345
+ b = img[..., :-2, 1:-1]
346
+ c = img[..., :-2, 2:]
347
+ d = img[..., 1:-1, :-2]
348
+ e = img[..., 1:-1, 1:-1]
349
+ f = img[..., 1:-1, 2:]
350
+ g = img[..., 2:, :-2]
351
+ h = img[..., 2:, 1:-1]
352
+ i = img[..., 2:, 2:]
353
+
354
+ # Computing contrast
355
+ cross = (b, d, e, f, h)
356
+ mn = min_(cross)
357
+ mx = max_(cross)
358
+
359
+ diag = (a, c, g, i)
360
+ mn2 = min_(diag)
361
+ mx2 = max_(diag)
362
+ mx = mx + mx2
363
+ mn = mn + mn2
364
+
365
+ # Computing local weight
366
+ inv_mx = torch.reciprocal(mx)
367
+ amp = inv_mx * torch.minimum(mn, (2 - mx))
368
+
369
+ # scaling
370
+ amp = torch.sqrt(amp)
371
+ w = - amp * (amount * (1/5 - 1/8) + 1/8)
372
+ div = torch.reciprocal(1 + 4*w)
373
+
374
+ output = ((b + d + f + h)*w + e) * div
375
+ output = torch.nan_to_num(output)
376
+ output = output.clamp(0, 1)
377
+
378
+ return output
379
+
380
+ def tensor_to_image(tensor):
381
+ image = tensor.mul(255).clamp(0, 255).byte().cpu()
382
+ image = image[..., [2, 1, 0]].numpy()
383
+ return image
384
+
385
+ def image_to_tensor(image):
386
+ tensor = torch.clamp(torch.from_numpy(image).float() / 255., 0, 1)
387
+ tensor = tensor[..., [2, 1, 0]]
388
+ return tensor