diff --git a/mikey_nodes.py b/mikey_nodes.py index 3026fc3..43dc884 100644 --- a/mikey_nodes.py +++ b/mikey_nodes.py @@ -503,9 +503,15 @@ class PromptWithStyle: neg_prompt = negative_prompt + ', ' + self.neg_style[style] width = self.ratio_dict[ratio_selected]["width"] height = self.ratio_dict[ratio_selected]["height"] + # calculate dimensions for target_width, target height (base) and refiner_width, refiner_height (refiner) + ratio = min([width, height]) / max([width, height]) + target_width, target_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + refiner_width = target_width + refiner_height = target_height + print('Width:', width, 'Height:', height, + 'Target Width:', target_width, 'Target Height:', target_height, + 'Refiner Width:', refiner_width, 'Refiner Height:', refiner_height) latent = torch.zeros([batch_size, 4, height // 8, width // 8]) - refiner_width = width * 4 - refiner_height = height * 4 return ({"samples":latent}, str(pos_prompt), str(neg_prompt), @@ -551,9 +557,17 @@ class PromptWithStyleV2: negative_prompt, style, ratio_selected, batch_size, seed) + # calculate dimensions for target_width, target height (base) and refiner_width, refiner_height (refiner) + ratio = min([width, height]) / max([width, height]) + target_width, target_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + refiner_width = target_width + refiner_height = target_height + print('Width:', width, 'Height:', height, + 'Target Width:', target_width, 'Target Height:', target_height, + 'Refiner Width:', refiner_width, 'Refiner Height:', refiner_height) # encode text - sdxl_pos_cond = CLIPTextEncodeSDXL.encode(self, clip_base, width, height, 0, 0, width, height, pos_prompt, pos_style)[0] - sdxl_neg_cond = CLIPTextEncodeSDXL.encode(self, clip_base, width, height, 0, 0, width, height, neg_prompt, neg_style)[0] + sdxl_pos_cond = CLIPTextEncodeSDXL.encode(self, clip_base, width, height, 0, 0, target_width, target_height, pos_prompt, pos_style)[0] + sdxl_neg_cond = CLIPTextEncodeSDXL.encode(self, clip_base, width, height, 0, 0, target_width, target_height, neg_prompt, neg_style)[0] refiner_pos_cond = CLIPTextEncodeSDXLRefiner.encode(self, clip_refiner, 6, refiner_width, refiner_height, pos_prompt)[0] refiner_neg_cond = CLIPTextEncodeSDXLRefiner.encode(self, clip_refiner, 2.5, refiner_width, refiner_height, neg_prompt)[0] # return @@ -588,8 +602,14 @@ class PromptWithSDXL: width = self.ratio_dict[ratio_selected]["width"] height = self.ratio_dict[ratio_selected]["height"] latent = torch.zeros([batch_size, 4, height // 8, width // 8]) - refiner_width = width * 4 - refiner_height = height * 4 + # calculate dimensions for target_width, target height (base) and refiner_width, refiner_height (refiner) + ratio = min([width, height]) / max([width, height]) + target_width, target_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + refiner_width = target_width + refiner_height = target_height + print('Width:', width, 'Height:', height, + 'Target Width:', target_width, 'Target Height:', target_height, + 'Refiner Width:', refiner_width, 'Refiner Height:', refiner_height) return ({"samples":latent}, str(positive_prompt), str(negative_prompt), @@ -619,6 +639,8 @@ class PromptWithStyleV3: "custom_height": ("INT", {"default": 1024, "min": 1, "max": 8192, "step": 1}), "batch_size": ("INT", {"default": 1, "min": 1, "max": 64}), "seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}), + "target_mode": (["match", "2x", "4x", "2x90", "4x90", + "2048","2048-90","4096", "4096-90"], {"default": "4x"}), "base_model": ("MODEL",), "clip_base": ("CLIP",), "clip_refiner": ("CLIP",), } } @@ -680,7 +702,7 @@ class PromptWithStyleV3: return pos_prompt, neg_prompt def start(self, base_model, clip_base, clip_refiner, positive_prompt, negative_prompt, ratio_selected, batch_size, seed, - custom_size='false', fit_custom_size='false', custom_width=1024, custom_height=1024): + custom_size='false', fit_custom_size='false', custom_width=1024, custom_height=1024, target_mode='match'): if custom_size == 'true': if fit_custom_size == 'true': if custom_width == 1 and custom_height == 1: @@ -699,11 +721,44 @@ class PromptWithStyleV3: latent = torch.zeros([batch_size, 4, height // 8, width // 8]) print(batch_size, 4, height // 8, width // 8) - #target_width = width * 4 - #target_height = height * 4 - target_width, target_height = find_latent_size(width, height, res=4096) - refiner_width = target_width - refiner_height = target_height + # calculate dimensions for target_width, target height (base) and refiner_width, refiner_height (refiner) + ratio = min([width, height]) / max([width, height]) + if target_mode == 'match': + target_width, target_height = width, height + refiner_width, refiner_height = width * 4, height * 4 + #refiner_width, refiner_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + elif target_mode == '2x': + target_width, target_height = width * 2, height * 2 + refiner_width, refiner_height = width * 4, height * 4 + #refiner_width, refiner_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + elif target_mode == '4x': + target_width, target_height = width * 4, height * 4 + refiner_width, refiner_height = width * 4, height * 4 + #refiner_width, refiner_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + elif target_mode == '2x90': + target_width, target_height = height * 2, width * 2 + refiner_width, refiner_height = width * 4, height * 4 + #refiner_width, refiner_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + elif target_mode == '4x90': + target_width, target_height = height * 4, width * 4 + refiner_width, refiner_height = width * 4, height * 4 + #refiner_width, refiner_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + elif target_mode == '4096': + target_width, target_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + refiner_width, refiner_height = width * 4, height * 4 + #refiner_width, refiner_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + elif target_mode == '4096-90': + target_width, target_height = (4096, 4096 * ratio // 8 * 8) if width < height else (4096 * ratio // 8 * 8, 4096) + refiner_width, refiner_height = width * 4, height * 4 + #refiner_width, refiner_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + elif target_mode == '2048': + target_width, target_height = (2048, 2048 * ratio // 8 * 8) if width > height else (2048 * ratio // 8 * 8, 2048) + refiner_width, refiner_height = width * 4, height * 4 + #refiner_width, refiner_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) + elif target_mode == '2048-90': + target_width, target_height = (2048, 2048 * ratio // 8 * 8) if width < height else (2048 * ratio // 8 * 8, 2048) + refiner_width, refiner_height = width * 4, height * 4 + #refiner_width, refiner_height = (4096, 4096 * ratio // 8 * 8) if width > height else (4096 * ratio // 8 * 8, 4096) print('Width:', width, 'Height:', height, 'Target Width:', target_width, 'Target Height:', target_height, 'Refiner Width:', refiner_width, 'Refiner Height:', refiner_height) @@ -762,8 +817,8 @@ class PromptWithStyleV3: neg_prompt_ = re.sub(style_re, '', neg_prompt) pos_prompt_, neg_prompt_ = self.parse_prompts(pos_prompt_, neg_prompt_, style_, seed) pos_style_, neg_style_ = str(self.pos_style[style_]), str(self.neg_style[style_]) - base_model, clip_base_pos, pos_prompt_ = self.extract_and_load_loras(pos_prompt_, base_model, clip_base) - base_model, clip_base_neg, neg_prompt_ = self.extract_and_load_loras(neg_prompt_, base_model, clip_base) + #base_model, clip_base_pos, pos_prompt_ = self.extract_and_load_loras(pos_prompt_, base_model, clip_base) + #base_model, clip_base_neg, neg_prompt_ = self.extract_and_load_loras(neg_prompt_, base_model, clip_base) width_, height_ = width, height refiner_width_, refiner_height_ = refiner_width, refiner_height # encode text diff --git a/prompt_with_styles_2x.json b/prompt_with_styles_2x.json index fdc2aa5..fda4a34 100644 --- a/prompt_with_styles_2x.json +++ b/prompt_with_styles_2x.json @@ -1,746 +1,22 @@ { - "last_node_id": 19, - "last_link_id": 61, + "last_node_id": 21, + "last_link_id": 63, "nodes": [ - { - "id": 6, - "type": "CLIPTextEncodeSDXL", - "pos": [ - 320, - 30 - ], - "size": { - "0": 400, - "1": 270 - }, - "flags": { - "collapsed": true - }, - "order": 7, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 21 - }, - { - "name": "width", - "type": "INT", - "link": 9, - "widget": { - "name": "width", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "height", - "type": "INT", - "link": 10, - "widget": { - "name": "height", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "target_width", - "type": "INT", - "link": 11, - "widget": { - "name": "target_width", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "target_height", - "type": "INT", - "link": 12, - "widget": { - "name": "target_height", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "text_g", - "type": "STRING", - "link": 7, - "widget": { - "name": "text_g", - "config": [ - "STRING", - { - "multiline": true, - "default": "CLIP_G" - } - ] - } - }, - { - "name": "text_l", - "type": "STRING", - "link": 13, - "widget": { - "name": "text_l", - "config": [ - "STRING", - { - "multiline": true, - "default": "CLIP_L" - } - ] - } - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 22, - 44 - ], - "shape": 3, - "slot_index": 0 - } - ], - "title": "CLIPTextEncodeSDXL (Positive)", - "properties": { - "Node name for S&R": "CLIPTextEncodeSDXL" - }, - "widgets_values": [ - 1024, - 1024, - 0, - 0, - 1024, - 1024, - "CLIP_G", - "CLIP_L" - ], - "color": "#232", - "bgcolor": "#353" - }, - { - "id": 9, - "type": "CLIPTextEncodeSDXL", - "pos": [ - 320, - 60 - ], - "size": { - "0": 400, - "1": 270 - }, - "flags": { - "collapsed": true - }, - "order": 6, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 20 - }, - { - "name": "width", - "type": "INT", - "link": 16, - "widget": { - "name": "width", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "height", - "type": "INT", - "link": 18, - "widget": { - "name": "height", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "target_width", - "type": "INT", - "link": 17, - "widget": { - "name": "target_width", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "target_height", - "type": "INT", - "link": 19, - "widget": { - "name": "target_height", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "text_g", - "type": "STRING", - "link": 33, - "widget": { - "name": "text_g", - "config": [ - "STRING", - { - "multiline": true, - "default": "CLIP_G" - } - ] - } - }, - { - "name": "text_l", - "type": "STRING", - "link": 32, - "widget": { - "name": "text_l", - "config": [ - "STRING", - { - "multiline": true, - "default": "CLIP_L" - } - ] - } - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 23, - 45 - ], - "shape": 3, - "slot_index": 0 - } - ], - "title": "CLIPTextEncodeSDXL (Negative)", - "properties": { - "Node name for S&R": "CLIPTextEncodeSDXL" - }, - "widgets_values": [ - 1024, - 1024, - 0, - 0, - 1024, - 1024, - "CLIP_G", - "CLIP_L" - ], - "color": "#322", - "bgcolor": "#533" - }, - { - "id": 11, - "type": "CLIPTextEncodeSDXLRefiner", - "pos": [ - 330, - 600 - ], - "size": { - "0": 302.3999938964844, - "1": 118 - }, - "flags": { - "collapsed": true - }, - "order": 5, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 28 - }, - { - "name": "width", - "type": "INT", - "link": 29, - "widget": { - "name": "width", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "height", - "type": "INT", - "link": 30, - "widget": { - "name": "height", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "text", - "type": "STRING", - "link": 31, - "widget": { - "name": "text", - "config": [ - "STRING", - { - "multiline": true - } - ] - } - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 35, - 50 - ], - "shape": 3, - "slot_index": 0 - } - ], - "title": "CLIPTextEncodeSDXLRefiner (Negative)", - "properties": { - "Node name for S&R": "CLIPTextEncodeSDXLRefiner" - }, - "widgets_values": [ - 2.5, - 1024, - 1024, - "" - ], - "color": "#322", - "bgcolor": "#533" - }, - { - "id": 10, - "type": "CLIPTextEncodeSDXLRefiner", - "pos": [ - 330, - 570 - ], - "size": { - "0": 302.3999938964844, - "1": 118 - }, - "flags": { - "collapsed": true - }, - "order": 4, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 27 - }, - { - "name": "width", - "type": "INT", - "link": 24, - "widget": { - "name": "width", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "height", - "type": "INT", - "link": 25, - "widget": { - "name": "height", - "config": [ - "INT", - { - "default": 1024, - "min": 0, - "max": 8192 - } - ] - } - }, - { - "name": "text", - "type": "STRING", - "link": 26, - "widget": { - "name": "text", - "config": [ - "STRING", - { - "multiline": true - } - ] - } - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 34, - 49 - ], - "shape": 3, - "slot_index": 0 - } - ], - "title": "CLIPTextEncodeSDXLRefiner (Positive)", - "properties": { - "Node name for S&R": "CLIPTextEncodeSDXLRefiner" - }, - "widgets_values": [ - 6, - 1024, - 1024, - "" - ], - "color": "#232", - "bgcolor": "#353" - }, - { - "id": 4, - "type": "KSamplerAdvanced", - "pos": [ - 1280, - 30 - ], - "size": { - "0": 315, - "1": 334 - }, - "flags": { - "pinned": true - }, - "order": 8, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 1 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 22 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 23 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 8 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 36 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "KSamplerAdvanced" - }, - "widgets_values": [ - "enable", - 923264072281987, - "randomize", - 13, - 7, - "dpmpp_2m", - "simple", - 0, - 12, - "enable" - ], - "color": "#432", - "bgcolor": "#653" - }, - { - "id": 14, - "type": "KSamplerAdvanced", - "pos": [ - 1600, - 30 - ], - "size": { - "0": 315, - "1": 334 - }, - "flags": { - "pinned": true - }, - "order": 13, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 43 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 44 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 45 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 61 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 51 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "KSamplerAdvanced" - }, - "widgets_values": [ - "enable", - 64024951320801, - "randomize", - 31, - 7, - "dpmpp_2s_ancestral", - "simple", - 23, - 30, - "enable" - ], - "color": "#432", - "bgcolor": "#653" - }, - { - "id": 12, - "type": "VAEDecode", - "pos": [ - 0, - 830 - ], - "size": { - "0": 210, - "1": 46 - }, - "flags": { - "pinned": true - }, - "order": 15, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 59 - }, - { - "name": "vae", - "type": "VAE", - "link": 39 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 40 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEDecode" - } - }, - { - "id": 15, - "type": "KSamplerAdvanced", - "pos": [ - 1600, - 390 - ], - "size": { - "0": 315, - "1": 334 - }, - "flags": { - "pinned": true - }, - "order": 14, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 48 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 49 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 50 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 51 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 59 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "KSamplerAdvanced" - }, - "widgets_values": [ - "disable", - 969106783574471, - "randomize", - 100, - 10, - "ddim", - "simple", - 97, - 100, - "disable" - ], - "color": "#233", - "bgcolor": "#355" - }, { "id": 5, "type": "KSamplerAdvanced", "pos": [ - 1280, - 390 + 1290, + 460 + ], + "size": [ + 310, + 330 ], - "size": { - "0": 315, - "1": 334 - }, "flags": { - "pinned": true + "pinned": false }, - "order": 9, + "order": 5, "mode": 0, "inputs": [ { @@ -751,12 +27,12 @@ { "name": "positive", "type": "CONDITIONING", - "link": 34 + "link": null }, { "name": "negative", "type": "CONDITIONING", - "link": 35 + "link": null }, { "name": "latent_image", @@ -790,24 +66,464 @@ 100, "disable" ], - "color": "#233", - "bgcolor": "#355" + "color": "#243642", + "bgcolor": "#365063" + }, + { + "id": 4, + "type": "KSamplerAdvanced", + "pos": [ + 1290, + 90 + ], + "size": [ + 310, + 330 + ], + "flags": { + "pinned": false + }, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 1 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": null + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 36 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSamplerAdvanced" + }, + "widgets_values": [ + "enable", + 923264072281987, + "randomize", + 13, + 7, + "dpmpp_2m", + "simple", + 0, + 12, + "enable" + ], + "color": "#244235", + "bgcolor": "#366350" + }, + { + "id": 16, + "type": "UpscaleModelLoader", + "pos": [ + 1290, + -30 + ], + "size": [ + 310, + 80 + ], + "flags": { + "pinned": false + }, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "UPSCALE_MODEL", + "type": "UPSCALE_MODEL", + "links": [ + 57 + ], + "shape": 3, + "slot_index": 0 + } + ], + "title": "Upscale Model (x4)", + "properties": { + "Node name for S&R": "UpscaleModelLoader" + }, + "widgets_values": [ + "lollypop.pth" + ], + "color": "#2d4224", + "bgcolor": "#436336" + }, + { + "id": 15, + "type": "KSamplerAdvanced", + "pos": [ + 1610, + 460 + ], + "size": [ + 320, + 330 + ], + "flags": { + "pinned": false + }, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 48 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": null + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 51 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 59 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSamplerAdvanced" + }, + "widgets_values": [ + "disable", + 969106783574471, + "randomize", + 100, + 10, + "ddim", + "simple", + 97, + 100, + "disable" + ], + "color": "#242842", + "bgcolor": "#363c63" + }, + { + "id": 12, + "type": "VAEDecode", + "pos": [ + 1610, + 830 + ], + "size": [ + 320, + 50 + ], + "flags": { + "pinned": false + }, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 59 + }, + { + "name": "vae", + "type": "VAE", + "link": 39 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 40 + ], + "shape": 3, + "slot_index": 0 + } + ], + "title": "VAE Decode 2nd", + "properties": { + "Node name for S&R": "VAEDecode" + }, + "color": "#422431", + "bgcolor": "#633649" + }, + { + "id": 14, + "type": "KSamplerAdvanced", + "pos": [ + 1610, + 90 + ], + "size": [ + 320, + 330 + ], + "flags": { + "pinned": false + }, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 43 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": null + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 61 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 51 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSamplerAdvanced" + }, + "widgets_values": [ + "enable", + 64024951320801, + "randomize", + 31, + 7, + "dpmpp_2s_ancestral", + "simple", + 23, + 30, + "enable" + ], + "color": "#244242", + "bgcolor": "#366363" + }, + { + "id": 20, + "type": "ImageScaleBy", + "pos": [ + 1610, + -30 + ], + "size": [ + 320, + 80 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 62 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 63 + ], + "shape": 3, + "slot_index": 0 + } + ], + "title": "Reduce Image to 2x", + "properties": { + "Node name for S&R": "ImageScaleBy" + }, + "widgets_values": [ + "nearest-exact", + 0.5 + ], + "color": "#244228", + "bgcolor": "#36633c" + }, + { + "id": 2, + "type": "CheckpointLoaderSimple", + "pos": [ + 0, + 640 + ], + "size": [ + 320, + 100 + ], + "flags": { + "pinned": false + }, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 1, + 43 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [], + "shape": 3, + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": null, + "shape": 3 + } + ], + "title": "Base Checkpoint", + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "sd_xl_base_1.0_0.9vae.safetensors" + ], + "color": "#2c2442", + "bgcolor": "#433663" + }, + { + "id": 13, + "type": "Save Image With Prompt Data", + "pos": [ + 330, + -120 + ], + "size": [ + 950, + 1000 + ], + "flags": { + "pinned": false, + "collapsed": false + }, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 40 + }, + { + "name": "positive_prompt", + "type": "STRING", + "link": null, + "widget": { + "name": "positive_prompt", + "config": [ + "STRING", + { + "default": "Positive Prompt" + } + ] + } + }, + { + "name": "negative_prompt", + "type": "STRING", + "link": null, + "widget": { + "name": "negative_prompt", + "config": [ + "STRING", + { + "default": "Negative Prompt" + } + ] + } + } + ], + "properties": { + "Node name for S&R": "Save Image With Prompt Data" + }, + "widgets_values": [ + "Positive Prompt", + "Negative Prompt" + ], + "color": "#423024", + "bgcolor": "#634936" }, { "id": 3, "type": "CheckpointLoaderSimple", "pos": [ 0, - 700 + 780 ], "size": { "0": 320, "1": 100 }, "flags": { - "pinned": true + "pinned": false }, - "order": 0, + "order": 2, "mode": 0, "outputs": [ { @@ -823,10 +539,7 @@ { "name": "CLIP", "type": "CLIP", - "links": [ - 27, - 28 - ], + "links": [], "shape": 3, "slot_index": 1 }, @@ -847,26 +560,118 @@ "Node name for S&R": "CheckpointLoaderSimple" }, "widgets_values": [ - "sd_xl_refiner_0.9.safetensors" + "sd_xl_refiner_1.0_0.9vae.safetensors" ], - "color": "#233", - "bgcolor": "#355" + "color": "#392442", + "bgcolor": "#563663" + }, + { + "id": 19, + "type": "ImageUpscaleWithModel", + "pos": [ + 1290, + -120 + ], + "size": [ + 310, + 50 + ], + "flags": { + "pinned": false + }, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "upscale_model", + "type": "UPSCALE_MODEL", + "link": 57, + "slot_index": 0 + }, + { + "name": "image", + "type": "IMAGE", + "link": 55 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 62 + ], + "shape": 3, + "slot_index": 0 + } + ], + "title": "Upscale Img", + "properties": { + "Node name for S&R": "ImageUpscaleWithModel" + }, + "color": "#423e24", + "bgcolor": "#635d36" + }, + { + "id": 18, + "type": "VAEEncode", + "pos": [ + 1610, + -120 + ], + "size": [ + 320, + 50 + ], + "flags": { + "pinned": false + }, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "pixels", + "type": "IMAGE", + "link": 63 + }, + { + "name": "vae", + "type": "VAE", + "link": 58 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 61 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEEncode" + }, + "color": "#3a4224", + "bgcolor": "#566336" }, { "id": 17, "type": "VAEDecode", "pos": [ - 1280, - 760 + 1290, + 830 + ], + "size": [ + 310, + 50 ], - "size": { - "0": 210, - "1": 46 - }, "flags": { - "pinned": true + "pinned": false }, - "order": 10, + "order": 6, "mode": 0, "inputs": [ { @@ -892,369 +697,112 @@ "slot_index": 0 } ], + "title": "VAE Decode 1st", "properties": { "Node name for S&R": "VAEDecode" - } + }, + "color": "#42243e", + "bgcolor": "#63365d" }, { - "id": 16, - "type": "UpscaleModelLoader", + "id": 21, + "type": "Prompt With Style V3", "pos": [ - 1290, - -70 + 0, + -120 ], - "size": { - "0": 427.0229797363281, - "1": 67.45659637451172 - }, - "flags": { - "pinned": true - }, - "order": 1, - "mode": 0, - "outputs": [ - { - "name": "UPSCALE_MODEL", - "type": "UPSCALE_MODEL", - "links": [ - 57 - ], - "shape": 3, - "slot_index": 0 - } + "size": [ + 320, + 720 ], - "title": "Upscale Model (recommend RealESRGAN_x2)", - "properties": { - "Node name for S&R": "UpscaleModelLoader" - }, - "widgets_values": [ - "RealESRGAN_x2.pth" - ] - }, - { - "id": 13, - "type": "Save Image With Prompt Data", - "pos": [ - 330, - 30 - ], - "size": { - "0": 940, - "1": 790 - }, - "flags": { - "pinned": true - }, - "order": 16, + "flags": {}, + "order": 3, "mode": 0, "inputs": [ { - "name": "images", - "type": "IMAGE", - "link": 40 + "name": "base_model", + "type": "MODEL", + "link": null + }, + { + "name": "clip_base", + "type": "CLIP", + "link": null + }, + { + "name": "clip_refiner", + "type": "CLIP", + "link": null + } + ], + "outputs": [ + { + "name": "base_model", + "type": "MODEL", + "links": null, + "shape": 3 + }, + { + "name": "samples", + "type": "LATENT", + "links": null, + "shape": 3 + }, + { + "name": "base_pos_cond", + "type": "CONDITIONING", + "links": null, + "shape": 3 + }, + { + "name": "base_neg_cond", + "type": "CONDITIONING", + "links": null, + "shape": 3 + }, + { + "name": "refiner_pos_cond", + "type": "CONDITIONING", + "links": null, + "shape": 3 + }, + { + "name": "refiner_neg_cond", + "type": "CONDITIONING", + "links": null, + "shape": 3 }, { "name": "positive_prompt", "type": "STRING", - "link": 41, - "widget": { - "name": "positive_prompt", - "config": [ - "STRING", - { - "default": "Positive Prompt" - } - ] - } + "links": null, + "shape": 3 }, { "name": "negative_prompt", "type": "STRING", - "link": 42, - "widget": { - "name": "negative_prompt", - "config": [ - "STRING", - { - "default": "Negative Prompt" - } - ] - } - } - ], - "properties": { - "Node name for S&R": "Save Image With Prompt Data" - }, - "widgets_values": [ - "Positive Prompt", - "Negative Prompt" - ] - }, - { - "id": 18, - "type": "VAEEncode", - "pos": [ - 1600, - 760 - ], - "size": { - "0": 210, - "1": 46 - }, - "flags": { - "pinned": true - }, - "order": 12, - "mode": 0, - "inputs": [ - { - "name": "pixels", - "type": "IMAGE", - "link": 56 - }, - { - "name": "vae", - "type": "VAE", - "link": 58 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 61 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEEncode" - } - }, - { - "id": 19, - "type": "ImageUpscaleWithModel", - "pos": [ - 1730, - -70 - ], - "size": { - "0": 180, - "1": 60 - }, - "flags": { - "pinned": true - }, - "order": 11, - "mode": 0, - "inputs": [ - { - "name": "upscale_model", - "type": "UPSCALE_MODEL", - "link": 57, - "slot_index": 0 - }, - { - "name": "image", - "type": "IMAGE", - "link": 55 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 56 - ], - "shape": 3, - "slot_index": 0 - } - ], - "title": "Upscale Img", - "properties": { - "Node name for S&R": "ImageUpscaleWithModel" - } - }, - { - "id": 8, - "type": "Prompt With Style", - "pos": [ - 0, - 31 - ], - "size": { - "0": 320, - "1": 510 - }, - "flags": { - "pinned": true - }, - "order": 2, - "mode": 0, - "outputs": [ - { - "name": "samples", - "type": "LATENT", - "links": [ - 8 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "positive_prompt_text_g", - "type": "STRING", - "links": [ - 7, - 41 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "negative_prompt_text_g", - "type": "STRING", - "links": [ - 33, - 42 - ], - "shape": 3, - "slot_index": 2 - }, - { - "name": "positive_style_text_l", - "type": "STRING", - "links": [ - 13, - 26 - ], - "shape": 3, - "slot_index": 3 - }, - { - "name": "negative_style_text_l", - "type": "STRING", - "links": [ - 31, - 32 - ], - "shape": 3, - "slot_index": 4 - }, - { - "name": "width", - "type": "INT", - "links": [ - 9, - 11, - 16, - 17 - ], - "shape": 3, - "slot_index": 5 - }, - { - "name": "height", - "type": "INT", - "links": [ - 10, - 12, - 18, - 19 - ], - "shape": 3, - "slot_index": 6 - }, - { - "name": "refiner_width", - "type": "INT", - "links": [ - 24, - 29 - ], - "shape": 3, - "slot_index": 7 - }, - { - "name": "refiner_height", - "type": "INT", - "links": [ - 25, - 30 - ], - "shape": 3, - "slot_index": 8 - } - ], - "properties": { - "Node name for S&R": "Prompt With Style" - }, - "widgets_values": [ - "Positive Prompt", - "Negative Prompt", - "album-art", - "16:9 [1344x768 landscape]", - 1, - 0, - "randomize" - ] - }, - { - "id": 2, - "type": "CheckpointLoaderSimple", - "pos": [ - 0, - 570 - ], - "size": { - "0": 320, - "1": 100 - }, - "flags": { - "pinned": true - }, - "order": 3, - "mode": 0, - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 1, - 43 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 20, - 21 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "VAE", - "type": "VAE", "links": null, "shape": 3 } ], - "title": "Base Checkpoint", "properties": { - "Node name for S&R": "CheckpointLoaderSimple" + "Node name for S&R": "Prompt With Style V3" }, "widgets_values": [ - "sd_xl_base_0.9.safetensors" + "Positive Prompt", + "Negative Prompt", + "1:1 [1024x1024 square]", + "false", + "true", + 1024, + 1024, + 1, + 0, + "randomize", + "4x" ], - "color": "#432", - "bgcolor": "#653" + "color": "#422424", + "bgcolor": "#633636" } ], "links": [ @@ -1266,222 +814,6 @@ 0, "MODEL" ], - [ - 7, - 8, - 1, - 6, - 5, - "STRING" - ], - [ - 8, - 8, - 0, - 4, - 3, - "LATENT" - ], - [ - 9, - 8, - 5, - 6, - 1, - "INT" - ], - [ - 10, - 8, - 6, - 6, - 2, - "INT" - ], - [ - 11, - 8, - 5, - 6, - 3, - "INT" - ], - [ - 12, - 8, - 6, - 6, - 4, - "INT" - ], - [ - 13, - 8, - 3, - 6, - 6, - "STRING" - ], - [ - 16, - 8, - 5, - 9, - 1, - "INT" - ], - [ - 17, - 8, - 5, - 9, - 3, - "INT" - ], - [ - 18, - 8, - 6, - 9, - 2, - "INT" - ], - [ - 19, - 8, - 6, - 9, - 4, - "INT" - ], - [ - 20, - 2, - 1, - 9, - 0, - "CLIP" - ], - [ - 21, - 2, - 1, - 6, - 0, - "CLIP" - ], - [ - 22, - 6, - 0, - 4, - 1, - "CONDITIONING" - ], - [ - 23, - 9, - 0, - 4, - 2, - "CONDITIONING" - ], - [ - 24, - 8, - 7, - 10, - 1, - "INT" - ], - [ - 25, - 8, - 8, - 10, - 2, - "INT" - ], - [ - 26, - 8, - 3, - 10, - 3, - "STRING" - ], - [ - 27, - 3, - 1, - 10, - 0, - "CLIP" - ], - [ - 28, - 3, - 1, - 11, - 0, - "CLIP" - ], - [ - 29, - 8, - 7, - 11, - 1, - "INT" - ], - [ - 30, - 8, - 8, - 11, - 2, - "INT" - ], - [ - 31, - 8, - 4, - 11, - 3, - "STRING" - ], - [ - 32, - 8, - 4, - 9, - 6, - "STRING" - ], - [ - 33, - 8, - 2, - 9, - 5, - "STRING" - ], - [ - 34, - 10, - 0, - 5, - 1, - "CONDITIONING" - ], - [ - 35, - 11, - 0, - 5, - 2, - "CONDITIONING" - ], [ 36, 4, @@ -1514,22 +846,6 @@ 0, "IMAGE" ], - [ - 41, - 8, - 1, - 13, - 1, - "STRING" - ], - [ - 42, - 8, - 2, - 13, - 2, - "STRING" - ], [ 43, 2, @@ -1538,22 +854,6 @@ 0, "MODEL" ], - [ - 44, - 6, - 0, - 14, - 1, - "CONDITIONING" - ], - [ - 45, - 9, - 0, - 14, - 2, - "CONDITIONING" - ], [ 48, 3, @@ -1562,22 +862,6 @@ 0, "MODEL" ], - [ - 49, - 10, - 0, - 15, - 1, - "CONDITIONING" - ], - [ - 50, - 11, - 0, - 15, - 2, - "CONDITIONING" - ], [ 51, 14, @@ -1602,14 +886,6 @@ 1, "IMAGE" ], - [ - 56, - 19, - 0, - 18, - 0, - "IMAGE" - ], [ 57, 16, @@ -1649,6 +925,22 @@ 14, 3, "LATENT" + ], + [ + 62, + 19, + 0, + 20, + 0, + "IMAGE" + ], + [ + 63, + 20, + 0, + 18, + 0, + "IMAGE" ] ], "groups": [],