From 1495fae433fda959f27695886a7a1597a81cf8e4 Mon Sep 17 00:00:00 2001 From: zjt <937178071@qq.com> Date: Thu, 30 May 2024 12:08:30 +0800 Subject: [PATCH] seed --- src/biz/txt23d.ts | 11 +- src/biz/txt2img.ts | 6 +- src/biz/upScale.ts | 2 +- src/comfyJson/txt23d.ts | 317 +---- src/comfyJson/txt2img.ts | 2656 ++++++++++++++++++++++++++++++++++---- src/comfyJson/upscale.ts | 441 ++----- src/seed.ts | 5 +- 7 files changed, 2495 insertions(+), 943 deletions(-) diff --git a/src/biz/txt23d.ts b/src/biz/txt23d.ts index 2a072ba..5eb8fe8 100644 --- a/src/biz/txt23d.ts +++ b/src/biz/txt23d.ts @@ -3,7 +3,7 @@ import { txt23dApiFormatJSON } from "../comfyJson/txt23d"; import axios from "axios"; import { selectNodeFromApiJSONbyID } from "../utils/editComfyJson"; import WebSocket from "ws"; -import { seed } from "../seed"; +import { globalMap } from "../seed"; import { txt2imgAPIformatJSON } from "../comfyJson/txt2img"; const baseUrl = "http://47.108.92.176:20000"; const baseWsUrl = "ws://47.108.92.176:20000"; @@ -20,11 +20,8 @@ const Txt23DHandler: RequestHandler = async (ctx) => { } const requestBody = ctx.request.body; const { prompt, url } = requestBody; - const inputNode = selectNodeFromApiJSONbyID(txt23dApiFormatJSON, "33"); - const seedNode = selectNodeFromApiJSONbyID(txt23dApiFormatJSON, "10"); - const formSeedNode = selectNodeFromApiJSONbyID(txt2imgAPIformatJSON, "10"); - seedNode.inputs.seed = formSeedNode.inputs.seed; - inputNode.inputs.string = prompt; + const inputNode = selectNodeFromApiJSONbyID(txt23dApiFormatJSON, "6"); + inputNode.inputs.image = globalMap.step1url; try { ctx.body = { url: ctx.body = baseUrl + '/view?filename=' + await new Promise((resolve, reject) => { @@ -47,7 +44,7 @@ const Txt23DHandler: RequestHandler = async (ctx) => { const { type, data } = JSON.parse(event.data); if (type === "executed") { console.log(data.output); - if (data.node === '13') { + if (data.node === '3') { resolve(data.output.mesh[0].filename) } } diff --git a/src/biz/txt2img.ts b/src/biz/txt2img.ts index 6e0fd7e..cce4346 100644 --- a/src/biz/txt2img.ts +++ b/src/biz/txt2img.ts @@ -4,14 +4,13 @@ import axios from "axios"; import { selectNodeFromApiJSONbyID } from "../utils/editComfyJson"; import WebSocket from "ws"; import { readJSONFile, saveJSONFile } from "../utils/jsonReader"; -import { seed } from "../seed"; +import { globalMap } from "../seed"; const baseUrl = "http://47.108.92.176:20000"; const baseWsUrl = "ws://47.108.92.176:20000"; // const baseUrl = "http://localhost:8188"; // const baseWsUrl = "ws://localhost:8188"; axios.defaults.baseURL = baseUrl; const Txt2ImgHandler: RequestHandler = async (ctx, next) => { - console.log(ctx.method); ctx.set('Access-Control-Allow-Origin', '*') ctx.set('Access-Control-Allow-Headers', 'Content-Type,Content-Length,Authorization,Accept,X-Requested-With') ctx.set('Access-Control-Allow-Methods', 'PUT,POST,GET,DELETE,OPTIONS') @@ -56,7 +55,7 @@ const Txt2ImgHandler: RequestHandler = async (ctx, next) => if (data.node === '21') { temp = data.output.text[0]; } - if (data.node === '94') { + if (data.node === '77') { console.log(data.output); const filePath = './data.json'; @@ -68,6 +67,7 @@ const Txt2ImgHandler: RequestHandler = async (ctx, next) => // 保存回JSON文件 saveJSONFile(filePath, data1); }) + globalMap.step1url = data.output.images[0].filename; resolve({ prompt: temp, url: baseUrl + '/view?filename=' + data.output.images[0].filename }); } } else if (type === "executing") { diff --git a/src/biz/upScale.ts b/src/biz/upScale.ts index 1a03f15..776627e 100644 --- a/src/biz/upScale.ts +++ b/src/biz/upScale.ts @@ -42,7 +42,7 @@ const UpscaleHandler: RequestHandler = async (ctx) => { const { type, data } = JSON.parse(event.data); if (type === "executed") { console.log(data.output); - if (data.node === '47') { + if (data.node === '9') { resolve(data.output.images[0].filename) } diff --git a/src/comfyJson/txt23d.ts b/src/comfyJson/txt23d.ts index 5fbc656..93bb02e 100644 --- a/src/comfyJson/txt23d.ts +++ b/src/comfyJson/txt23d.ts @@ -1,327 +1,40 @@ const txt23dApiFormatJSON = { - "10": { + "3": { "inputs": { - "seed": 374404110666628, - "steps": 8, - "cfg": 8, - "sampler_name": "ddim", - "scheduler": "normal", - "denoise": 1, - "preview_method": "auto", - "vae_decode": "true", - "model": [ - "69", - 0 - ], - "positive": [ - "20", - 1 - ], - "negative": [ - "20", - 2 - ], - "latent_image": [ - "20", - 3 - ], - "optional_vae": [ - "20", - 4 - ] - }, - "class_type": "KSampler (Efficient)" - }, - "11": { - "inputs": { - "switch_1": "On", - "lora_name_1": "form1024-xl\\form1024-xl-000006.safetensors", - "model_weight_1": 1, - "clip_weight_1": 1, - "switch_2": "On", - "lora_name_2": "Hyper-SD\\Hyper-SDXL-8steps-CFG-lora.safetensors", - "model_weight_2": 0.5, - "clip_weight_2": 1, - "switch_3": "Off", - "lora_name_3": "None", - "model_weight_3": 1, - "clip_weight_3": 1 - }, - "class_type": "CR LoRA Stack" - }, - "13": { - "inputs": { - "preview3d": null, - "mesh": [ - "14", - 0 - ] - }, - "class_type": "TripoSRViewer" - }, - "14": { - "inputs": { - "geometry_resolution": 256, - "threshold": 10, - "model": [ - "15", - 0 - ], - "reference_image": [ - "72", - 0 - ], - "reference_mask": [ - "72", - 1 - ] - }, - "class_type": "TripoSRSampler" - }, - "15": { - "inputs": { - "model": "3D\\TripoSR.ckpt", - "chunk_size": 8192 - }, - "class_type": "TripoSRModelLoader" - }, - "19": { - "inputs": { - "text_positive": [ - "32", - 0 - ], - "text_negative": "", - "style": "base", - "log_prompt": false, - "style_positive": true, - "style_negative": true - }, - "class_type": "SDXLPromptStyler" - }, - "20": { - "inputs": { - "ckpt_name": "sd_xl_base_1.0.safetensors", - "vae_name": "Baked VAE", - "clip_skip": -2, - "lora_name": "None", - "lora_model_strength": 1, - "lora_clip_strength": 1, - "positive": [ - "21", - 0 - ], - "negative": "CLIP_NEGATIVE", - "token_normalization": "none", - "weight_interpretation": "comfy", - "empty_latent_width": 1024, - "empty_latent_height": 1024, - "batch_size": 1, - "lora_stack": [ + "mode": "image-to-3d", + "prompt": "", + "image": [ "11", 0 ] }, - "class_type": "Efficient Loader" + "class_type": "TripoAPI_Zho" }, - "21": { + "5": { "inputs": { - "text": [ - "19", + "preview3d": null, + "mesh": [ + "3", 0 ] }, - "class_type": "ShowText|pysssss" + "class_type": "TripoGLBViewer_ZHO" }, - "22": { + "6": { "inputs": { - "text": [ - "19", - 1 - ] - }, - "class_type": "ShowText|pysssss" - }, - "32": { - "inputs": { - "text": [ - "85", - 0 - ] - }, - "class_type": "ShowText|pysssss" - }, - "33": { - "inputs": { - "string": "留春xiao不住,费尽莺儿语" - }, - "class_type": "Simple String" - }, - "46": { - "inputs": { - "image": "329247709_425681693072936_3081671045029849121_nstp=dst-jpg_e3.jpg", + "image": "ComfyUI_00012_.png", "upload": "image" }, "class_type": "LoadImage" }, - "68": { + "11": { "inputs": { "image": [ - "46", + "6", 0 ] }, - "class_type": "CLIPVisionEncode" - }, - "69": { - "inputs": { - "config": "SDXL, Attention Injection", - "weight": 1, - "model": [ - "20", - 0 - ] - }, - "class_type": "LayeredDiffusionApply" - }, - "70": { - "inputs": { - "sd_version": "SDXL", - "sub_batch_size": 16, - "samples": [ - "10", - 3 - ], - "images": [ - "10", - 5 - ] - }, - "class_type": "LayeredDiffusionDecodeRGBA" - }, - "72": { - "inputs": { - "sd_version": "SDXL", - "sub_batch_size": 16, - "samples": [ - "10", - 3 - ], - "images": [ - "10", - 5 - ] - }, - "class_type": "LayeredDiffusionDecode" - }, - "85": { - "inputs": { - "text": [ - "86", - 0 - ] - }, - "class_type": "ShowText|pysssss" - }, - "86": { - "inputs": { - "system_prompt": "你是一个懂宋词分析的古诗词专家,我会给你一句宋词。请你分析古诗中的意象,按照重要性排序,并参照文件列出只英文的意象prompt。注意只需要英文,请控制输出长度在256token以内。", - "user_prompt": [ - "33", - 0 - ], - "model_name": "glm-4", - "temperature": 0.7, - "is_memory": "disable", - "is_tools_in_sys_prompt": "disable", - "is_locked": "disable", - "main_brain": "enable", - "max_length": 2048, - "file_content": [ - "89", - 0 - ], - "base_url": "", - "api_key": "", - "imgbb_api_key": "" - }, - "class_type": "LLM" - }, - "87": { - "inputs": { - "path": "analyse.txt", - "is_enable": false, - "path_type": "Relative_Path" - }, - "class_type": "load_file" - }, - "89": { - "inputs": { - "is_enable": true, - "file1": [ - "87", - 0 - ], - "file2": [ - "90", - 0 - ], - "file3": [ - "91", - 0 - ], - "file4": [ - "92", - 0 - ], - "file5": [ - "93", - 0 - ] - }, - "class_type": "file_combine_plus" - }, - "90": { - "inputs": { - "path": "yixiang.txt", - "is_enable": true, - "path_type": "Relative_Path" - }, - "class_type": "load_file" - }, - "91": { - "inputs": { - "path": "cipai.txt", - "is_enable": true, - "path_type": "Relative_Path" - }, - "class_type": "load_file" - }, - "92": { - "inputs": { - "path": "words.txt", - "is_enable": false, - "path_type": "Relative_Path" - }, - "class_type": "load_file" - }, - "93": { - "inputs": { - "path": "sdrule.txt", - "is_enable": true, - "path_type": "Relative_Path" - }, - "class_type": "load_file" - }, - "94": { - "inputs": { - "filename_prefix": "ComfyUI", - "images": [ - "70", - 0 - ] - }, - "class_type": "SaveImage" + "class_type": "SplitImageWithAlpha" } } diff --git a/src/comfyJson/txt2img.ts b/src/comfyJson/txt2img.ts index 11b5a8d..29c48cc 100644 --- a/src/comfyJson/txt2img.ts +++ b/src/comfyJson/txt2img.ts @@ -1,291 +1,2379 @@ const txt2imgAPIformatJSON = { - "10": { - "inputs": { - "seed": 374404110666628, - "steps": 8, - "cfg": 8, - "sampler_name": "ddim", - "scheduler": "normal", - "denoise": 1, - "preview_method": "auto", - "vae_decode": "true", - "model": [ - "69", - 0 + "extra_pnginfo": { + "workflow": { + "last_node_id": 138, + "last_link_id": 241, + "nodes": [ + { + "id": 74, + "type": "ImageCompositeMasked", + "pos": [ + 5136.1200121311485, + 282.6768060322938 + ], + "size": { + "0": 315, + "1": 146 + }, + "flags": {}, + "order": 27, + "mode": 0, + "inputs": [ + { + "name": "destination", + "type": "IMAGE", + "link": 103, + "label": "destination" + }, + { + "name": "source", + "type": "IMAGE", + "link": 98, + "label": "source" + }, + { + "name": "mask", + "type": "MASK", + "link": 99, + "label": "mask" + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 101 + ], + "shape": 3, + "label": "IMAGE", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ImageCompositeMasked", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + 0, + 25, + false + ], + "color": "#346434" + }, + { + "id": 98, + "type": "Reroute", + "pos": [ + 4140, + 1190 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 200, + "label": "" + } + ], + "outputs": [ + { + "name": "", + "type": "LATENT", + "links": [ + 124, + 125 + ], + "slot_index": 0, + "label": "" + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 99, + "type": "Reroute", + "pos": [ + 4150, + 1320 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 23, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 230, + "label": "", + "slot_index": 0 + } + ], + "outputs": [ + { + "name": "", + "type": "IMAGE", + "links": [ + 126, + 127 + ], + "slot_index": 0, + "label": "" + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 77, + "type": "SaveImage", + "pos": [ + 5499.986126893944, + 305.79401864716147 + ], + "size": { + "0": 449.1900329589844, + "1": 608.6851806640625 + }, + "flags": {}, + "order": 31, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 101, + "label": "images" + } + ], + "properties": { + "Node name for S&R": "SaveImage", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + "ComfyUI" + ], + "color": "#346434" + }, + { + "id": 13, + "type": "TripoSRViewer", + "pos": [ + 4927.457861627501, + 2678.750093342626 + ], + "size": [ + 600, + 500 + ], + "flags": {}, + "order": 30, + "mode": 4, + "inputs": [ + { + "name": "mesh", + "type": "MESH", + "link": 15, + "slot_index": 0, + "label": "mesh" + } + ], + "properties": { + "Node name for S&R": "TripoSRViewer" + }, + "widgets_values": [ + null + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 15, + "type": "TripoSRModelLoader", + "pos": [ + 5545.283121068138, + 3114.459881264704 + ], + "size": { + "0": 588.4208374023438, + "1": 82 + }, + "flags": {}, + "order": 0, + "mode": 4, + "outputs": [ + { + "name": "TRIPOSR_MODEL", + "type": "TRIPOSR_MODEL", + "links": [ + 16 + ], + "shape": 3, + "label": "TRIPOSR_MODEL" + } + ], + "properties": { + "Node name for S&R": "TripoSRModelLoader" + }, + "widgets_values": [ + "3D\\TripoSR.ckpt", + 8192 + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 14, + "type": "TripoSRSampler", + "pos": [ + 4923.212903460762, + 2501.764038641842 + ], + "size": { + "0": 602.5859375, + "1": 122 + }, + "flags": {}, + "order": 26, + "mode": 4, + "inputs": [ + { + "name": "model", + "type": "TRIPOSR_MODEL", + "link": 16, + "label": "model", + "slot_index": 0 + }, + { + "name": "reference_image", + "type": "IMAGE", + "link": 94, + "label": "reference_image", + "slot_index": 1 + }, + { + "name": "reference_mask", + "type": "MASK", + "link": 95, + "label": "reference_mask" + } + ], + "outputs": [ + { + "name": "MESH", + "type": "MESH", + "links": [ + 15 + ], + "shape": 3, + "label": "MESH", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "TripoSRSampler" + }, + "widgets_values": [ + 256, + 10 + ], + "color": "#323", + "bgcolor": "#535" + }, + { + "id": 78, + "type": "ImageResize+", + "pos": [ + 4772, + 282 + ], + "size": { + "0": 315, + "1": 218 + }, + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 102, + "label": "image" + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 103 + ], + "shape": 3, + "label": "IMAGE", + "slot_index": 0 + }, + { + "name": "width", + "type": "INT", + "links": null, + "shape": 3, + "label": "width" + }, + { + "name": "height", + "type": "INT", + "links": null, + "shape": 3, + "label": "height" + } + ], + "properties": { + "Node name for S&R": "ImageResize+", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + 1024, + 1024, + "nearest", + false, + "always", + 0 + ], + "color": "#346434" + }, + { + "id": 75, + "type": "LoadImage", + "pos": [ + 4434, + 275 + ], + "size": { + "0": 315, + "1": 314 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 102 + ], + "shape": 3, + "label": "IMAGE", + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3, + "label": "MASK" + } + ], + "properties": { + "Node name for S&R": "LoadImage", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + "QR Code.png", + "image" + ], + "color": "#346434" + }, + { + "id": 125, + "type": "LLM_api_loader", + "pos": [ + 711, + 1117 + ], + "size": { + "0": 408.4917907714844, + "1": 106 + }, + "flags": {}, + "order": 2, + "mode": 0, + "outputs": [ + { + "name": "model", + "type": "CUSTOM", + "links": [ + 218 + ], + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "LLM_api_loader" + }, + "widgets_values": [ + "glm-4", + "https://open.bigmodel.cn/api/paas/v4/", + "a8335bc54e5ad749b78eb19c0604e620.7bt1wReQu4wPUgBg" + ] + }, + { + "id": 69, + "type": "LayeredDiffusionApply", + "pos": [ + 3301, + 1076 + ], + "size": { + "0": 315, + "1": 82 + }, + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 224, + "label": "model" + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 87 + ], + "shape": 3, + "label": "MODEL", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "LayeredDiffusionApply", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + "SDXL, Attention Injection", + 1 + ], + "color": "#346434" + }, + { + "id": 22, + "type": "ShowText|pysssss", + "pos": [ + 2454, + 1642 + ], + "size": { + "0": 392.6477966308594, + "1": 78.11640167236328 + }, + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "name": "text", + "type": "STRING", + "link": 221, + "widget": { + "name": "text" + }, + "label": "text" + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 229 + ], + "shape": 6, + "label": "STRING", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ShowText|pysssss", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + "", + "ugly, deformed, noisy, low poly, blurry, painting" + ], + "color": "#346434" + }, + { + "id": 130, + "type": "Efficient Loader", + "pos": [ + 2917, + 1253 + ], + "size": { + "0": 371.9156799316406, + "1": 462.7869567871094 + }, + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "name": "lora_stack", + "type": "LORA_STACK", + "link": 222 + }, + { + "name": "cnet_stack", + "type": "CONTROL_NET_STACK", + "link": null + }, + { + "name": "positive", + "type": 0, + "link": 223, + "widget": { + "name": "positive" + } + }, + { + "name": "negative", + "type": "STRING", + "link": 229, + "widget": { + "name": "negative" + } + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 224 + ], + "shape": 3 + }, + { + "name": "CONDITIONING+", + "type": "CONDITIONING", + "links": [ + 225 + ], + "shape": 3 + }, + { + "name": "CONDITIONING-", + "type": "CONDITIONING", + "links": [ + 226 + ], + "shape": 3 + }, + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 227 + ], + "shape": 3 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 228 + ], + "shape": 3 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": null, + "shape": 3 + }, + { + "name": "DEPENDENCIES", + "type": "DEPENDENCIES", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Efficient Loader" + }, + "widgets_values": [ + "sd_xl_base_1.0.safetensors", + "Baked VAE", + -1, + "None", + 1, + 1, + "CLIP_POSITIVE", + "", + "none", + "comfy", + 1024, + 1024, + 1 + ], + "color": "#223333", + "bgcolor": "#553355", + "shape": 1 + }, + { + "id": 32, + "type": "ShowText|pysssss", + "pos": [ + 1960, + 979 + ], + "size": { + "0": 408.28466796875, + "1": 161.98403930664062 + }, + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "text", + "type": "STRING", + "link": 114, + "widget": { + "name": "text" + }, + "label": "text" + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 219 + ], + "shape": 6, + "label": "STRING", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ShowText|pysssss", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + "", + "The vast river eastward flows, waves scouring away, eternally masking the traces of accomplished characters in its restless movement." + ], + "color": "#346434" + }, + { + "id": 124, + "type": "LLM", + "pos": [ + 720, + 1282 + ], + "size": { + "0": 409.18035888671875, + "1": 505.53741455078125 + }, + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "CUSTOM", + "link": 218, + "slot_index": 0 + }, + { + "name": "images", + "type": "IMAGE", + "link": null + }, + { + "name": "system_prompt_input", + "type": "STRING", + "link": null, + "widget": { + "name": "system_prompt_input" + } + }, + { + "name": "tools", + "type": "STRING", + "link": null, + "widget": { + "name": "tools" + } + }, + { + "name": "file_content", + "type": "STRING", + "link": null, + "widget": { + "name": "file_content" + } + }, + { + "name": "user_prompt", + "type": 0, + "link": 214, + "widget": { + "name": "user_prompt" + } + } + ], + "outputs": [ + { + "name": "assistant_response", + "type": "STRING", + "links": [ + 215 + ], + "shape": 3 + }, + { + "name": "history", + "type": "STRING", + "links": null, + "shape": 3, + "slot_index": 1 + }, + { + "name": "tool", + "type": "STRING", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "LLM" + }, + "widgets_values": [ + "你是一个懂宋词分析的古诗词专家,我会给你一句宋词。请你分析古诗中的意象(带有古代中国特色的形象)并给出意象的动态(action)并表述他在空间中前后关系不要分开列意象、动态和位置,组成一个短句(如什么(意象)在什么位置怎么动)。注意只需要英文(ENGLISH),请控制输出长度在256token以内。不要回复额外内容,不要回复额外内容,不需要回复诗歌解析。只需要英文(ENGLISH)。只需要英文(ENGLISH)。不要出现人\n", + "你好", + 0.7, + "disable", + "disable", + "disable", + "disable", + 2048, + "", + "", + "", + "" + ], + "color": "#346434" + }, + { + "id": 33, + "type": "Simple String", + "pos": [ + 161, + 1123 + ], + "size": { + "0": 315, + "1": 58 + }, + "flags": {}, + "order": 3, + "mode": 0, + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 113, + 214 + ], + "shape": 3, + "label": "STRING", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Simple String", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + "大江东去,浪淘尽,千古风流人物。" + ], + "color": "#346434" + }, + { + "id": 131, + "type": "Reroute", + "pos": [ + 4045, + 1320.4913906021707 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 22, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 231, + "slot_index": 0 + } + ], + "outputs": [ + { + "name": "", + "type": "IMAGE", + "links": [ + 230 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 121, + "type": "LoRA Stacker", + "pos": [ + 2914, + 788 + ], + "size": { + "0": 315, + "1": 274 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "lora_stack", + "type": "LORA_STACK", + "link": null + } + ], + "outputs": [ + { + "name": "LORA_STACK", + "type": "LORA_STACK", + "links": [ + 222 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "LoRA Stacker" + }, + "widgets_values": [ + "simple", + 4, + "formv2-zeng-xl\\formV21024-xl-000006.safetensors", + 0, + 1, + 1, + "Hyper-SD\\Hyper-SDXL-8steps-CFG-lora.safetensors", + 0.5, + 1, + 1, + "Yutong_Zhu\\taihu1-000008.safetensors", + 0.5, + 1, + 1, + "X潮玩.safetensors", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1, + "None", + 1, + 1, + 1 + ], + "color": "#222233", + "bgcolor": "#333355", + "shape": 1 + }, + { + "id": 10, + "type": "KSampler (Efficient)", + "pos": [ + 3628, + 1246 + ], + "size": { + "0": 231.2859649658203, + "1": 564.1793212890625 + }, + "flags": {}, + "order": 19, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 87, + "label": "model", + "slot_index": 0 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 225, + "label": "positive" + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 226, + "label": "negative" + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 227, + "label": "latent_image" + }, + { + "name": "optional_vae", + "type": "VAE", + "link": 228, + "label": "optional_vae" + }, + { + "name": "script", + "type": "SCRIPT", + "link": null, + "label": "script", + "slot_index": 5 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [], + "shape": 3, + "label": "MODEL", + "slot_index": 0 + }, + { + "name": "CONDITIONING+", + "type": "CONDITIONING", + "links": [], + "shape": 3, + "label": "CONDITIONING+", + "slot_index": 1 + }, + { + "name": "CONDITIONING-", + "type": "CONDITIONING", + "links": [], + "shape": 3, + "label": "CONDITIONING-", + "slot_index": 2 + }, + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 200 + ], + "shape": 3, + "label": "LATENT", + "slot_index": 3 + }, + { + "name": "VAE", + "type": "VAE", + "links": [], + "shape": 3, + "label": "VAE", + "slot_index": 4 + }, + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 202, + 231 + ], + "shape": 3, + "label": "IMAGE", + "slot_index": 5 + } + ], + "properties": { + "Node name for S&R": "KSampler (Efficient)" + }, + "widgets_values": [ + 276358496079565, + null, + 15, + 8, + "ddim", + "normal", + 1, + "auto", + "true" + ], + "color": "#332222", + "bgcolor": "#665533", + "shape": 1 + }, + { + "id": 94, + "type": "SaveImage", + "pos": [ + 4351, + 1614 + ], + "size": { + "0": 351.2366943359375, + "1": 270 + }, + "flags": {}, + "order": 28, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 122, + "label": "images" + } + ], + "properties": { + "Node name for S&R": "SaveImage", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + "ComfyUI" + ], + "color": "#346434" + }, + { + "id": 110, + "type": "SaveImage", + "pos": [ + 3949, + 1529 + ], + "size": { + "0": 326.15435791015625, + "1": 270 + }, + "flags": {}, + "order": 21, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 202, + "label": "images" + } + ], + "properties": { + "Node name for S&R": "SaveImage" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 129, + "type": "Note", + "pos": [ + 5572, + 1256 + ], + "size": { + "0": 210, + "1": 58 + }, + "flags": {}, + "order": 5, + "mode": 0, + "properties": { + "text": "" + }, + "widgets_values": [ + "ctrl+B bypass" + ], + "color": "#c09430" + }, + { + "id": 132, + "type": "LoadImage", + "pos": [ + 4430, + 707 + ], + "size": { + "0": 315, + "1": 314 + }, + "flags": {}, + "order": 6, + "mode": 0, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [], + "shape": 3, + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": [], + "shape": 3, + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "marble (1).png", + "image" + ] + }, + { + "id": 21, + "type": "ShowText|pysssss", + "pos": [ + 2463, + 1115 + ], + "size": { + "0": 368.0568542480469, + "1": 455.1419677734375 + }, + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "text", + "type": "STRING", + "link": 220, + "widget": { + "name": "text" + }, + "label": "text" + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 223 + ], + "shape": 6, + "label": "STRING", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ShowText|pysssss", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + "", + "A minimalistic 3D sculpture focusing on abstract forms that represent The vast river eastward flows, waves scouring away, eternally masking the traces of accomplished characters in its restless movement. in Path leading through golden fields, reflective mood. Created Using: abstract art style, minimalistic design, sleek lines, subdued color palette, themes of transience and recurrence, focus on gentle fall, contemplative mood" + ], + "color": "#346434" + }, + { + "id": 85, + "type": "ShowText|pysssss", + "pos": [ + 1198, + 1286 + ], + "size": { + "0": 349.2051086425781, + "1": 495.9770202636719 + }, + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "text", + "type": "STRING", + "link": 215, + "widget": { + "name": "text" + }, + "label": "text" + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 114 + ], + "shape": 6, + "label": "STRING", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ShowText|pysssss", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + "", + "The vast river eastward flows, waves scouring away, eternally masking the traces of accomplished characters in its restless movement." + ], + "color": "#346434" + }, + { + "id": 72, + "type": "LayeredDiffusionDecode", + "pos": [ + 4305, + 1119 + ], + "size": { + "0": 315, + "1": 102 + }, + "flags": {}, + "order": 24, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 124, + "label": "samples" + }, + { + "name": "images", + "type": "IMAGE", + "link": 126, + "label": "images" + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 94, + 98 + ], + "shape": 3, + "label": "IMAGE", + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": [ + 95, + 99 + ], + "shape": 3, + "label": "MASK", + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "LayeredDiffusionDecode", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + "SDXL", + 16 + ], + "color": "#346434" + }, + { + "id": 70, + "type": "LayeredDiffusionDecodeRGBA", + "pos": [ + 4332, + 1429 + ], + "size": { + "0": 315, + "1": 102 + }, + "flags": {}, + "order": 25, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 125, + "label": "samples" + }, + { + "name": "images", + "type": "IMAGE", + "link": 127, + "label": "images", + "slot_index": 1 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 122, + 240 + ], + "shape": 3, + "label": "IMAGE", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "LayeredDiffusionDecodeRGBA", + "ttNbgOverride": { + "color": "#346434", + "groupcolor": "#8A8" + } + }, + "widgets_values": [ + "SDXL", + 16 + ], + "color": "#346434" + }, + { + "id": 133, + "type": "ImageRemoveBackground+", + "pos": [ + 5066, + 815 + ], + "size": { + "0": 321.211669921875, + "1": 49.238773345947266 + }, + "flags": {}, + "order": 29, + "mode": 0, + "inputs": [ + { + "name": "rembg_session", + "type": "REMBG_SESSION", + "link": 232, + "slot_index": 0 + }, + { + "name": "image", + "type": "IMAGE", + "link": 240 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 236, + 237 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": [], + "shape": 3, + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "ImageRemoveBackground+" + } + }, + { + "id": 120, + "type": "TripoGLBViewer_ZHO", + "pos": [ + 4973, + 1633 + ], + "size": [ + 600, + 500 + ], + "flags": {}, + "order": 34, + "mode": 0, + "inputs": [ + { + "name": "mesh", + "type": "MESH_GLB", + "link": 206, + "label": "mesh" + } + ], + "properties": { + "Node name for S&R": "TripoGLBViewer_ZHO" + }, + "widgets_values": [ + null + ] + }, + { + "id": 119, + "type": "TripoAPI_Zho", + "pos": [ + 5028, + 1382 + ], + "size": [ + 406.2181091308594, + 192.6945037841797 + ], + "flags": {}, + "order": 32, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 236, + "label": "image" + }, + { + "name": "prompt", + "type": "STRING", + "link": null, + "widget": { + "name": "prompt" + } + } + ], + "outputs": [ + { + "name": "MESH_GLB", + "type": "MESH_GLB", + "links": [ + 206 + ], + "shape": 3, + "slot_index": 0, + "label": "MESH_GLB" + }, + { + "name": "TASK_ID", + "type": "TASK_ID", + "links": null, + "shape": 3, + "slot_index": 1, + "label": "TASK_ID" + } + ], + "properties": { + "Node name for S&R": "TripoAPI_Zho" + }, + "widgets_values": [ + "image-to-3d", + "" + ] + }, + { + "id": 135, + "type": "SaveImage", + "pos": [ + 5079, + 1054 + ], + "size": [ + 318.06160489014565, + 270 + ], + "flags": {}, + "order": 33, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 237 + } + ], + "properties": { + "Node name for S&R": "SaveImage" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 134, + "type": "RemBGSession+", + "pos": [ + 5058, + 661 + ], + "size": { + "0": 315, + "1": 82 + }, + "flags": {}, + "order": 7, + "mode": 0, + "outputs": [ + { + "name": "REMBG_SESSION", + "type": "REMBG_SESSION", + "links": [ + 232 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "RemBGSession+" + }, + "widgets_values": [ + "isnet-general-use: general purpose", + "CUDA" + ] + }, + { + "id": 137, + "type": "ImageRemoveBackground+", + "pos": [ + 5566.463795443904, + 1022.7755093691102 + ], + "size": { + "0": 241.79998779296875, + "1": 46 + }, + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "rembg_session", + "type": "REMBG_SESSION", + "link": 241, + "slot_index": 0 + }, + { + "name": "image", + "type": "IMAGE", + "link": null + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": null, + "shape": 3 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "ImageRemoveBackground+" + } + }, + { + "id": 138, + "type": "RemBGSession+", + "pos": [ + 5464, + 1093 + ], + "size": { + "0": 315, + "1": 82 + }, + "flags": {}, + "order": 8, + "mode": 0, + "outputs": [ + { + "name": "REMBG_SESSION", + "type": "REMBG_SESSION", + "links": [ + 241 + ], + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "RemBGSession+" + }, + "widgets_values": [ + "u2net: general purpose", + "CPU" + ] + }, + { + "id": 128, + "type": "SDXLPromptStyler", + "pos": [ + 2453, + 802 + ], + "size": { + "0": 400, + "1": 242 + }, + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "name": "text_positive", + "type": 0, + "link": 219, + "widget": { + "name": "text_positive" + } + } + ], + "outputs": [ + { + "name": "text_positive", + "type": "STRING", + "links": [ + 220 + ], + "shape": 3 + }, + { + "name": "text_negative", + "type": "STRING", + "links": [ + 221 + ], + "shape": 3 + } + ], + "title": "SDXLPromptStyler", + "properties": { + "Node name for S&R": "SDXLPromptStyler" + }, + "widgets_values": [ + "", + "", + "南乡子", + false, + true, + true + ], + "color": "#346434" + } ], - "positive": [ - "20", - 1 + "links": [ + [ + 15, + 14, + 0, + 13, + 0, + "MESH" + ], + [ + 16, + 15, + 0, + 14, + 0, + "TRIPOSR_MODEL" + ], + [ + 87, + 69, + 0, + 10, + 0, + "MODEL" + ], + [ + 94, + 72, + 0, + 14, + 1, + "IMAGE" + ], + [ + 95, + 72, + 1, + 14, + 2, + "MASK" + ], + [ + 98, + 72, + 0, + 74, + 1, + "IMAGE" + ], + [ + 99, + 72, + 1, + 74, + 2, + "MASK" + ], + [ + 101, + 74, + 0, + 77, + 0, + "IMAGE" + ], + [ + 102, + 75, + 0, + 78, + 0, + "IMAGE" + ], + [ + 103, + 78, + 0, + 74, + 0, + "IMAGE" + ], + [ + 114, + 85, + 0, + 32, + 0, + "STRING" + ], + [ + 122, + 70, + 0, + 94, + 0, + "IMAGE" + ], + [ + 124, + 98, + 0, + 72, + 0, + "LATENT" + ], + [ + 125, + 98, + 0, + 70, + 0, + "LATENT" + ], + [ + 126, + 99, + 0, + 72, + 1, + "IMAGE" + ], + [ + 127, + 99, + 0, + 70, + 1, + "IMAGE" + ], + [ + 200, + 10, + 3, + 98, + 0, + "*" + ], + [ + 202, + 10, + 5, + 110, + 0, + "IMAGE" + ], + [ + 206, + 119, + 0, + 120, + 0, + "MESH_GLB" + ], + [ + 214, + 33, + 0, + 124, + 5, + "STRING" + ], + [ + 215, + 124, + 0, + 85, + 0, + "STRING" + ], + [ + 218, + 125, + 0, + 124, + 0, + "CUSTOM" + ], + [ + 219, + 32, + 0, + 128, + 0, + "STRING" + ], + [ + 220, + 128, + 0, + 21, + 0, + "STRING" + ], + [ + 221, + 128, + 1, + 22, + 0, + "STRING" + ], + [ + 222, + 121, + 0, + 130, + 0, + "LORA_STACK" + ], + [ + 223, + 21, + 0, + 130, + 2, + "STRING" + ], + [ + 224, + 130, + 0, + 69, + 0, + "MODEL" + ], + [ + 225, + 130, + 1, + 10, + 1, + "CONDITIONING" + ], + [ + 226, + 130, + 2, + 10, + 2, + "CONDITIONING" + ], + [ + 227, + 130, + 3, + 10, + 3, + "LATENT" + ], + [ + 228, + 130, + 4, + 10, + 4, + "VAE" + ], + [ + 229, + 22, + 0, + 130, + 3, + "STRING" + ], + [ + 230, + 131, + 0, + 99, + 0, + "*" + ], + [ + 231, + 10, + 5, + 131, + 0, + "*" + ], + [ + 232, + 134, + 0, + 133, + 0, + "REMBG_SESSION" + ], + [ + 236, + 133, + 0, + 119, + 0, + "IMAGE" + ], + [ + 237, + 133, + 0, + 135, + 0, + "IMAGE" + ], + [ + 240, + 70, + 0, + 133, + 1, + "IMAGE" + ], + [ + 241, + 138, + 0, + 137, + 0, + "REMBG_SESSION" + ] ], - "negative": [ - "20", - 2 + "groups": [ + { + "title": "Group", + "bounding": [ + 6564, + 89, + 2563, + 1976 + ], + "color": "#444", + "font_size": 24, + "locked": false + }, + { + "title": "文字处理03-词牌名预设style", + "bounding": [ + 2444, + 695, + 432, + 1112 + ], + "color": "#3f789e", + "font_size": 24, + "locked": false + }, + { + "title": "文字处理2-大语言提取", + "bounding": [ + 1906, + 693, + 504, + 2051 + ], + "color": "#3f789e", + "font_size": 24, + "locked": false + }, + { + "title": "文字处理1-文本输入", + "bounding": [ + 128, + 707, + 362, + 1170 + ], + "color": "#3f789e", + "font_size": 24, + "locked": false + }, + { + "title": "生图节点", + "bounding": [ + 2899, + 717, + 1400, + 1199 + ], + "color": "#3f789e", + "font_size": 24, + "locked": false + }, + { + "title": "输出结果1-换底高清图", + "bounding": [ + 4432, + 173, + 1605, + 794 + ], + "color": "#3f789e", + "font_size": 24, + "locked": false + }, + { + "title": "输出结果2- lowpoly雕塑", + "bounding": [ + 4850, + 2222, + 1660, + 1107 + ], + "color": "#3f789e", + "font_size": 24, + "locked": false + }, + { + "title": "llm+file", + "bounding": [ + 634, + 723, + 1171, + 1155 + ], + "color": "#3f789e", + "font_size": 24, + "locked": false + } ], - "latent_image": [ - "20", - 3 - ], - "optional_vae": [ - "20", - 4 - ] - }, - "class_type": "KSampler (Efficient)" - }, - "11": { - "inputs": { - "switch_1": "On", - "lora_name_1": "form1024-xl\\form1024-xl-000006.safetensors", - "model_weight_1": 1, - "clip_weight_1": 1, - "switch_2": "On", - "lora_name_2": "Hyper-SD\\Hyper-SDXL-8steps-CFG-lora.safetensors", - "model_weight_2": 0.5, - "clip_weight_2": 1, - "switch_3": "Off", - "lora_name_3": "None", - "model_weight_3": 1, - "clip_weight_3": 1 - }, - "class_type": "CR LoRA Stack" - }, - "19": { - "inputs": { - "text_positive": [ - "32", - 0 - ], - "text_negative": "", - "style": "base", - "log_prompt": false, - "style_positive": true, - "style_negative": true - }, - "class_type": "SDXLPromptStyler" - }, - "20": { - "inputs": { - "ckpt_name": "sd_xl_base_1.0.safetensors", - "vae_name": "Baked VAE", - "clip_skip": -2, - "lora_name": "None", - "lora_model_strength": 1, - "lora_clip_strength": 1, - "positive": [ - "21", - 0 - ], - "negative": "CLIP_NEGATIVE", - "token_normalization": "none", - "weight_interpretation": "comfy", - "empty_latent_width": 1024, - "empty_latent_height": 1024, - "batch_size": 1, - "lora_stack": [ - "11", - 0 - ] - }, - "class_type": "Efficient Loader" - }, - "21": { - "inputs": { - "text": [ - "19", - 0 - ] - }, - "class_type": "ShowText|pysssss" - }, - "22": { - "inputs": { - "text": [ - "19", - 1 - ] - }, - "class_type": "ShowText|pysssss" - }, - "32": { - "inputs": { - "text": [ - "85", - 0 - ] - }, - "class_type": "ShowText|pysssss" - }, - "33": { - "inputs": { - "string": "留春不住,费尽莺儿语" - }, - "class_type": "Simple String" - }, - "46": { - "inputs": { - "image": "329247709_425681693072936_3081671045029849121_nstp=dst-jpg_e3.jpg", - "upload": "image" - }, - "class_type": "LoadImage" - }, - "68": { - "inputs": { - "image": [ - "46", - 0 - ] - }, - "class_type": "CLIPVisionEncode" - }, - "69": { - "inputs": { - "config": "SDXL, Attention Injection", - "weight": 1, - "model": [ - "20", - 0 - ] - }, - "class_type": "LayeredDiffusionApply" - }, - "70": { - "inputs": { - "sd_version": "SDXL", - "sub_batch_size": 16, - "samples": [ - "10", - 3 - ], - "images": [ - "10", - 5 - ] - }, - "class_type": "LayeredDiffusionDecodeRGBA" - }, - "72": { - "inputs": { - "sd_version": "SDXL", - "sub_batch_size": 16, - "samples": [ - "10", - 3 - ], - "images": [ - "10", - 5 - ] - }, - "class_type": "LayeredDiffusionDecode" - }, - "85": { - "inputs": { - "text": [ - "86", - 0 - ] - }, - "class_type": "ShowText|pysssss" - }, - "86": { - "inputs": { - "system_prompt": "你是一个懂词分析的古诗词专家,我会给你一句宋词。请你分析古诗中的意象,按照重要性排序,只列出重要的即可,并参照文件列出只英文的意象。注意只需要英文,请控制输出长度在256token以内只需要输出纯文本格式的回复:意象1,意象2,意象3....。不要回复额外内容,不要回复额外内容,不需要回复诗歌解析。", - "user_prompt": [ - "33", - 0 - ], - "model_name": "glm-4", - "temperature": 0.7, - "is_memory": "disable", - "is_tools_in_sys_prompt": "disable", - "is_locked": "disable", - "main_brain": "enable", - "max_length": 2048, - "file_content": [ - "89", - 0 - ], - "base_url": "", - "api_key": "", - "imgbb_api_key": "" - }, - "class_type": "LLM" - }, - "87": { - "inputs": { - "path": "analyse.txt", - "is_enable": false, - "path_type": "Relative_Path" - }, - "class_type": "load_file" - }, - "89": { - "inputs": { - "is_enable": false, - "file1": [ - "87", - 0 - ], - "file2": [ - "90", - 0 - ], - "file3": [ - "91", - 0 - ], - "file4": [ - "92", - 0 - ], - "file5": [ - "93", - 0 - ] - }, - "class_type": "file_combine_plus" - }, - "90": { - "inputs": { - "path": "yixiang.txt", - "is_enable": true, - "path_type": "Relative_Path" - }, - "class_type": "load_file" - }, - "91": { - "inputs": { - "path": "cipai.txt", - "is_enable": true, - "path_type": "Relative_Path" - }, - "class_type": "load_file" - }, - "92": { - "inputs": { - "path": "words.txt", - "is_enable": false, - "path_type": "Relative_Path" - }, - "class_type": "load_file" - }, - "93": { - "inputs": { - "path": "sdrule.txt", - "is_enable": true, - "path_type": "Relative_Path" - }, - "class_type": "load_file" - }, - "94": { - "inputs": { - "filename_prefix": "ComfyUI", - "images": [ - "70", - 0 - ] - }, - "class_type": "SaveImage" + "config": {}, + "extra": { + "workspace_info": { + "id": "tEi1FShW_BMjCcsXwVHAx", + "name": "ZHU-level3-test 2 2" + }, + "ds": { + "scale": 0.28966437973668785, + "offset": { + "0": -2711.4283390778987, + "1": -93.85904135919621 + } + } + }, + "version": 0.4, + "widget_idx_map": { + "10": { + "seed": 0, + "sampler_name": 4, + "scheduler": 5 + } + }, + "seed_widgets": { + "10": 0 + } + } } } const txt2imgAPIformatExtraData = { diff --git a/src/comfyJson/upscale.ts b/src/comfyJson/upscale.ts index 81474db..e73b672 100644 --- a/src/comfyJson/upscale.ts +++ b/src/comfyJson/upscale.ts @@ -1,65 +1,16 @@ const upScaleAPIFormatJSON = { - "4": { + "3": { "inputs": { - "ckpt_name": "xxmix9realisticsdxl_testV20.safetensors" - }, - "class_type": "CheckpointLoaderSimple" - }, - "6": { - "inputs": { - "text": "coloured glaze, jade, glass, glasssculpture, transparent, translucent, Porcelain doll, Porcelain, Glazed Artwork, Ceramic, \n8k,ultra detailed, beautiful and aesthetic, masterpiece, best quality,", - "clip": [ - "222", - 0 - ] - }, - "class_type": "CLIPTextEncode" - }, - "7": { - "inputs": { - "text": "nsfw, paintings, cartoon, anime, sketches, worst quality, low quality, normal quality, lowres, watermark, monochrome, grayscale, ugly, blurry, Tan skin, dark skin, black skin, skin spots, skin blemishes, age spot, glans, disabled, distorted, bad anatomy, morbid, malformation, amputation, bad proportions, twins, missing body, fused body, extra head, poorly drawn face, bad eyes, deformed eye, unclear eyes, cross-eyed, long neck, malformed limbs, extra limbs, extra arms, missing arms, bad tongue, strange fingers, mutated hands, missing hands, poorly drawn hands, extra hands, fused hands, connected hand, bad hands, wrong fingers, missing fingers, extra fingers, 4 fingers, 3 fingers, deformed hands, extra legs, bad legs, many legs, more than two legs, bad feet, wrong feet, extra feets,", - "clip": [ - "222", - 0 - ] - }, - "class_type": "CLIPTextEncode" - }, - "11": { - "inputs": { - "pixels": [ - "218", + "seed": 0, + "steps": 30, + "cfg": 6.5, + "sampler_name": "dpmpp_2m", + "scheduler": "karras", + "denoise": 1, + "model": [ + "15", 0 ], - "vae": [ - "4", - 2 - ] - }, - "class_type": "VAEEncode" - }, - "12": { - "inputs": { - "image": "ComfyUI_00498_.png", - "upload": "image" - }, - "class_type": "LoadImage" - }, - "15": { - "inputs": { - "amount": 1, - "samples": [ - "11", - 0 - ] - }, - "class_type": "RepeatLatentBatch" - }, - "28": { - "inputs": { - "strength": 1, - "start_percent": 0, - "end_percent": 1, "positive": [ "6", 0 @@ -68,222 +19,57 @@ const upScaleAPIFormatJSON = { "7", 0 ], - "control_net": [ - "29", - 0 - ], - "image": [ - "30", + "latent_image": [ + "5", 0 ] }, - "class_type": "ACN_AdvancedControlNetApply" + "class_type": "KSampler" }, - "29": { + "4": { "inputs": { - "control_net_name": "control-lora-canny-rank256.safetensors" + "ckpt_name": "juggernautXL_v9Rdphoto2Lightning.safetensors" }, - "class_type": "ControlNetLoaderAdvanced" + "class_type": "CheckpointLoaderSimple" }, - "30": { + "5": { "inputs": { - "preprocessor": "CannyEdgePreprocessor", - "resolution": 1024, - "image": [ - "218", - 0 - ] + "width": 1024, + "height": 1024, + "batch_size": 1 }, - "class_type": "AIO_Preprocessor" + "class_type": "EmptyLatentImage" }, - "34": { + "6": { "inputs": { - "preset": "PLUS (high strength)", - "model": [ - "94", - 0 - ] - }, - "class_type": "IPAdapterUnifiedLoader" - }, - "47": { - "inputs": { - "filename_prefix": "image_", - "images": [ - "250", - 0 - ] - }, - "class_type": "SaveImage" - }, - "92": { - "inputs": { - "switch_1": "On", - "lora_name_1": "琉璃少女xl1V10.safetensors", - "model_weight_1": 1, - "clip_weight_1": 1, - "switch_2": "On", - "lora_name_2": "sdxl_glass.safetensors", - "model_weight_2": 0.8, - "clip_weight_2": 1, - "switch_3": "On", - "lora_name_3": "jade.safetensors", - "model_weight_3": 0.9, - "clip_weight_3": 1 - }, - "class_type": "CR LoRA Stack" - }, - "94": { - "inputs": { - "model": [ - "4", + "text": [ + "18", 0 ], "clip": [ "4", 1 - ], - "lora_stack": [ - "92", - 0 ] }, - "class_type": "CR Apply LoRA Stack" + "class_type": "CLIPTextEncode" }, - "97": { + "7": { "inputs": { - "images": [ - "30", - 0 - ] - }, - "class_type": "PreviewImage" - }, - "98": { - "inputs": { - "weight_style": 0.8, - "weight_composition": 1, - "expand_style": false, - "combine_embeds": "concat", - "start_at": 0, - "end_at": 1, - "embeds_scaling": "V only", - "model": [ - "34", - 0 - ], - "ipadapter": [ - "34", + "text": [ + "17", 1 ], - "image_style": [ - "218", - 0 - ], - "image_composition": [ - "218", - 0 - ], - "image_negative": [ - "177", - 0 - ] - }, - "class_type": "IPAdapterStyleComposition" - }, - "105": { - "inputs": { - "seed": 1064298728955951 - }, - "class_type": "Seed (rgthree)" - }, - "108": { - "inputs": { - "strength": 0.65, - "start_percent": 0, - "end_percent": 0.9, - "positive": [ - "28", - 0 - ], - "negative": [ - "28", + "clip": [ + "4", 1 - ], - "control_net": [ - "109", - 0 - ], - "image": [ - "110", - 0 ] }, - "class_type": "ACN_AdvancedControlNetApply" + "class_type": "CLIPTextEncode" }, - "109": { - "inputs": { - "control_net_name": "control-lora-depth-rank256.safetensors" - }, - "class_type": "ControlNetLoaderAdvanced" - }, - "110": { - "inputs": { - "preprocessor": "DepthAnythingPreprocessor", - "resolution": 1024, - "image": [ - "218", - 0 - ] - }, - "class_type": "AIO_Preprocessor" - }, - "111": { - "inputs": { - "images": [ - "110", - 0 - ] - }, - "class_type": "PreviewImage" - }, - "143": { - "inputs": { - "add_noise": "enable", - "noise_seed": [ - "105", - 0 - ], - "steps": 10, - "cfg": 2, - "sampler_name": "dpmpp_sde", - "scheduler": "karras", - "start_at_step": 3, - "end_at_step": 10, - "return_with_leftover_noise": "enable", - "model": [ - "98", - 0 - ], - "positive": [ - "108", - 0 - ], - "negative": [ - "108", - 1 - ], - "latent_image": [ - "15", - 0 - ] - }, - "class_type": "KSamplerAdvanced" - }, - "144": { + "8": { "inputs": { "samples": [ - "143", + "3", 0 ], "vae": [ @@ -293,119 +79,74 @@ const upScaleAPIFormatJSON = { }, "class_type": "VAEDecode" }, - "177": { + "9": { "inputs": { - "type": "shuffle", - "strength": 0.85, - "blur": 2, - "image_optional": [ - "218", + "filename_prefix": "IPAdapter", + "images": [ + "8", 0 ] }, - "class_type": "IPAdapterNoise" + "class_type": "SaveImage" }, - "218": { + "11": { "inputs": { - "upscale_method": "lanczos", - "width": 1024, - "height": 0, - "crop": "disabled", - "image": [ + "preset": "PLUS (high strength)", + "model": [ + "4", + 0 + ] + }, + "class_type": "IPAdapterUnifiedLoader" + }, + "12": { + "inputs": { + "image": "azalea,cuckoo4.png", + "upload": "image" + }, + "class_type": "LoadImage" + }, + "15": { + "inputs": { + "weight_style": 0.45, + "weight_composition": 1, + "expand_style": false, + "combine_embeds": "average", + "start_at": 0, + "end_at": 1, + "embeds_scaling": "V only", + "model": [ + "11", + 0 + ], + "ipadapter": [ + "11", + 1 + ], + "image_style": [ + "16", + 0 + ], + "image_composition": [ "12", 0 ] }, - "class_type": "ImageScale" + "class_type": "IPAdapterStyleComposition" }, - "222": { + "16": { "inputs": { - "stop_at_clip_layer": -2, - "clip": [ - "94", - 1 - ] + "image": "ART DIR Are.na-07.webp", + "upload": "image" }, - "class_type": "CLIPSetLastLayer" + "class_type": "LoadImage" }, - "226": { + "17": { "inputs": { - "temperature": 0, - "hue": 0, - "brightness": 7, - "contrast": 10, - "saturation": 20, - "gamma": 1, - "image": [ - "334", - 0 - ] - }, - "class_type": "ColorCorrect" - }, - "250": { - "inputs": { - "black_level": 12, - "mid_level": 127.5, - "white_level": 255, - "image": [ - "226", - 0 - ] - }, - "class_type": "Image Levels Adjustment" - }, - "321": { - "inputs": { - "images": [ - "250", - 0 - ] - }, - "class_type": "PreviewImage" - }, - "331": { - "inputs": { - "upscale_model": [ - "333", + "text_positive": [ + "21", 0 ], - "image": [ - "144", - 0 - ] - }, - "class_type": "ImageUpscaleWithModel" - }, - "333": { - "inputs": { - "model_name": "4x-UltraSharp.pth" - }, - "class_type": "UpscaleModelLoader" - }, - "334": { - "inputs": { - "upscale_method": "lanczos", - "scale_by": 0.5, - "image": [ - "331", - 0 - ] - }, - "class_type": "ImageScaleBy" - }, - "335": { - "inputs": { - "images": [ - "144", - 0 - ] - }, - "class_type": "PreviewImage" - }, - "405": { - "inputs": { - "text_positive": "", "text_negative": "", "style": "base", "log_prompt": true, @@ -413,9 +154,23 @@ const upScaleAPIFormatJSON = { "style_negative": true }, "class_type": "SDXLPromptStyler" + }, + "18": { + "inputs": { + "text": [ + "17", + 0 + ] + }, + "class_type": "ShowText|pysssss" + }, + "21": { + "inputs": { + "positive": "" + }, + "class_type": "easy positive" } } - export { upScaleAPIFormatJSON } \ No newline at end of file diff --git a/src/seed.ts b/src/seed.ts index 2ceeb65..025a81a 100644 --- a/src/seed.ts +++ b/src/seed.ts @@ -1,3 +1,2 @@ -let seed = 0; -let strength = 1; -export { seed, strength }; \ No newline at end of file +const globalMap = {step1url: ""}; +export { globalMap }; \ No newline at end of file