diff --git a/attention-guidance/README.md b/attention-guidance/README.md index bdea95b..d54c962 100644 --- a/attention-guidance/README.md +++ b/attention-guidance/README.md @@ -4,4 +4,8 @@ ![Self-Attention Guidance](./self-attention-guidance.png) +## Perturbed-Attention Guidance + +![Perturbed-Attention Guidance](./perturbed-attention-guidance.png) + --- \ No newline at end of file diff --git a/attention-guidance/perturbed-attention-guidance.json b/attention-guidance/perturbed-attention-guidance.json new file mode 100644 index 0000000..c0340d6 --- /dev/null +++ b/attention-guidance/perturbed-attention-guidance.json @@ -0,0 +1,682 @@ +{ + "last_node_id": 21, + "last_link_id": 28, + "nodes": [ + { + "id": 5, + "type": "EmptyLatentImage", + "pos": [ + 870, + 950 + ], + "size": { + "0": 315, + "1": 106 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 2, + 18 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 1024, + 1024, + 1 + ] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [ + 790, + 840 + ], + "size": { + "0": 210, + "1": 46 + }, + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 7 + }, + { + "name": "vae", + "type": "VAE", + "link": 8 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 21 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 14, + "type": "VAEDecode", + "pos": [ + 1150, + 840 + ], + "size": { + "0": 210, + "1": 46 + }, + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 19 + }, + { + "name": "vae", + "type": "VAE", + "link": 20 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 22 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 12, + "type": "KSampler", + "pos": [ + 1090, + 510 + ], + "size": { + "0": 315, + "1": 262 + }, + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 27 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 16 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 17 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 18 + }, + { + "name": "seed", + "type": "INT", + "link": 25, + "widget": { + "name": "seed" + } + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 19 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 9224154662505, + "increment", + 20, + 3, + "dpmpp_2m_sde", + "karras", + 1 + ] + }, + { + "id": 3, + "type": "KSampler", + "pos": [ + 730, + 510 + ], + "size": { + "0": 315, + "1": 262 + }, + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 13 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 4 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 6 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 2 + }, + { + "name": "seed", + "type": "INT", + "link": 24, + "widget": { + "name": "seed" + }, + "slot_index": 4 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 7 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 9224154662505, + "increment", + 20, + 3, + "dpmpp_2m_sde", + "karras", + 1 + ] + }, + { + "id": 17, + "type": "Seed", + "pos": [ + 740, + 310 + ], + "size": { + "0": 299.600830078125, + "1": 142 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "seed", + "type": "SEED", + "links": [], + "shape": 3, + "slot_index": 0 + }, + { + "name": "number", + "type": "NUMBER", + "links": null, + "shape": 3 + }, + { + "name": "float", + "type": "FLOAT", + "links": null, + "shape": 3, + "slot_index": 2 + }, + { + "name": "int", + "type": "INT", + "links": [ + 24, + 25 + ], + "shape": 3, + "slot_index": 3 + } + ], + "properties": { + "Node name for S&R": "Seed" + }, + "widgets_values": [ + 169866444229922, + "randomize" + ] + }, + { + "id": 7, + "type": "CLIPTextEncode", + "pos": [ + 270, + 710 + ], + "size": { + "0": 425.27801513671875, + "1": 180.6060791015625 + }, + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 5 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 6, + 17 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "anime, text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck" + ] + }, + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [ + 330, + 350 + ], + "size": { + "0": 315, + "1": 98 + }, + "flags": {}, + "order": 2, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 13, + 28 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 3, + 5 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 8, + 20 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "Art Universe v2.0.safetensors" + ] + }, + { + "id": 21, + "type": "PerturbedAttentionGuidance", + "pos": [ + 1090, + 350 + ], + "size": { + "0": 315, + "1": 58 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 28 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 27 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "PerturbedAttentionGuidance" + }, + "widgets_values": [ + 1 + ] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 270, + 490 + ], + "size": { + "0": 422.84503173828125, + "1": 164.31304931640625 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 4, + 16 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "1950's technicolor style, chinese cleopatra cyberpunk wirehead" + ] + }, + { + "id": 15, + "type": "Image Comparer (rgthree)", + "pos": { + "0": 1490, + "1": 340, + "2": 0, + "3": 0, + "4": 0, + "5": 0, + "6": 0, + "7": 0, + "8": 0, + "9": 0 + }, + "size": { + "0": 601.600830078125, + "1": 542.2478637695312 + }, + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "image_a", + "type": "IMAGE", + "link": 21, + "dir": 3 + }, + { + "name": "image_b", + "type": "IMAGE", + "link": 22, + "dir": 3 + } + ], + "outputs": [], + "title": "Image Comparer", + "properties": { + "comparer_mode": "Slide" + }, + "widgets_values": [ + [ + "/view?filename=rgthree.compare._temp_gqeje_00007_.png&type=temp&subfolder=&rand=0.1175550482699429", + "/view?filename=rgthree.compare._temp_gqeje_00008_.png&type=temp&subfolder=&rand=0.5694939530070766" + ] + ] + } + ], + "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" + ], + [ + 13, + 4, + 0, + 3, + 0, + "MODEL" + ], + [ + 16, + 6, + 0, + 12, + 1, + "CONDITIONING" + ], + [ + 17, + 7, + 0, + 12, + 2, + "CONDITIONING" + ], + [ + 18, + 5, + 0, + 12, + 3, + "LATENT" + ], + [ + 19, + 12, + 0, + 14, + 0, + "LATENT" + ], + [ + 20, + 4, + 2, + 14, + 1, + "VAE" + ], + [ + 21, + 8, + 0, + 15, + 0, + "IMAGE" + ], + [ + 22, + 14, + 0, + 15, + 1, + "IMAGE" + ], + [ + 24, + 17, + 3, + 3, + 4, + "INT" + ], + [ + 25, + 17, + 3, + 12, + 4, + "INT" + ], + [ + 27, + 21, + 0, + 12, + 0, + "MODEL" + ], + [ + 28, + 4, + 0, + 21, + 0, + "MODEL" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/attention-guidance/perturbed-attention-guidance.png b/attention-guidance/perturbed-attention-guidance.png new file mode 100644 index 0000000..eac7b6e Binary files /dev/null and b/attention-guidance/perturbed-attention-guidance.png differ