diff --git a/README.md b/README.md index 877b988..b472a38 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ additional metadata to ensure compatibility with metadata detection on websites Usage • Credits

- + @@ -70,7 +70,8 @@ It uses the Image Data Reader from the allowing it to support the same formats and receive updates along with the [SD Prompt Reader](https://github.com/receyuki/stable-diffusion-prompt-reader). -***For images containing multiple sets of parameters, such as those processed through 'hires-fix' or 'refiner', you will need to modify the `data_index` to select the parameters you need*** +***For images containing multiple sets of parameters, such as those processed through `hires-fix` or `refiner`, +you will need to modify the `data_index` to select the parameters you need*** ***For images generated by SDXL and containing multiple sets of prompts, the text_g will be combined with text_l into a single prompt*** @@ -79,7 +80,7 @@ the text_g will be combined with text_l into a single prompt*** reader node -### Prompt Saver Node & Parameter Generator Node & Prompt Merger Node +### Prompt Saver Node & Parameter Generator Node - The Prompt Saver Node and The Parameter Generator Node are designed to be used together. - The Prompt Saver Node will write additional metadata in the A1111 format to the output images to be compatible with any tools that support the A1111 format, @@ -90,11 +91,22 @@ to ensure maximum compatibility. - Since it's not possible to directly extract metadata from KSampler, it is necessary to use the Parameter Generator Node to generate parameters and simultaneously output them to both the Prompt Saver Node and KSampler. -- Since the A1111 format cannot store text_g and text_l separately, SDXL users need to use the Prompt Merger Node to -combine text_g and text_l into a single prompt.
- generator, saver and merger node + generator and saver node +
+ +### Prompt Merger Node & Type Converter Node +- Since the A1111 format cannot store `text_g` and `text_l` separately, SDXL users need to use +the Prompt Merger Node to combine `text_g` and `text_l` into a single prompt. +- In some cases, inputs like `model_name`, `sampler_name`, and `scheduler` may conflict with other custom nodes. +You can use the SD Type Converter to convert them into `STRING` type and then +input them into `model_name_str`, `sampler_name_str`, and `scheduler_str`. Please note that inputs of type `STRING` +have higher priority, so do not connect `STRING` inputs unless necessary, as the Prompt Saver will prioritize reading +`STRING` inputs over regular ones. + +
+ merger and converter node
### [Example Workflow](./workflows/example_workflow.json) diff --git a/images/example_workflow.png b/images/example_workflow.png index f15616c..633f7d8 100644 Binary files a/images/example_workflow.png and b/images/example_workflow.png differ diff --git a/images/generator_saver.png b/images/generator_saver.png new file mode 100644 index 0000000..d460257 Binary files /dev/null and b/images/generator_saver.png differ diff --git a/images/generator_saver_merger.png b/images/generator_saver_merger.png deleted file mode 100644 index 931c80b..0000000 Binary files a/images/generator_saver_merger.png and /dev/null differ diff --git a/images/merger_converter.png b/images/merger_converter.png new file mode 100644 index 0000000..8d125de Binary files /dev/null and b/images/merger_converter.png differ diff --git a/images/reader.png b/images/reader.png index 6e39693..0eb05bb 100644 Binary files a/images/reader.png and b/images/reader.png differ diff --git a/images/screenshot_v100b2.png b/images/screenshot_v100b2.png new file mode 100644 index 0000000..53634ce Binary files /dev/null and b/images/screenshot_v100b2.png differ diff --git a/workflows/example_workflow.json b/workflows/example_workflow.json index a7cd04c..9dc2998 100644 --- a/workflows/example_workflow.json +++ b/workflows/example_workflow.json @@ -1,6 +1,6 @@ { - "last_node_id": 10, - "last_link_id": 33, + "last_node_id": 11, + "last_link_id": 44, "nodes": [ { "id": 4, @@ -73,47 +73,6 @@ 1 ] }, - { - "id": 6, - "type": "VAEDecode", - "pos": [ - 900, - 470 - ], - "size": { - "0": 320, - "1": 50 - }, - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 21 - }, - { - "name": "vae", - "type": "VAE", - "link": 8 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 22 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEDecode" - } - }, { "id": 5, "type": "KSamplerAdvanced", @@ -270,7 +229,7 @@ }, "widgets_values": [ "enable", - 224393857152127, + 368865854415352, "randomize", 20, 8, @@ -282,7 +241,111 @@ ] }, { - "id": 3, + "id": 9, + "type": "CLIPTextEncode", + "pos": [ + 530, + 280 + ], + "size": { + "0": 320, + "1": 54 + }, + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 6 + }, + { + "name": "text", + "type": "STRING", + "link": 4, + "widget": { + "name": "text", + "config": [ + "STRING", + { + "multiline": true + } + ] + } + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 11 + ], + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 10, + "type": "CLIPTextEncode", + "pos": [ + 530, + 410 + ], + "size": { + "0": 320, + "1": 54 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 7 + }, + { + "name": "text", + "type": "STRING", + "link": 5, + "widget": { + "name": "text", + "config": [ + "STRING", + { + "multiline": true + } + ] + } + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 12 + ], + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 11, "type": "SDPromptSaver", "pos": [ 1270, @@ -290,7 +353,7 @@ ], "size": { "0": 320, - "1": 460 + "1": 530 }, "flags": {}, "order": 7, @@ -299,13 +362,12 @@ { "name": "images", "type": "IMAGE", - "link": 22, - "slot_index": 0 + "link": 44 }, { "name": "model_name", "type": "CheckpointYesmix_v20.safetensors,Chilloutmix-Ni.safetensors,CounterfeitV30_v30.safetensors,OldFish_2348V12.safetensors,abyssorangemix2_Hard.safetensors,abyssorangemix2_Hard.vae.pt,alstroemeriaMix_v10.safetensors,alstroemeriaMix_v10.vae.ckpt,aoaokoPVCStyleModel_pvcAOAOKO.safetensors,appIcons_v2.ckpt,architecturerealmix_v1repair.safetensors,betterPinkPussy_v01.safetensors,bokomix2_v20.safetensors,cetusMix_Coda2.safetensors,cetusMix_Coda2.vae.pt,cetusMix_Whalefall2.safetensors,cetusMix_Whalefall2.vae.pt,cetusMix_v4.safetensors,cetusMix_v4.vae.pt,cheeseDaddysLandscapes_35FP16.safetensors,chikmix_V3.safetensors,chilloutmix_NiPrunedFp16Fix.safetensors,chilloutmix_NiPrunedFp32Fix.safetensors,cinematicDiffusion_v1.ckpt,dalcefoPainting_2nd.safetensors,dalcefoPainting_3rd.safetensors,dalcefoV3Painting_dalcefoV3Painting.safetensors,dosmix_.safetensors,dreamlikeDiffusion10_10.ckpt,dreamlikePhotoreal20_dreamlikePhotoreal20.safetensors,dvarchMultiPrompt_dvarchExterior.safetensors,dvarchMultiPrompt_dvarchInterior.safetensors,expmixLine_v20.safetensors,facebombmix_v1Bakedvae.safetensors,fantexiV08.safetensors,fantexiV08a.safetensors,fantexiV08c.safetensors,fantexiV09beta.ckpt,fantexiV09beta.vae.ckpt,gdmLuxuryModernHouseAnd_v10.ckpt,ghostmix_v20Bakedvae.safetensors,grapefruitHentaiModel_grapefruitv41.safetensors,guofeng3_v32Light.safetensors,hassakuHentaiModel_v13.safetensors,inkpunkDiffusion_v2.ckpt,izumi_01Safetensors.safetensors,knollingcase_v1.ckpt,landscapesupermix_v21.safetensors,majicmixRealistic_v6.safetensors,majicmixSombre_v20.safetensors,meichidarkMix_meichidarkV4.safetensors,meinahentai_v4.safetensors,meinamix_meinaV11.safetensors,newmarsmix_25D.safetensors,newmarsmix_25D.vae.pt,newmarsmix_N.safetensors,newmarsmix_R11.safetensors,nudify_xl.safetensors,orangehardBasil05_v10.safetensors,perfectWorld_perfectWorldBakedVAE.safetensors,perfectWorld_v2Baked.safetensors,perfectWorld_v3Baked.safetensors,perfectWorld_v4Baked.safetensors,perfectWorld_v5Baked.safetensors,protogenV22Anime_22.safetensors,roboeticinkpunkdream_shaperchromav510.safetensors,sd_xl_base_1.0_0.9vae.safetensors,sd_xl_refiner_1.0_0.9vae.safetensors,stablediffusionv1.5.safetensors,sunshinemix_PrunedFp16.safetensors,sunshinemix_sunlightmixPruned.safetensors,uberRealisticPornMerge_urpmv13.safetensors,v2-1_768-ema-pruned-fp16.safetensors,xeroxrealmix_v35.safetensors,xsarchitecturalV1Aerial_v11.ckpt,xsarchitectural_v11.ckpt,xsarchitecturalv1com_v12.ckpt,xsarchitecturalv3com_v31.safetensors,xxmix9realistic_v40.safetensors,yesmix_v16Original.safetensors", - "link": 24, + "link": 35, "widget": { "name": "model_name", "config": [ @@ -392,12 +454,27 @@ "yesmix_v16Original.safetensors" ] ] + }, + "slot_index": 1 + }, + { + "name": "model_name_str", + "type": "STRING", + "link": null, + "widget": { + "name": "model_name_str", + "config": [ + "STRING", + { + "default": "" + } + ] } }, { "name": "seed", "type": "INT", - "link": 25, + "link": 36, "widget": { "name": "seed", "config": [ @@ -408,12 +485,13 @@ "max": 18446744073709552000 } ] - } + }, + "slot_index": 3 }, { "name": "steps", "type": "INT", - "link": 26, + "link": 37, "widget": { "name": "steps", "config": [ @@ -424,12 +502,13 @@ "max": 10000 } ] - } + }, + "slot_index": 4 }, { "name": "cfg", "type": "FLOAT", - "link": 27, + "link": 38, "widget": { "name": "cfg", "config": [ @@ -442,12 +521,13 @@ "round": 0.01 } ] - } + }, + "slot_index": 5 }, { "name": "sampler_name", "type": "euler,euler_ancestral,heun,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,ddim,uni_pc,uni_pc_bh2", - "link": 28, + "link": 39, "widget": { "name": "sampler_name", "config": [ @@ -474,12 +554,27 @@ "uni_pc_bh2" ] ] + }, + "slot_index": 6 + }, + { + "name": "sampler_name_str", + "type": "STRING", + "link": null, + "widget": { + "name": "sampler_name_str", + "config": [ + "STRING", + { + "default": "" + } + ] } }, { "name": "scheduler", "type": "normal,karras,exponential,sgm_uniform,simple,ddim_uniform", - "link": 29, + "link": 40, "widget": { "name": "scheduler", "config": [ @@ -492,12 +587,27 @@ "ddim_uniform" ] ] + }, + "slot_index": 8 + }, + { + "name": "scheduler_str", + "type": "STRING", + "link": null, + "widget": { + "name": "scheduler_str", + "config": [ + "STRING", + { + "default": "" + } + ] } }, { "name": "positive", "type": "STRING", - "link": 30, + "link": 41, "widget": { "name": "positive", "config": [ @@ -507,12 +617,13 @@ "multiline": true } ] - } + }, + "slot_index": 10 }, { "name": "negative", "type": "STRING", - "link": 31, + "link": 42, "widget": { "name": "negative", "config": [ @@ -522,41 +633,8 @@ "multiline": true } ] - } - }, - { - "name": "width", - "type": "INT", - "link": 32, - "widget": { - "name": "width", - "config": [ - "INT", - { - "default": 0, - "min": 1, - "max": 8192, - "step": 8 - } - ] - } - }, - { - "name": "height", - "type": "INT", - "link": 33, - "widget": { - "name": "height", - "config": [ - "INT", - { - "default": 0, - "min": 1, - "max": 8192, - "step": 8 - } - ] - } + }, + "slot_index": 11 } ], "properties": { @@ -565,22 +643,66 @@ "widgets_values": [ "ComfyUI", "CheckpointYesmix_v20.safetensors", - 229536272084158, + "", + 540598798977580, "randomize", 20, 8, "euler", + "", "normal", "", - "", "png", - 0, - 0, + "0", + "png", + true, + 100, false, true, - 100 + true ] }, + { + "id": 6, + "type": "VAEDecode", + "pos": [ + 900, + 470 + ], + "size": { + "0": 320, + "1": 50 + }, + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 21 + }, + { + "name": "vae", + "type": "VAE", + "link": 8 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 44 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, { "id": 2, "type": "SDParameterGenerator", @@ -709,7 +831,7 @@ "yesmix_v16Original.safetensors" ], "links": [ - 24 + 35 ], "shape": 3, "slot_index": 3 @@ -719,7 +841,7 @@ "type": "INT", "links": [ 13, - 25 + 36 ], "shape": 3, "slot_index": 4 @@ -762,7 +884,7 @@ ], "links": [ 16, - 28 + 39 ], "shape": 3, "slot_index": 7 @@ -779,7 +901,7 @@ ], "links": [ 17, - 29 + 40 ], "shape": 3, "slot_index": 8 @@ -788,8 +910,7 @@ "name": "WIDTH", "type": "INT", "links": [ - 18, - 32 + 18 ], "shape": 3, "slot_index": 9 @@ -798,8 +919,7 @@ "name": "HEIGHT", "type": "INT", "links": [ - 19, - 33 + 19 ], "shape": 3, "slot_index": 10 @@ -812,7 +932,7 @@ "cetusMix_v4.safetensors", false, "anything_v3.yaml", - 534500589814738, + 866778260355172, "randomize", 30, 7.5, @@ -840,8 +960,9 @@ { "name": "IMAGE", "type": "IMAGE", - "links": null, - "shape": 3 + "links": [], + "shape": 3, + "slot_index": 0 }, { "name": "MASK", @@ -854,7 +975,7 @@ "type": "STRING", "links": [ 4, - 30 + 41 ], "shape": 3, "slot_index": 2 @@ -864,7 +985,7 @@ "type": "STRING", "links": [ 5, - 31 + 42 ], "shape": 3, "slot_index": 3 @@ -880,7 +1001,7 @@ "type": "INT", "links": [ 14, - 26 + 37 ], "shape": 3, "slot_index": 5 @@ -890,7 +1011,7 @@ "type": "FLOAT", "links": [ 15, - 27 + 38 ], "shape": 3, "slot_index": 6 @@ -926,110 +1047,6 @@ "((grayscale)), ((monochrome)), (low quality:2), (normal quality:2), (worst quality:2), lowres, acnes, bad anatomy, bad hands, deformed, error, logo, mosaic censoring, paintings, sketches, skin blemishes, skin spots, text, watermark, easynegative,", "Steps: 30, Sampler: DPM++ SDE Karras, CFG scale: 7.5, Seed: 428048546, Size: 512x512, Model hash: 79e42fb744, Model: perfectWorld_v2Baked, Denoising strength: 0.45, Hires upscale: 2, Hires steps: 15, Hires upscaler: R-ESRGAN 4x+" ] - }, - { - "id": 9, - "type": "CLIPTextEncode", - "pos": [ - 530, - 280 - ], - "size": [ - 320, - 50 - ], - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 6 - }, - { - "name": "text", - "type": "STRING", - "link": 4, - "widget": { - "name": "text", - "config": [ - "STRING", - { - "multiline": true - } - ] - } - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 11 - ], - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "" - ] - }, - { - "id": 10, - "type": "CLIPTextEncode", - "pos": [ - 530, - 410 - ], - "size": [ - 320, - 50 - ], - "flags": {}, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 7 - }, - { - "name": "text", - "type": "STRING", - "link": 5, - "widget": { - "name": "text", - "config": [ - "STRING", - { - "multiline": true - } - ] - } - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 12 - ], - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "" - ] } ], "links": [ @@ -1161,14 +1178,6 @@ 0, "LATENT" ], - [ - 22, - 6, - 0, - 3, - 0, - "IMAGE" - ], [ 23, 2, @@ -1178,84 +1187,76 @@ "MODEL" ], [ - 24, + 35, 2, 3, - 3, + 11, 1, "CheckpointYesmix_v20.safetensors,Chilloutmix-Ni.safetensors,CounterfeitV30_v30.safetensors,OldFish_2348V12.safetensors,abyssorangemix2_Hard.safetensors,abyssorangemix2_Hard.vae.pt,alstroemeriaMix_v10.safetensors,alstroemeriaMix_v10.vae.ckpt,aoaokoPVCStyleModel_pvcAOAOKO.safetensors,appIcons_v2.ckpt,architecturerealmix_v1repair.safetensors,betterPinkPussy_v01.safetensors,bokomix2_v20.safetensors,cetusMix_Coda2.safetensors,cetusMix_Coda2.vae.pt,cetusMix_Whalefall2.safetensors,cetusMix_Whalefall2.vae.pt,cetusMix_v4.safetensors,cetusMix_v4.vae.pt,cheeseDaddysLandscapes_35FP16.safetensors,chikmix_V3.safetensors,chilloutmix_NiPrunedFp16Fix.safetensors,chilloutmix_NiPrunedFp32Fix.safetensors,cinematicDiffusion_v1.ckpt,dalcefoPainting_2nd.safetensors,dalcefoPainting_3rd.safetensors,dalcefoV3Painting_dalcefoV3Painting.safetensors,dosmix_.safetensors,dreamlikeDiffusion10_10.ckpt,dreamlikePhotoreal20_dreamlikePhotoreal20.safetensors,dvarchMultiPrompt_dvarchExterior.safetensors,dvarchMultiPrompt_dvarchInterior.safetensors,expmixLine_v20.safetensors,facebombmix_v1Bakedvae.safetensors,fantexiV08.safetensors,fantexiV08a.safetensors,fantexiV08c.safetensors,fantexiV09beta.ckpt,fantexiV09beta.vae.ckpt,gdmLuxuryModernHouseAnd_v10.ckpt,ghostmix_v20Bakedvae.safetensors,grapefruitHentaiModel_grapefruitv41.safetensors,guofeng3_v32Light.safetensors,hassakuHentaiModel_v13.safetensors,inkpunkDiffusion_v2.ckpt,izumi_01Safetensors.safetensors,knollingcase_v1.ckpt,landscapesupermix_v21.safetensors,majicmixRealistic_v6.safetensors,majicmixSombre_v20.safetensors,meichidarkMix_meichidarkV4.safetensors,meinahentai_v4.safetensors,meinamix_meinaV11.safetensors,newmarsmix_25D.safetensors,newmarsmix_25D.vae.pt,newmarsmix_N.safetensors,newmarsmix_R11.safetensors,nudify_xl.safetensors,orangehardBasil05_v10.safetensors,perfectWorld_perfectWorldBakedVAE.safetensors,perfectWorld_v2Baked.safetensors,perfectWorld_v3Baked.safetensors,perfectWorld_v4Baked.safetensors,perfectWorld_v5Baked.safetensors,protogenV22Anime_22.safetensors,roboeticinkpunkdream_shaperchromav510.safetensors,sd_xl_base_1.0_0.9vae.safetensors,sd_xl_refiner_1.0_0.9vae.safetensors,stablediffusionv1.5.safetensors,sunshinemix_PrunedFp16.safetensors,sunshinemix_sunlightmixPruned.safetensors,uberRealisticPornMerge_urpmv13.safetensors,v2-1_768-ema-pruned-fp16.safetensors,xeroxrealmix_v35.safetensors,xsarchitecturalV1Aerial_v11.ckpt,xsarchitectural_v11.ckpt,xsarchitecturalv1com_v12.ckpt,xsarchitecturalv3com_v31.safetensors,xxmix9realistic_v40.safetensors,yesmix_v16Original.safetensors" ], [ - 25, + 36, 2, 4, + 11, 3, - 2, "INT" ], [ - 26, + 37, 1, 5, - 3, - 3, + 11, + 4, "INT" ], [ - 27, + 38, 1, 6, - 3, - 4, + 11, + 5, "FLOAT" ], [ - 28, + 39, 2, 7, - 3, - 5, + 11, + 6, "euler,euler_ancestral,heun,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,ddim,uni_pc,uni_pc_bh2" ], [ - 29, + 40, 2, 8, - 3, - 6, + 11, + 8, "normal,karras,exponential,sgm_uniform,simple,ddim_uniform" ], [ - 30, + 41, 1, 2, - 3, - 7, + 11, + 10, "STRING" ], [ - 31, + 42, 1, 3, - 3, - 8, + 11, + 11, "STRING" ], [ - 32, - 2, - 9, - 3, - 9, - "INT" - ], - [ - 33, - 2, - 10, - 3, - 10, - "INT" + 44, + 6, + 0, + 11, + 0, + "IMAGE" ] ], "groups": [],