From 3e2ff79d5fbd1cfa4c4a45ced6a259b84604d32b Mon Sep 17 00:00:00 2001 From: shadowcz007 Date: Sun, 24 Mar 2024 20:10:05 +0800 Subject: [PATCH] Create image-reward-workflow.json --- example/image-reward-workflow.json | 840 +++++++++++++++++++++++++++++ 1 file changed, 840 insertions(+) create mode 100644 example/image-reward-workflow.json diff --git a/example/image-reward-workflow.json b/example/image-reward-workflow.json new file mode 100644 index 0000000..f574a30 --- /dev/null +++ b/example/image-reward-workflow.json @@ -0,0 +1,840 @@ +{ + "last_node_id": 24, + "last_link_id": 45, + "nodes": [ + { + "id": 8, + "type": "KSampler", + "pos": [ + 2830, + 130 + ], + "size": { + "0": 315, + "1": 262 + }, + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 10 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 11 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 12 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 39 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 16 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 303747655273701, + "fixed", + 13, + 8, + "euler", + "normal", + 1 + ] + }, + { + "id": 13, + "type": "VAEDecode", + "pos": [ + 3180, + 130 + ], + "size": { + "0": 210, + "1": 46 + }, + "flags": { + "collapsed": false + }, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 16 + }, + { + "name": "vae", + "type": "VAE", + "link": 17 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 21, + 30 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 15, + "type": "PreviewImage", + "pos": [ + 3516, + -134 + ], + "size": [ + 1806.3702754641545, + 639.2542864930597 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 21 + } + ], + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 22, + "type": "CLIPSetLastLayer", + "pos": [ + 1996, + 250 + ], + "size": { + "0": 315, + "1": 58 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 40 + } + ], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 41, + 42 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPSetLastLayer" + }, + "widgets_values": [ + -2 + ] + }, + { + "id": 9, + "type": "CheckpointLoaderSimple", + "pos": [ + 1997, + 94 + ], + "size": { + "0": 315, + "1": 98 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 10 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 40 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 17 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "deliberate_v2.safetensors" + ] + }, + { + "id": 11, + "type": "CLIPTextEncode", + "pos": [ + 2390, + 130 + ], + "size": [ + 405.03469482497167, + 80.27846540560893 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 41 + }, + { + "name": "text", + "type": "STRING", + "link": 38, + "widget": { + "name": "text" + } + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 11 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," + ] + }, + { + "id": 12, + "type": "CLIPTextEncode", + "pos": [ + 2380, + 281 + ], + "size": [ + 413.51688714638294, + 76 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 42 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 12 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "text, watermark" + ] + }, + { + "id": 10, + "type": "EmptyLatentImage", + "pos": [ + 2385, + 419 + ], + "size": { + "0": 315, + "1": 106 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 22 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 512, + 512, + 12 + ] + }, + { + "id": 16, + "type": "RebatchLatents", + "pos": [ + 2735, + 452 + ], + "size": { + "0": 315, + "1": 58 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "latents", + "type": "LATENT", + "link": 22 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 39 + ], + "shape": 6, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RebatchLatents" + }, + "widgets_values": [ + 2 + ] + }, + { + "id": 6, + "type": "PreviewImage", + "pos": [ + 3501, + -787 + ], + "size": [ + 1622.847026445037, + 549.609074037931 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 29 + } + ], + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 4, + "type": "ShowTextForGPT", + "pos": [ + 2974, + -779 + ], + "size": { + "0": 373.7630615234375, + "1": 285.07818603515625 + }, + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "text", + "type": "STRING", + "link": 28, + "widget": { + "name": "text" + } + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": null, + "shape": 6 + } + ], + "properties": { + "Node name for S&R": "ShowTextForGPT" + }, + "widgets_values": [ + "", + "1.9602793455123901\n1.8567382097244263\n1.846798062324524\n1.8400778770446777\n1.7948381900787354\n1.775681972503662\n1.7385632991790771\n1.7036141157150269\n1.6676552295684814\n1.6587713956832886\n1.6454658508300781\n1.4030568599700928" + ] + }, + { + "id": 19, + "type": "ImageBatchToList_", + "pos": [ + 2551, + -503 + ], + "size": { + "0": 279.5999755859375, + "1": 26 + }, + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "image_batch", + "type": "IMAGE", + "link": 30 + } + ], + "outputs": [ + { + "name": "image_list", + "type": "IMAGE", + "links": [ + 34 + ], + "shape": 6, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ImageBatchToList_" + } + }, + { + "id": 18, + "type": "ImageRewardScore_", + "pos": [ + 2558, + -773 + ], + "size": { + "0": 400, + "1": 200 + }, + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 34 + }, + { + "name": "prompt", + "type": "STRING", + "link": 37, + "widget": { + "name": "prompt" + } + } + ], + "outputs": [ + { + "name": "score", + "type": "STRING", + "links": [ + 28 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "images", + "type": "IMAGE", + "links": [ + 29, + 44 + ], + "shape": 6, + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "ImageRewardScore_" + }, + "widgets_values": [ + "", + 3 + ] + }, + { + "id": 23, + "type": "AppInfo", + "pos": [ + 5197, + -758 + ], + "size": { + "0": 400, + "1": 343.9999694824219 + }, + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "link": 45 + } + ], + "properties": { + "Node name for S&R": "AppInfo" + }, + "widgets_values": [ + "Image-TopK", + "21", + "6", + "", + 1, + "", + "https://", + "story", + "disable", + 1 + ] + }, + { + "id": 21, + "type": "ChinesePrompt_Mix", + "pos": [ + 1907, + -742 + ], + "size": { + "0": 400, + "1": 200 + }, + "flags": {}, + "order": 2, + "mode": 0, + "outputs": [ + { + "name": "prompt", + "type": "STRING", + "links": [ + 37, + 38 + ], + "shape": 6, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ChinesePrompt_Mix" + }, + "widgets_values": [ + "超人,在水平面上奔跑", + "on", + 558259, + "randomize" + ] + }, + { + "id": 24, + "type": "SwitchByIndex", + "pos": [ + 5199, + -910 + ], + "size": { + "0": 315, + "1": 102 + }, + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "name": "A", + "type": "*", + "link": 44 + }, + { + "name": "B", + "type": "*", + "link": null + } + ], + "outputs": [ + { + "name": "C", + "type": "*", + "links": [ + 45 + ], + "shape": 6, + "slot_index": 0 + }, + { + "name": "count", + "type": "INT", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "SwitchByIndex" + }, + "widgets_values": [ + 0, + "on" + ] + } + ], + "links": [ + [ + 10, + 9, + 0, + 8, + 0, + "MODEL" + ], + [ + 11, + 11, + 0, + 8, + 1, + "CONDITIONING" + ], + [ + 12, + 12, + 0, + 8, + 2, + "CONDITIONING" + ], + [ + 16, + 8, + 0, + 13, + 0, + "LATENT" + ], + [ + 17, + 9, + 2, + 13, + 1, + "VAE" + ], + [ + 21, + 13, + 0, + 15, + 0, + "IMAGE" + ], + [ + 22, + 10, + 0, + 16, + 0, + "LATENT" + ], + [ + 28, + 18, + 0, + 4, + 0, + "STRING" + ], + [ + 29, + 18, + 1, + 6, + 0, + "IMAGE" + ], + [ + 30, + 13, + 0, + 19, + 0, + "IMAGE" + ], + [ + 34, + 19, + 0, + 18, + 0, + "IMAGE" + ], + [ + 37, + 21, + 0, + 18, + 1, + "STRING" + ], + [ + 38, + 21, + 0, + 11, + 1, + "STRING" + ], + [ + 39, + 16, + 0, + 8, + 3, + "LATENT" + ], + [ + 40, + 9, + 1, + 22, + 0, + "CLIP" + ], + [ + 41, + 22, + 0, + 11, + 0, + "CLIP" + ], + [ + 42, + 22, + 0, + 12, + 0, + "CLIP" + ], + [ + 44, + 18, + 1, + 24, + 0, + "*" + ], + [ + 45, + 24, + 0, + 23, + 0, + "IMAGE" + ] + ], + "groups": [ + { + "title": "Text-to-Image", + "bounding": [ + 1986, + 20, + 1414, + 515 + ], + "color": "#3f789e", + "font_size": 24 + }, + { + "title": "Image Reward", + "bounding": [ + 2536, + -853, + 822, + 386 + ], + "color": "#A88", + "font_size": 24 + } + ], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file