Files
logtd-ComfyUI-SSREncoder/example_workflows/ssr_example.json
T
2024-08-24 17:21:47 -06:00

918 lines
14 KiB
JSON

{
"last_node_id": 22,
"last_link_id": 30,
"nodes": [
{
"id": 3,
"type": "KSampler",
"pos": [
1048,
188
],
"size": [
210,
262
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 12
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 4
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 6
},
{
"name": "latent_image",
"type": "LATENT",
"link": 2
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
7
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
100,
"increment",
20,
6.5,
"dpmpp_2m",
"karras",
1
]
},
{
"id": 4,
"type": "CheckpointLoaderSimple",
"pos": [
-99,
495
],
"size": {
"0": 210,
"1": 98
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
11
],
"slot_index": 0
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
3,
5,
17,
20
],
"slot_index": 1
},
{
"name": "VAE",
"type": "VAE",
"links": [
8
],
"slot_index": 2
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"photon_v1.safetensors"
]
},
{
"id": 5,
"type": "EmptyLatentImage",
"pos": [
806,
545
],
"size": [
210,
106
],
"flags": {},
"order": 4,
"mode": 0,
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
512,
512,
4
]
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
425,
110
],
"size": {
"0": 223.51171875,
"1": 125.36328125
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 3
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
4
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"woman, fur, photo, 4k uhd, masterpiece"
]
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [
426,
292
],
"size": {
"0": 210,
"1": 76
},
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 5
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
6
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"text, watermark, nsfw"
]
},
{
"id": 8,
"type": "VAEDecode",
"pos": [
1272,
186
],
"size": {
"0": 140,
"1": 46
},
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 7
},
{
"name": "vae",
"type": "VAE",
"link": 8
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
9
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 9,
"type": "SaveImage",
"pos": [
1451,
189
],
"size": {
"0": 1063.133056640625,
"1": 983.360595703125
},
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 9
}
],
"properties": {},
"widgets_values": [
"ComfyUI"
]
},
{
"id": 10,
"type": "LoadImage",
"pos": [
139,
1232
],
"size": [
281.9968871302733,
326.1300691823658
],
"flags": {},
"order": 5,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
10
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"wolfy.jpeg",
"image"
]
},
{
"id": 12,
"type": "ImageScale",
"pos": [
225,
1058
],
"size": {
"0": 210,
"1": 130
},
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 10
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
14
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"center"
]
},
{
"id": 13,
"type": "CLIPVisionLoader",
"pos": [
-103,
799
],
"size": [
210,
58
],
"flags": {},
"order": 2,
"mode": 0,
"outputs": [
{
"name": "CLIP_VISION",
"type": "CLIP_VISION",
"links": [
16,
21
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CLIPVisionLoader"
},
"widgets_values": [
"clip_vision_large.safetensors"
]
},
{
"id": 14,
"type": "ApplySSR",
"pos": [
814,
425
],
"size": {
"0": 169.60000610351562,
"1": 66
},
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 11
},
{
"name": "ssr_attentions",
"type": "SSR_ATTENTIONS",
"link": 13
},
{
"name": "ssr_embeds",
"type": "SSR_EMBEDS",
"link": 26
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
12
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ApplySSR"
}
},
{
"id": 15,
"type": "LoadSSRAligner",
"pos": [
-104,
913
],
"size": [
210,
58
],
"flags": {},
"order": 3,
"mode": 0,
"outputs": [
{
"name": "SSR_ALIGNER",
"type": "SSR_ALIGNER",
"links": [
15,
22
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadSSRAligner"
},
"widgets_values": [
"ssr_aligner.safetensors"
]
},
{
"id": 16,
"type": "LoadSSRAttention",
"pos": [
-98,
666
],
"size": {
"0": 210,
"1": 58
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "SSR_ATTENTIONS",
"type": "SSR_ATTENTIONS",
"links": [
13
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadSSRAttention"
},
"widgets_values": [
"ssr_layers.safetensors"
]
},
{
"id": 17,
"type": "EncodeSSRQuery",
"pos": [
199,
764
],
"size": {
"0": 265.29400634765625,
"1": 253.99998474121094
},
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 17
},
{
"name": "clip_vision",
"type": "CLIP_VISION",
"link": 16
},
{
"name": "ssr_aligner",
"type": "SSR_ALIGNER",
"link": 15
},
{
"name": "image",
"type": "IMAGE",
"link": 14
},
{
"name": "prev_ssr_embeds",
"type": "SSR_EMBEDS",
"link": null
}
],
"outputs": [
{
"name": "SSR_EMBEDS",
"type": "SSR_EMBEDS",
"links": [
25
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "EncodeSSRQuery"
},
"widgets_values": [
0.5,
"wolf, fur",
0,
""
]
},
{
"id": 19,
"type": "EncodeSSRQuery",
"pos": [
503,
762
],
"size": {
"0": 265.29400634765625,
"1": 253.99998474121094
},
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 20
},
{
"name": "clip_vision",
"type": "CLIP_VISION",
"link": 21
},
{
"name": "ssr_aligner",
"type": "SSR_ALIGNER",
"link": 22
},
{
"name": "image",
"type": "IMAGE",
"link": 30
},
{
"name": "prev_ssr_embeds",
"type": "SSR_EMBEDS",
"link": 25
}
],
"outputs": [
{
"name": "SSR_EMBEDS",
"type": "SSR_EMBEDS",
"links": [
26
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "EncodeSSRQuery"
},
"widgets_values": [
0.4,
"woman",
0,
""
]
},
{
"id": 20,
"type": "LoadImage",
"pos": [
544,
1231
],
"size": [
285.2402465052734,
318.1499910573659
],
"flags": {},
"order": 6,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
23
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"again33.jpg",
"image"
]
},
{
"id": 21,
"type": "ImageScale",
"pos": [
557,
1058
],
"size": {
"0": 210,
"1": 130
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 23
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
30
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
]
}
],
"links": [
[
2,
5,
0,
3,
3,
"LATENT"
],
[
3,
4,
1,
6,
0,
"CLIP"
],
[
4,
6,
0,
3,
1,
"CONDITIONING"
],
[
5,
4,
1,
7,
0,
"CLIP"
],
[
6,
7,
0,
3,
2,
"CONDITIONING"
],
[
7,
3,
0,
8,
0,
"LATENT"
],
[
8,
4,
2,
8,
1,
"VAE"
],
[
9,
8,
0,
9,
0,
"IMAGE"
],
[
10,
10,
0,
12,
0,
"IMAGE"
],
[
11,
4,
0,
14,
0,
"MODEL"
],
[
12,
14,
0,
3,
0,
"MODEL"
],
[
13,
16,
0,
14,
1,
"SSR_ATTENTIONS"
],
[
14,
12,
0,
17,
3,
"IMAGE"
],
[
15,
15,
0,
17,
2,
"SSR_ALIGNER"
],
[
16,
13,
0,
17,
1,
"CLIP_VISION"
],
[
17,
4,
1,
17,
0,
"CLIP"
],
[
20,
4,
1,
19,
0,
"CLIP"
],
[
21,
13,
0,
19,
1,
"CLIP_VISION"
],
[
22,
15,
0,
19,
2,
"SSR_ALIGNER"
],
[
23,
20,
0,
21,
0,
"IMAGE"
],
[
25,
17,
0,
19,
4,
"SSR_EMBEDS"
],
[
26,
19,
0,
14,
2,
"SSR_EMBEDS"
],
[
30,
21,
0,
19,
3,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.35049389948139237,
"offset": [
955.7028205556142,
377.0927782094869
]
}
},
"version": 0.4
}