├── .gitignore ├── LICENSE ├── README.md ├── __init__.py ├── api.py ├── api_server.py ├── builder.py └── sdapi ├── img2img.json └── txt2img.json /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Jacob Segal 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # apitools-comfyui 2 | Note - This node pack requires a PR that has not yet been merged into the main ComfyUI Repo. 3 | 4 | This node pack allows you to use the default ComfyUI editor to prototype and implement synchronous and easy-to-use HTTP endpoints. This is useful for integrating ComfyUI workflows into other systems -- particularly non-interactive ones. 5 | 6 | ## Included Endpoints 7 | This node pack includes two endpoints that allow ComfyUI to act as a swap-in replacement for the Automatic1111 API when using many tools. 8 | * `/sdapi/v1/txt2img` - A mostly-compatible implementation of Automatic1111's API of the same path. 9 | * `/sdapi/v1/img2img` - A mostly-compatible implementation of Automatic1111's API of the same path. 10 | 11 | Both of these endpoints support ControlNets (via the `alwayson_scripts` setting) and the txt2img one supports hr_fix. 12 | 13 | Both of these endpoints require that a recent version of [Masquerade Nodes](https://github.com/BadCafeCode/masquerade-nodes-comfyui) be installed. 14 | 15 | ## Custom Endpoints 16 | To create additional endpoints, simply save standard workflow .json files in the `endpoints` directory within the ComfyUI folder (where the `outputs` folder is located). Those endpoints can then be accessed via a POST request to `/api/{endpoint_name}`. 17 | 18 | For example, if you save a workflow as `endpoints/my_endpoint.json`, you can execute it via a POST request to `localhost:8188/api/my_endpoint`. 19 | 20 | ## Concepts 21 | ### Input 22 | #### `Input (API)` 23 | This node is the primary way to get input for your workflow. 24 | * `path` - A simplified JSON path to the value to get. For example, `alwayson_scripts.controlnet.args[0].model`. See the paths section below for more details. Note that `path` MUST be a string literal and cannot be processed as input from another node. 25 | * `kind` - What type to expect for this value -- e.g. `image`, `string`, `integer`, etc. Note that images are expected to be encoded as base64 strings. 26 | * `default_input` - If the path does not exist in the request (or you're running in the default UI rather than using an HTTP endpoint) 27 | * `default_string` - An alternative way to specify the default value. Rather than using a second node, you can specify the default value directly in the node as a string. 28 | 29 | ![InputExample](https://github.com/BadCafeCode/apitools-comfyui/assets/3157454/612b3185-2738-474d-a2ec-453ef25bbda7) 30 | 31 | #### `Switch (API)` 32 | This node allows entire sections of the graph to be excluded based on the existence (or lack) of certain arguments. For example, the HighResFix part of the txt2img graph will be skipped if `hr_fix` is not set to true. 33 | * `path` - A simplified JSON path to the value to check. For example, `hr_fix`. See the paths section below for more details. Note that `path` MUST be a string literal and cannot be processed as input from another node. 34 | * `on_false` - The value that will be used by the switch if the path does not exist or is falsey. 35 | * `on_true` - The value that will be used by the switch if the path exists and is truthy. 36 | * `test_switch` - This controls which path is used when running via the default UI (for development purposes) rather than via an actual HTTP endpoint. Note that in the default UI, both input nodes will need to be evaluated even though only one of them will be used. (ComfyUI doesn't currently have support for lazy evaluation.) 37 | 38 | ![SwitchExample](https://github.com/BadCafeCode/apitools-comfyui/assets/3157454/a849c7c7-33a8-4cb0-aaa8-6282049b768b) 39 | 40 | #### `Value Switch (API)` 41 | This node works the same was as the Switch, but compares equality to a particular value rather than simply checking whether the value is true or false. 42 | * `path` - A simplified JSON path to the value to check. For example, `hr_fix`. See the paths section below for more details. Note that `path` MUST be a string literal and cannot be processed as input from another node. 43 | * `value_string` - The value to compare against. Note that this MUST be a string literal and cannot be processed as input from another node. 44 | * `on_not_equal` - The value that will be used by the switch if the path does not exist or is not equal to the specified value. 45 | * `on_equal` - The value that will be used by the switch if the path exists and is equal to the specified value. 46 | * `test_value` - This controls which path is used when running via the default UI (for development purposes) rather than via an actual HTTP endpoint. Note that in the default UI, both input nodes will need to be evaluated even though only one of them will be used. (ComfyUI doesn't currently have support for lazy evaluation.) 47 | 48 | ![ValueSwitchExample](https://github.com/BadCafeCode/apitools-comfyui/assets/3157454/1176c9a2-6a6a-48fd-8902-be9329eb544f) 49 | 50 | #### `Random Seed (API)` 51 | This node is used to generate random numbers during endpoint execution. The special node is necessary due to technical reasons (specifically the fact that the back-end doesn't know or care about the `control_after_generation` inputs to nodes). 52 | 53 | ### Output 54 | #### `Serialize (API)` 55 | This node is used to return values or images to the requester. 56 | * `path` - A simplified JSON path to the value to return. For example, `face_masks[].rect`. See the paths section below for more details. 57 | * `value` - The value to serialize. 58 | * `json_object_optional` - This input can be used to insert values into an existing JSON object. For example, an image could be inserted with the path `results[].image` and then the seed associated with that image saved with `results[-1].seed`. 59 | 60 | ![OutputExample](https://github.com/BadCafeCode/apitools-comfyui/assets/3157454/c7905866-dcb2-4dda-ba94-2ae6ae122091) 61 | 62 | #### `API Output` 63 | In order for JSON results to actually be returned to the user, they must be passed into this node. If multiple JSON objects act as inputs to this node, they will be recursively merged together (with arrays concatenating) 64 | 65 | #### `Merge JSON Objects` 66 | This node can be used to recursively merge JSON objects together (with arrays concatenating). It is only necessary if you have more than five objects you're trying to send to an API Output. 67 | 68 | ## Paths 69 | Paths are parsed via a simplified parser and do not support full JSONPath syntax. The following syntax is supported: 70 | * `parent.foo` - This will return the value of the `foo` key in the object stored in the `parent` variable. 71 | * `parent[N]` - This will return the Nth element of the array stored in the `parent` variable. N must be a constant. Negative indices are allowed to index from the back. 72 | * `parent[]` - For **output only**. This will append to the array stored in the `parent` variable. 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | from .api import NODE_CLASS_MAPPINGS 2 | from .api_server import init_api_server 3 | 4 | init_api_server() 5 | 6 | __all__ = ['NODE_CLASS_MAPPINGS'] 7 | -------------------------------------------------------------------------------- /api.py: -------------------------------------------------------------------------------- 1 | import json 2 | import re 3 | import subprocess 4 | import sys 5 | import copy 6 | import io 7 | import numpy as np 8 | import torch 9 | import base64 10 | import random 11 | from PIL import Image 12 | 13 | # Eww. I'm sure there's a better way to do this, but it's probably not worth the effort 14 | def store_at_position(obj, result, path): 15 | path = re.split('[\.\[]', path) 16 | current = obj 17 | for i in range(len(path) - 1): 18 | next_is_list = path[i + 1][-1] == "]" 19 | if path[i] == "]": 20 | assert isinstance(current, list) 21 | if next_is_list: 22 | current.append([]) 23 | else: 24 | current.append({}) 25 | current = current[-1] 26 | elif path[i][-1] == "]": 27 | assert isinstance(current, list) 28 | key = int(path[i][:-1]) 29 | if key == -1 and len(current) == 0: 30 | key = 0 31 | if key >= len(current): 32 | current += [None] * (key - len(current) + 1) 33 | if current[key] is None: 34 | if next_is_list: 35 | current[key] = [] 36 | else: 37 | current[key] = {} 38 | current = current[key] 39 | elif path[i] not in current: 40 | key = path[i] 41 | if next_is_list: 42 | current[key] = [] 43 | else: 44 | current[key] = {} 45 | current = current[key] 46 | else: 47 | current = current[path[i]] 48 | 49 | last = path[-1] 50 | if last == "]": 51 | current.append(result) 52 | elif last[-1] == "]": 53 | key = int(last[:-1]) 54 | if key >= len(current): 55 | current += [None] * (key - len(current) + 1) 56 | current[key] = result 57 | else: 58 | current[last] = result 59 | 60 | 61 | def serialize_image(images): 62 | B, H, W, C = images.shape 63 | results = [] 64 | for b in range(B): 65 | image = images[b] * 255 66 | array = image.cpu().numpy() 67 | im = Image.fromarray(np.uint8(array)) 68 | im.convert('RGBA') 69 | f = io.BytesIO() 70 | im.save(f, format='PNG') 71 | results.append(base64.b64encode(f.getvalue()).decode("utf-8")) 72 | return results 73 | 74 | def default_serialize(value): 75 | return value 76 | 77 | def GenericSerializeNodeFactory(name, arg_type, serialize_function=default_serialize, default_value=None): 78 | class GenericSerializeNode: 79 | def __init__(self): 80 | pass 81 | 82 | @classmethod 83 | def INPUT_TYPES(cls): 84 | if default_value is None: 85 | value = (arg_type,) 86 | else: 87 | value = (arg_type, {"default": default_value}) 88 | return { 89 | "required": { 90 | "value": value, 91 | "path": ("STRING", {"multiline": False}), 92 | }, 93 | "optional": { 94 | "json_object_optional": ("JSON_OBJECT",) 95 | }, 96 | } 97 | 98 | FUNCTION = "output" 99 | RETURN_TYPES = ("JSON_OBJECT",) 100 | 101 | CATEGORY = "API Output" 102 | 103 | def output(self, value, path, json_object_optional=None): 104 | output = serialize_function(value) 105 | if json_object_optional is None: 106 | return ([(path, output)],) 107 | else: 108 | # return (copy.deepcopy(json_object_optional) + [(path, output)],) 109 | return (json_object_optional + [(path, output)],) 110 | 111 | GenericSerializeNode.__name__ = name 112 | return GenericSerializeNode 113 | 114 | class APISerializeNode: 115 | def __init__(self): 116 | pass 117 | 118 | @classmethod 119 | def INPUT_TYPES(cls): 120 | return { 121 | "required": { 122 | "path": ("STRING", {"multiline": False}), 123 | "value": ("*",), 124 | }, 125 | "optional": { 126 | "json_object_optional": ("JSON_OBJECT",), 127 | }, 128 | } 129 | 130 | FUNCTION = "output" 131 | RETURN_TYPES = ("JSON_OBJECT",) 132 | 133 | CATEGORY = "API Output" 134 | 135 | def output(self, path, value, json_object_optional=None): 136 | if isinstance(value, torch.Tensor): 137 | value = serialize_image(value) 138 | 139 | if json_object_optional is None: 140 | return ([(path, value)],) 141 | else: 142 | # return (copy.deepcopy(json_object_optional) + [(path, output)],) 143 | return (json_object_optional + [(path, value)],) 144 | 145 | def deserialize_image(image_input): 146 | if not isinstance(image_input, list): 147 | image_input = [image_input] 148 | 149 | result = None 150 | for image_string in image_input: 151 | decoded = base64.b64decode(image_string) 152 | image = Image.open(io.BytesIO(decoded)).convert('RGB') 153 | # image.save("/home/guill/Desktop/test_result.png", format="PNG") 154 | image_array = np.array(image).astype(np.float32) 155 | tensor = torch.from_numpy(image_array / 255.0) 156 | tensor = tensor.unsqueeze(0) 157 | if result is None: 158 | result = tensor 159 | else: 160 | result = torch.cat([result, tensor], dim=0) 161 | return result 162 | 163 | def default_deserialize(value): 164 | return value 165 | 166 | def GenericInputNodeFactory(name, arg_type, deserialize_function=default_deserialize, default_value=None): 167 | class GenericInputNode: 168 | def __init__(self): 169 | pass 170 | 171 | @classmethod 172 | def INPUT_TYPES(cls): 173 | if default_value is None: 174 | value = (arg_type,) 175 | else: 176 | value = (arg_type, {"default": default_value}) 177 | return { 178 | "required": { 179 | "path": ("STRING", {"multiline": False}), 180 | }, 181 | "optional": { 182 | "default_value": value, 183 | }, 184 | "hidden": { 185 | "api_value": value, 186 | }, 187 | } 188 | 189 | FUNCTION = "input" 190 | RETURN_TYPES = (arg_type,) 191 | 192 | CATEGORY = "API Input" 193 | 194 | def input(self, path, default_value = None, api_value = None): 195 | if api_value is not None: 196 | return (deserialize_function(api_value),) 197 | elif default_value is not None: 198 | return (default_value,) 199 | else: 200 | return (None,) 201 | 202 | GenericInputNode.__name__ = name 203 | return GenericInputNode 204 | 205 | class SerializeImageNode: 206 | def __init__(self): 207 | pass 208 | 209 | @classmethod 210 | def INPUT_TYPES(cls): 211 | return { 212 | "required": { 213 | "image": ("IMAGE",), 214 | "path": ("STRING", {"multiline": False}), 215 | }, 216 | "optional": { 217 | "json_object_optional": ("JSON_OBJECT",) 218 | }, 219 | } 220 | 221 | FUNCTION = "output" 222 | RETURN_TYPES = ("JSON_OBJECT",) 223 | 224 | CATEGORY = "API Output" 225 | 226 | def output(self, image, path, json_object_optional=None): 227 | output = "The image goes here" 228 | if json_object_optional is None: 229 | return ([(path, output)],) 230 | else: 231 | # return (copy.deepcopy(json_object_optional) + [(path, output)],) 232 | return (json_object_optional + [(path, output)],) 233 | 234 | class APIOutputNode: 235 | def __init__(self): 236 | pass 237 | 238 | @classmethod 239 | def INPUT_TYPES(cls): 240 | return { 241 | "required": { 242 | "json_object": ("JSON_OBJECT",), 243 | }, 244 | "optional": { 245 | "extra_object2": ("JSON_OBJECT",), 246 | "extra_object3": ("JSON_OBJECT",), 247 | "extra_object4": ("JSON_OBJECT",), 248 | "extra_object5": ("JSON_OBJECT",), 249 | }, 250 | } 251 | 252 | FUNCTION = "output" 253 | RETURN_TYPES = () 254 | OUTPUT_NODE = True 255 | 256 | CATEGORY = "API Output" 257 | 258 | def output(self, json_object, extra_object2=None, extra_object3=None, extra_object4=None, extra_object5=None): 259 | obj = json_object 260 | if extra_object2 is not None: 261 | obj = obj + extra_object2 262 | if extra_object3 is not None: 263 | obj = obj + extra_object3 264 | if extra_object4 is not None: 265 | obj = obj + extra_object4 266 | if extra_object5 is not None: 267 | obj = obj + extra_object5 268 | 269 | output = {} 270 | for i in range(len(obj)): 271 | path, value = obj[i] 272 | store_at_position(output, copy.deepcopy(value), path) 273 | 274 | return { "ui": { "api_output": [output] } } 275 | 276 | class APIInputNode: 277 | def __init__(self): 278 | pass 279 | @classmethod 280 | def INPUT_TYPES(cls): 281 | return { 282 | "required": { 283 | "path": ("STRING", {"multiline": False}), 284 | "kind": (["string", "integer", "float", "boolean", "image"],), 285 | }, 286 | "optional": { 287 | "default_string": ("STRING", {"multiline": False}), 288 | "default_input": ("*",), 289 | }, 290 | "hidden": { 291 | "api_value": ("*",), 292 | }, 293 | } 294 | 295 | FUNCTION = "input" 296 | RETURN_TYPES = ("*",) 297 | 298 | CATEGORY = "API Input" 299 | 300 | def input(self, path, kind, default_string = None, default_input = None, api_value = None): 301 | value = api_value 302 | if value is None: 303 | value = default_input 304 | if value is None: 305 | if default_string != "" or kind == "string" : 306 | value = default_string 307 | 308 | if kind == "string": 309 | value = str(value) 310 | elif kind == "integer": 311 | value = int(value) 312 | elif kind == "float": 313 | value = float(value) 314 | elif kind == "boolean": 315 | if value.lower() == "true": 316 | value = True 317 | elif value.lower() == "false": 318 | value = False 319 | else: 320 | try: 321 | value = bool(int(value)) 322 | except: 323 | value = False 324 | elif kind == "image": 325 | if not isinstance(value, torch.Tensor): 326 | value = deserialize_image(value) 327 | 328 | return (value,) 329 | 330 | class APIRandomSeedInput: 331 | def __init__(self): 332 | pass 333 | @classmethod 334 | def INPUT_TYPES(cls): 335 | return { 336 | "required": { 337 | "seed": ("INT", {"default": -1, "min": -1, "max": 0xffffffffffffffff}), 338 | "path": ("STRING", {"multiline": False}), 339 | } 340 | } 341 | 342 | FUNCTION = "random_seed" 343 | RETURN_TYPES = ("INT",) 344 | 345 | CATEGORY = "API Input" 346 | 347 | def random_seed(self, seed, path): 348 | if seed is None or seed == -1: 349 | seed = random.randint(0, 0xffffffffffffffff) 350 | return (seed,) 351 | 352 | class MergeJSONObjectsNode: 353 | def __init__(self): 354 | pass 355 | 356 | @classmethod 357 | def INPUT_TYPES(cls): 358 | return { 359 | "required": { 360 | "json_object1": ("JSON_OBJECT",), 361 | }, 362 | "optional": { 363 | "extra_object2": ("JSON_OBJECT",), 364 | "extra_object3": ("JSON_OBJECT",), 365 | "extra_object4": ("JSON_OBJECT",), 366 | "extra_object5": ("JSON_OBJECT",), 367 | }, 368 | } 369 | 370 | FUNCTION = "merge" 371 | RETURN_TYPES = ("JSON_OBJECT",) 372 | 373 | CATEGORY = "API Output" 374 | 375 | def merge(self, json_object, extra_object2=None, extra_object3=None, extra_object4=None, extra_object5=None): 376 | obj = json_object 377 | if extra_object2 is not None: 378 | obj = obj + extra_object2 379 | if extra_object3 is not None: 380 | obj = obj + extra_object3 381 | if extra_object4 is not None: 382 | obj = obj + extra_object4 383 | if extra_object5 is not None: 384 | obj = obj + extra_object5 385 | 386 | return (obj,) 387 | 388 | NODE_CLASS_MAPPINGS = { 389 | "API Output": APIOutputNode, 390 | # "Serialize Image (API)": SerializeImageNode, 391 | # "Image Output (API)": GenericSerializeNodeFactory("Image Output (API)", "IMAGE", serialize_function=serialize_image), 392 | # "Integer Output (API)": GenericSerializeNodeFactory("Integer Output (API)", "INT", default_value=0), 393 | # "Float Output (API)": GenericSerializeNodeFactory("Float Output (API)", "FLOAT", default_value=0.0), 394 | # "Text Output (API)": GenericSerializeNodeFactory("String Output (API)", "STRING", default_value=""), 395 | "Serialize (API)": APISerializeNode, 396 | "Merge JSON Objects": MergeJSONObjectsNode, 397 | 398 | "Input (API)": APIInputNode, 399 | # "Image Input (API)": GenericInputNodeFactory("Image Input (API)", "IMAGE", deserialize_function=deserialize_image), 400 | # "Integer Input (API)": GenericInputNodeFactory("Integer Input (API)", "INT", default_value=0), 401 | # "Float Input (API)": GenericInputNodeFactory("Float Input (API)", "FLOAT", default_value=0.0), 402 | # "Text Input (API)": GenericInputNodeFactory("String Input (API)", "STRING", default_value=""), 403 | 404 | "Random Seed Input (API)": APIRandomSeedInput, 405 | 406 | } 407 | -------------------------------------------------------------------------------- /api_server.py: -------------------------------------------------------------------------------- 1 | from server import PromptServer 2 | from .builder import GraphBuilder 3 | import aiohttp 4 | from aiohttp import web 5 | import os 6 | import base64 7 | from folder_paths import base_path 8 | import json 9 | import re 10 | import random 11 | import uuid 12 | 13 | def base64_encode_image(image_path): 14 | with open(image_path, "rb") as image_file: 15 | encoded_string = base64.b64encode(image_file.read()) 16 | return encoded_string.decode('utf-8') 17 | 18 | def get_input_link(node, input_name): 19 | inputs = node.get("inputs") 20 | if inputs is None: 21 | return True, None 22 | for input in inputs: 23 | if input["name"] == input_name: 24 | return "widget" in input, input["link"] 25 | return True, None 26 | 27 | def merge_dict_recursive(dict1, dict2): 28 | """ 29 | Recursively merges two dictionaries, concatenating arrays instead of overwriting them. 30 | """ 31 | for key in dict2: 32 | if key in dict1: 33 | if isinstance(dict1[key], dict) and isinstance(dict2[key], dict): 34 | merge_dict_recursive(dict1[key], dict2[key]) 35 | elif isinstance(dict1[key], list) and isinstance(dict2[key], list): 36 | dict1[key].extend(dict2[key]) 37 | else: 38 | dict1[key] = dict2[key] 39 | else: 40 | dict1[key] = dict2[key] 41 | return dict1 42 | 43 | def instantiate_from_save(node_defs, graph): 44 | g = GraphBuilder() 45 | cached_inputs = {} 46 | cached_nodes = {} 47 | for node in graph["nodes"]: 48 | node_type = node["type"] 49 | if node_type == "Note": 50 | continue 51 | id = str(node["id"]) 52 | cached_nodes[id] = node 53 | n = g.node(node_type, id=id) 54 | if node_type == "Reroute" or node_type == "PrimitiveNode": 55 | cached_inputs[id] = [""] 56 | else: 57 | node_def = node_defs[node["type"]] 58 | cached_inputs[id] = node_def["input_order"].get("required", []) + node_def["input_order"].get("optional", []) 59 | widget_index = 0 60 | for input in cached_inputs[id]: 61 | has_widget, link = get_input_link(node, input) 62 | if has_widget: 63 | widgets_values = node.get("widgets_values") 64 | if widgets_values is not None: 65 | if widget_index < len(widgets_values): 66 | value = widgets_values[widget_index] 67 | n.set_input(input, value) 68 | widget_index += 1 69 | if input == "seed": # Special case 70 | widget_index += 1 71 | # if widget_index != 0 and widget_index != len(widgets_values): 72 | # print("Wrong number of widget values for node", node["id"]) 73 | # print("All inputs:", cached_inputs[id]) 74 | # print("Widgets values:", widgets_values) 75 | # print("Node inputs:", node.get("inputs")) 76 | for link in graph["links"]: 77 | [link_id, from_id, from_index, to_id, to_index, kind] = link 78 | from_id = str(from_id) 79 | to_id = str(to_id) 80 | from_node = g.lookup_node(from_id) 81 | to_node = g.lookup_node(to_id) 82 | to_node.set_input(cached_nodes[to_id]["inputs"][to_index]["name"], from_node.out(from_index)) 83 | 84 | to_remove = [] 85 | for node in g.nodes.values(): 86 | if node.class_type == "Reroute" or node.class_type == "PrimitiveNode": 87 | g.replace_node_output(node.id, 0, node.get_input("")) 88 | to_remove.append(node.id) 89 | elif node.class_type == "PreviewImage": 90 | to_remove.append(node.id) 91 | 92 | for id in to_remove: 93 | g.remove_node(id) 94 | 95 | return g 96 | 97 | def read_at_position(obj, path): 98 | try: 99 | path = re.split('[\.\[]', path) 100 | current = obj 101 | for i in range(len(path)): 102 | if path[i][-1] == "]": 103 | assert isinstance(current, list) 104 | key = int(path[i][:-1]) 105 | current = current[key] 106 | else: 107 | current = current[path[i]] 108 | return current 109 | except: 110 | return None 111 | 112 | def resolve_request(graph, body): 113 | for id, node in graph.nodes.items(): 114 | if node.class_type == "Input (API)": 115 | path = node.get_input("path") 116 | if isinstance(path, str): 117 | value = read_at_position(body, path) 118 | if value is not None: 119 | node.set_input("api_value", value) 120 | node.set_input("default_input", None) 121 | node.set_input("default_string", None) 122 | else: 123 | print("Error: path is not a string:", path) 124 | elif node.class_type == "Random Seed Input (API)": 125 | path = node.get_input("path") 126 | seed = -1 127 | if isinstance(path, str): 128 | value = read_at_position(body, path) 129 | if value is not None: 130 | seed = int(value) 131 | if seed == -1: 132 | seed = random.randint(0, 0xffffffffffffffff) 133 | node.set_input("seed", seed) 134 | return graph 135 | 136 | def query_to_dict(query): 137 | d = {} 138 | for key, value in query.items(): 139 | d[key] = value 140 | return d 141 | 142 | cached_objects = None 143 | def init_api_server(): 144 | routes = PromptServer.instance.routes 145 | 146 | @routes.get('/api_endpoints') 147 | async def api_endpoints(request): 148 | endpoints_path = os.path.join(base_path, "endpoints") 149 | files = [f for f in os.listdir(endpoints_path) if os.path.isfile(os.path.join(endpoints_path, f)) and f.endswith(".json")] 150 | files = [os.path.splitext(f)[0] for f in files] 151 | return web.json_response(files) 152 | 153 | def get_best_type(t1, t2): 154 | if t1 is None: 155 | return t2 156 | if t2 is None: 157 | return t1 158 | if t1 == "*": 159 | return t2 160 | return t1 161 | 162 | def get_node_output_type(graph, node_id, output_id, node_defs, cached = {}): 163 | cached_value = cached.get((node_id, output_id), None) 164 | if cached_value is not None: 165 | return cached_value 166 | cached[(node_id,output_id)] = True 167 | 168 | result = None 169 | node = graph.nodes[node_id] 170 | t = node.class_type 171 | if t == "Input (API)": 172 | kind = node.get_input("kind") 173 | if kind == "string": 174 | result = "STRING" 175 | elif kind == "integer": 176 | result = "INT" 177 | elif kind == "float": 178 | result = "FLOAT" 179 | elif kind == "boolean": 180 | result = "BOOLEAN" 181 | elif kind == "image": 182 | result = "IMAGE" 183 | else: 184 | node_def = node_defs[t] 185 | result = node_def["output"][output_id] 186 | 187 | cached[(node_id,output_id)] = result 188 | return result 189 | 190 | 191 | def get_node_input_type(graph, node_id, input_id, node_defs, cached = {}): 192 | cached_value = cached.get((node_id, input_id), None) 193 | if cached_value is not None: 194 | return cached_value 195 | cached[(node_id,input_id)] = True 196 | 197 | result = None 198 | node = graph.nodes[node_id] 199 | input_value = node.get_input(input_id) 200 | if input_value is None: 201 | result = None 202 | elif isinstance(input_value, list): 203 | result = get_node_output_type(graph, input_value[0], input_value[1], node_defs, cached) 204 | elif input_id in node_defs[node.class_type]["input"].get("required", []): 205 | result = node_defs[node.class_type]["input"]["required"][input_id][0] 206 | elif input_id in node_defs[node.class_type]["input"].get("optional", []): 207 | result = node_defs[node.class_type]["input"]["optional"][input_id][0] 208 | elif isinstance(input_value, str): 209 | result = "STRING" 210 | elif isinstance(input_value, int) or isinstance(input_value, float): 211 | result = "FLOAT" 212 | else: 213 | result = None 214 | 215 | cached[(node_id,input_id)] = result 216 | return result 217 | 218 | def string_to_kind(string, kind): 219 | if kind == "STRING": 220 | return string 221 | elif kind == "INT": 222 | return int(string) 223 | elif kind == "FLOAT": 224 | return float(string) 225 | elif kind == "BOOLEAN": 226 | return string.lower() == "true" 227 | else: 228 | return None 229 | 230 | @routes.get('/api_info/{endpoint_name}') 231 | async def api_info(request): 232 | endpoint_name = request.match_info['endpoint_name'] 233 | endpoints_path = os.path.join(base_path, "endpoints") 234 | graph = await api_instantiate(endpoint_name, endpoints_path) 235 | assert graph is not None 236 | node_defs = await get_node_defs() 237 | 238 | inputs = {} 239 | default_values = {} 240 | switch_inputs = {} 241 | outputs = {} 242 | cached = {} 243 | for id, node in graph.nodes.items(): 244 | if node.class_type == "Input (API)": 245 | path = node.get_input("path") 246 | default_string = node.get_input("default_string") 247 | if isinstance(path, str): 248 | inputs[path] = get_node_output_type(graph, id, 0, node_defs, cached) 249 | if default_string is not None and default_string != "" and path not in default_values: 250 | default = string_to_kind(default_string, inputs[path]) 251 | if default is not None: 252 | default_values[path] = default 253 | elif node.class_type == "Random Seed Input (API)": 254 | path = node.get_input("path") 255 | if isinstance(path, str): 256 | inputs[path] = "INT" 257 | default_values[path] = node.get_input("seed") 258 | elif node.class_type == "Serialize (API)": 259 | path = node.get_input("path") 260 | if isinstance(path, str): 261 | outputs[path] = get_node_input_type(graph, id, "value", node_defs, cached) 262 | 263 | for path in switch_inputs: 264 | if path not in inputs: 265 | inputs[path] = "BOOLEAN" 266 | 267 | return web.json_response({ 268 | "inputs": inputs, 269 | "default_values": default_values, 270 | "outputs": outputs 271 | }) 272 | 273 | 274 | @routes.get('/api/{endpoint_name}') 275 | async def api_endpoint_get(request): 276 | body = query_to_dict(request.rel_url.query) 277 | endpoint_name = request.match_info['endpoint_name'] 278 | endpoints_path = os.path.join(base_path, "endpoints") 279 | return await api_endpoint(endpoint_name, endpoints_path, body) 280 | 281 | @routes.post('/api/{endpoint_name}') 282 | async def api_endpoint_post(request): 283 | body = await request.json() 284 | endpoint_name = request.match_info['endpoint_name'] 285 | endpoints_path = os.path.join(base_path, "endpoints") 286 | return await api_endpoint(endpoint_name, endpoints_path, body) 287 | 288 | @routes.get('/sdapi/v1/{endpoint_name}') 289 | async def sdapi_endpoint_get(request): 290 | body = query_to_dict(request.rel_url.query) 291 | endpoint_name = request.match_info['endpoint_name'] 292 | endpoints_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "sdapi") 293 | return await api_endpoint(endpoint_name, endpoints_path, body) 294 | 295 | @routes.post('/sdapi/v1/{endpoint_name}') 296 | async def sdapi_endpoint_post(request): 297 | # A special case -- attempted compatibility with the automatic1111 API 298 | body = await request.json() 299 | endpoint_name = request.match_info['endpoint_name'] 300 | endpoints_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "sdapi") 301 | return await api_endpoint(endpoint_name, endpoints_path, body) 302 | 303 | def get_address(): 304 | address = PromptServer.instance.address 305 | port = PromptServer.instance.port 306 | if address == "0.0.0.0": 307 | address = "127.0.0.1" 308 | return "http://" + address + ":" + str(port) 309 | 310 | def get_ws_address(): 311 | address = PromptServer.instance.address 312 | port = PromptServer.instance.port 313 | if address == "0.0.0.0": 314 | address = "127.0.0.1" 315 | return "ws://" + address + ":" + str(port) 316 | 317 | async def api_getprompt(endpoint_name, endpoints_path, body): 318 | instantiated = await api_instantiate(endpoint_name, endpoints_path) 319 | resolved = resolve_request(instantiated, body) 320 | prompt = { "prompt": resolved.finalize() } 321 | return prompt 322 | 323 | async def get_node_defs(): 324 | global cached_objects 325 | if cached_objects is None: 326 | async with aiohttp.ClientSession() as session: 327 | async with session.get(get_address() + '/object_info') as resp: 328 | cached_objects = await resp.json() 329 | return cached_objects 330 | 331 | async def api_instantiate(endpoint_name, endpoints_path): 332 | endpoint_path = os.path.join(endpoints_path, endpoint_name + ".json") 333 | if not os.path.exists(endpoint_path) or endpoints_path != os.path.commonpath([endpoints_path, endpoint_path]): 334 | raise web.HTTPNotFound(reason="No such endpoint available.") 335 | 336 | # Read the file specified by endpoint_name 337 | try: 338 | with open(endpoint_path, "r") as f: 339 | endpoint_json = f.read() 340 | graph = json.loads(endpoint_json) 341 | except: 342 | raise web.HTTPNotFound(reason="Could not load endpoint.") 343 | 344 | node_defs = await get_node_defs() 345 | 346 | instantiated = instantiate_from_save(node_defs, graph) 347 | return instantiated 348 | 349 | async def api_endpoint(endpoint_name, endpoints_path, body): 350 | prompt = await api_getprompt(endpoint_name, endpoints_path, body) 351 | client_id = str(uuid.uuid4()) 352 | prompt["client_id"] = client_id 353 | async with aiohttp.ClientSession() as session: 354 | async with session.ws_connect("{}/ws?clientId={}".format(get_ws_address(), client_id)) as ws: 355 | async with session.post(get_address() + '/prompt', json=prompt) as resp: 356 | try: 357 | response = await resp.json() 358 | prompt_id = response["prompt_id"] 359 | except Exception as e: 360 | print("Error:", e) 361 | raise web.HTTPInternalServerError(reason=e) 362 | async for msg in ws: 363 | if msg.type == aiohttp.WSMsgType.TEXT: 364 | message = msg.json() 365 | if message["type"] == "executing": 366 | data = message["data"] 367 | if data["node"] is None and data["prompt_id"] == prompt_id: 368 | break 369 | async with session.get(get_address() + '/history/' + prompt_id) as resp: 370 | response = await resp.json() 371 | result = {} 372 | ui_outputs = response[prompt_id]["outputs"] 373 | for node_id in ui_outputs: 374 | if "api_output" in ui_outputs[node_id]: 375 | for x in ui_outputs[node_id]["api_output"]: 376 | result = merge_dict_recursive(result, x) 377 | if len(result) == 1 and "RETURN_PNG" in result: 378 | base64_image = result["RETURN_PNG"][0] 379 | image_bytes = base64.b64decode(base64_image) 380 | return web.Response(body=image_bytes, content_type="image/png") 381 | return web.json_response(result) 382 | 383 | @routes.get('/api_prompt/{endpoint_name}') 384 | async def api_get_prompt(request): 385 | body = query_to_dict(request.rel_url.query) 386 | endpoints_path = os.path.join(base_path, "endpoints") 387 | prompt = await api_getprompt(request.match_info['endpoint_name'], endpoints_path, body) 388 | return web.json_response(prompt) 389 | 390 | @routes.get('/sdapi_prompt/{endpoint_name}') 391 | async def sdapi_get_prompt(request): 392 | body = query_to_dict(request.rel_url.query) 393 | endpoints_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "sdapi") 394 | prompt = await api_getprompt(request.match_info['endpoint_name'], endpoints_path, body) 395 | return web.json_response(prompt) 396 | 397 | -------------------------------------------------------------------------------- /builder.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | def example_usage(): 4 | graph = GraphBuilder() 5 | loader = graph.node("LoadImage", image="image.jpg") 6 | serializer = graph.node("Serialize (API)", path="results[].image", image_value = loader.out(0)) 7 | serializer2 = graph.node("Serialize (API)", path="results[-1].seed", json_object_optional=serializer.out(0), int_value=5) 8 | output = graph.finalize() 9 | expected_output = { 10 | "1": { 11 | "class_type": "LoadImage", 12 | "inputs": { 13 | "image": "image.jpg" 14 | } 15 | }, 16 | "2": { 17 | "class_type": "Serialize (API)", 18 | "inputs": { 19 | "path": "results[].image", 20 | "image_value": ["1", 0], 21 | } 22 | }, 23 | "3": { 24 | "class_type": "Serialize (API)", 25 | "inputs": { 26 | "path": "results[-1].seed", 27 | "json_object_optional": ["2", 0], 28 | "int_value": 5 29 | } 30 | } 31 | } 32 | 33 | class GraphBuilder: 34 | def __init__(self): 35 | self.nodes = {} 36 | self.id_gen = 1 37 | 38 | def node(self, class_type, id=None, **kwargs): 39 | if id is None: 40 | id = str(self.id_gen) 41 | self.id_gen += 1 42 | if id in self.nodes: 43 | return self.nodes[id] 44 | 45 | node = Node(id, class_type, kwargs) 46 | self.nodes[id] = node 47 | return node 48 | 49 | def lookup_node(self, id): 50 | return self.nodes.get(id) 51 | 52 | def finalize(self): 53 | output = {} 54 | for node_id, node in self.nodes.items(): 55 | output[node_id] = node.serialize() 56 | return output 57 | 58 | def replace_node_output(self, node_id, index, new_value): 59 | to_remove = [] 60 | for node in self.nodes.values(): 61 | for key, value in node.inputs.items(): 62 | if isinstance(value, list) and value[0] == node_id and value[1] == index: 63 | if new_value is None: 64 | to_remove.append((node, key)) 65 | else: 66 | node.inputs[key] = new_value 67 | for node, key in to_remove: 68 | del node.inputs[key] 69 | 70 | def remove_node(self, id): 71 | del self.nodes[id] 72 | 73 | class Node: 74 | def __init__(self, id, class_type, inputs): 75 | self.id = id 76 | self.class_type = class_type 77 | self.inputs = inputs 78 | 79 | def out(self, index): 80 | return [self.id, index] 81 | 82 | def set_input(self, key, value): 83 | if value is None: 84 | if key in self.inputs: 85 | del self.inputs[key] 86 | else: 87 | self.inputs[key] = value 88 | 89 | def get_input(self, key): 90 | return self.inputs.get(key) 91 | 92 | def serialize(self): 93 | return { 94 | "class_type": self.class_type, 95 | "inputs": self.inputs 96 | } 97 | -------------------------------------------------------------------------------- /sdapi/txt2img.json: -------------------------------------------------------------------------------- 1 | { 2 | "last_node_id": 199, 3 | "last_link_id": 367, 4 | "nodes": [ 5 | { 6 | "id": 13, 7 | "type": "API Output", 8 | "pos": [ 9 | 2818.7260085227276, 10 | 1139.88912553267 11 | ], 12 | "size": { 13 | "0": 210, 14 | "1": 106 15 | }, 16 | "flags": { 17 | "collapsed": false 18 | }, 19 | "order": 65, 20 | "mode": 0, 21 | "inputs": [ 22 | { 23 | "name": "json_object", 24 | "type": "JSON_OBJECT", 25 | "link": 71 26 | }, 27 | { 28 | "name": "extra_object2", 29 | "type": "JSON_OBJECT", 30 | "link": null 31 | }, 32 | { 33 | "name": "extra_object3", 34 | "type": "JSON_OBJECT", 35 | "link": null 36 | }, 37 | { 38 | "name": "extra_object4", 39 | "type": "JSON_OBJECT", 40 | "link": null 41 | }, 42 | { 43 | "name": "extra_object5", 44 | "type": "JSON_OBJECT", 45 | "link": null 46 | } 47 | ], 48 | "properties": { 49 | "Node name for S&R": "API Output" 50 | } 51 | }, 52 | { 53 | "id": 40, 54 | "type": "Serialize (API)", 55 | "pos": [ 56 | 2507.726008522727, 57 | 981.8891255326706 58 | ], 59 | "size": { 60 | "0": 270.3999938964844, 61 | "1": 78 62 | }, 63 | "flags": {}, 64 | "order": 62, 65 | "mode": 0, 66 | "inputs": [ 67 | { 68 | "name": "value", 69 | "type": "*", 70 | "link": 323 71 | }, 72 | { 73 | "name": "json_object_optional", 74 | "type": "JSON_OBJECT", 75 | "link": null 76 | } 77 | ], 78 | "outputs": [ 79 | { 80 | "name": "JSON_OBJECT", 81 | "type": "JSON_OBJECT", 82 | "links": [], 83 | "shape": 3, 84 | "slot_index": 0 85 | } 86 | ], 87 | "properties": { 88 | "Node name for S&R": "Serialize (API)" 89 | }, 90 | "widgets_values": [ 91 | "RETURN_PNG" 92 | ] 93 | }, 94 | { 95 | "id": 46, 96 | "type": "SaveImage", 97 | "pos": [ 98 | 2964.7260085227276, 99 | 490.88912553267033 100 | ], 101 | "size": [ 102 | 315, 103 | 270.00000381469727 104 | ], 105 | "flags": {}, 106 | "order": 66, 107 | "mode": 0, 108 | "inputs": [ 109 | { 110 | "name": "images", 111 | "type": "IMAGE", 112 | "link": 78 113 | } 114 | ], 115 | "properties": {}, 116 | "widgets_values": [ 117 | "APITest/APITest" 118 | ] 119 | }, 120 | { 121 | "id": 55, 122 | "type": "Switch (API)", 123 | "pos": [ 124 | 2509.726008522727, 125 | 567.8891255326706 126 | ], 127 | "size": { 128 | "0": 273.2540283203125, 129 | "1": 102 130 | }, 131 | "flags": {}, 132 | "order": 64, 133 | "mode": 0, 134 | "inputs": [ 135 | { 136 | "name": "on_false", 137 | "type": "*", 138 | "link": null 139 | }, 140 | { 141 | "name": "on_true", 142 | "type": "*", 143 | "link": 325 144 | } 145 | ], 146 | "outputs": [ 147 | { 148 | "name": "*", 149 | "type": "*", 150 | "links": [ 151 | 78 152 | ], 153 | "shape": 3, 154 | "slot_index": 0 155 | } 156 | ], 157 | "properties": { 158 | "Node name for S&R": "Switch (API)" 159 | }, 160 | "widgets_values": [ 161 | "save_images", 162 | true 163 | ] 164 | }, 165 | { 166 | "id": 34, 167 | "type": "CLIPTextEncode", 168 | "pos": [ 169 | 250, 170 | 870 171 | ], 172 | "size": { 173 | "0": 226.75205993652344, 174 | "1": 95.99998474121094 175 | }, 176 | "flags": {}, 177 | "order": 36, 178 | "mode": 0, 179 | "inputs": [ 180 | { 181 | "name": "clip", 182 | "type": "CLIP", 183 | "link": 42 184 | }, 185 | { 186 | "name": "text", 187 | "type": "STRING", 188 | "link": 72, 189 | "widget": { 190 | "name": "text", 191 | "config": [ 192 | "STRING", 193 | { 194 | "multiline": true 195 | } 196 | ] 197 | } 198 | } 199 | ], 200 | "outputs": [ 201 | { 202 | "name": "CONDITIONING", 203 | "type": "CONDITIONING", 204 | "links": [ 205 | 45, 206 | 339 207 | ], 208 | "shape": 3, 209 | "slot_index": 0 210 | } 211 | ], 212 | "properties": { 213 | "Node name for S&R": "CLIPTextEncode" 214 | }, 215 | "widgets_values": [ 216 | "" 217 | ] 218 | }, 219 | { 220 | "id": 32, 221 | "type": "CLIPTextEncode", 222 | "pos": [ 223 | 199, 224 | 722 225 | ], 226 | "size": { 227 | "0": 226.75205993652344, 228 | "1": 83.8530044555664 229 | }, 230 | "flags": {}, 231 | "order": 35, 232 | "mode": 0, 233 | "inputs": [ 234 | { 235 | "name": "clip", 236 | "type": "CLIP", 237 | "link": 41 238 | }, 239 | { 240 | "name": "text", 241 | "type": "STRING", 242 | "link": 64, 243 | "widget": { 244 | "name": "text", 245 | "config": [ 246 | "STRING", 247 | { 248 | "multiline": true 249 | } 250 | ] 251 | } 252 | } 253 | ], 254 | "outputs": [ 255 | { 256 | "name": "CONDITIONING", 257 | "type": "CONDITIONING", 258 | "links": [ 259 | 80, 260 | 83 261 | ], 262 | "shape": 3, 263 | "slot_index": 0 264 | } 265 | ], 266 | "properties": { 267 | "Node name for S&R": "CLIPTextEncode" 268 | }, 269 | "widgets_values": [ 270 | "" 271 | ] 272 | }, 273 | { 274 | "id": 58, 275 | "type": "ControlNetLoader", 276 | "pos": [ 277 | -540, 278 | 1580 279 | ], 280 | "size": { 281 | "0": 315, 282 | "1": 58 283 | }, 284 | "flags": {}, 285 | "order": 27, 286 | "mode": 0, 287 | "inputs": [ 288 | { 289 | "name": "control_net_name", 290 | "type": "controlnet11Models_depth.safetensors", 291 | "link": 82, 292 | "widget": { 293 | "name": "control_net_name", 294 | "config": [ 295 | [ 296 | "controlnet11Models_depth.safetensors" 297 | ] 298 | ] 299 | } 300 | } 301 | ], 302 | "outputs": [ 303 | { 304 | "name": "CONTROL_NET", 305 | "type": "CONTROL_NET", 306 | "links": [ 307 | 84 308 | ], 309 | "shape": 3, 310 | "slot_index": 0 311 | } 312 | ], 313 | "properties": { 314 | "Node name for S&R": "ControlNetLoader" 315 | }, 316 | "widgets_values": [ 317 | "controlnet11Models_depth.safetensors" 318 | ] 319 | }, 320 | { 321 | "id": 62, 322 | "type": "Input (API)", 323 | "pos": [ 324 | -970, 325 | 1900 326 | ], 327 | "size": { 328 | "0": 278.162841796875, 329 | "1": 106 330 | }, 331 | "flags": {}, 332 | "order": 0, 333 | "mode": 0, 334 | "inputs": [ 335 | { 336 | "name": "default_input", 337 | "type": "*", 338 | "link": null 339 | } 340 | ], 341 | "outputs": [ 342 | { 343 | "name": "*", 344 | "type": "*", 345 | "links": [ 346 | 86 347 | ], 348 | "shape": 3, 349 | "slot_index": 0 350 | } 351 | ], 352 | "properties": { 353 | "Node name for S&R": "Input (API)" 354 | }, 355 | "widgets_values": [ 356 | "alwayson_scripts.controlnet.args[0].weight", 357 | "float", 358 | "1.0" 359 | ] 360 | }, 361 | { 362 | "id": 65, 363 | "type": "ControlNetLoader", 364 | "pos": [ 365 | -540, 366 | 2180 367 | ], 368 | "size": { 369 | "0": 315, 370 | "1": 58 371 | }, 372 | "flags": {}, 373 | "order": 28, 374 | "mode": 0, 375 | "inputs": [ 376 | { 377 | "name": "control_net_name", 378 | "type": "controlnet11Models_depth.safetensors", 379 | "link": 91, 380 | "widget": { 381 | "name": "control_net_name", 382 | "config": [ 383 | [ 384 | "controlnet11Models_depth.safetensors" 385 | ] 386 | ] 387 | } 388 | } 389 | ], 390 | "outputs": [ 391 | { 392 | "name": "CONTROL_NET", 393 | "type": "CONTROL_NET", 394 | "links": [ 395 | 93 396 | ], 397 | "shape": 3, 398 | "slot_index": 0 399 | } 400 | ], 401 | "properties": { 402 | "Node name for S&R": "ControlNetLoader" 403 | }, 404 | "widgets_values": [ 405 | "controlnet11Models_depth.safetensors" 406 | ] 407 | }, 408 | { 409 | "id": 71, 410 | "type": "ControlNetLoader", 411 | "pos": [ 412 | -470, 413 | 2760 414 | ], 415 | "size": { 416 | "0": 315, 417 | "1": 58 418 | }, 419 | "flags": {}, 420 | "order": 29, 421 | "mode": 0, 422 | "inputs": [ 423 | { 424 | "name": "control_net_name", 425 | "type": "controlnet11Models_depth.safetensors", 426 | "link": 99, 427 | "widget": { 428 | "name": "control_net_name", 429 | "config": [ 430 | [ 431 | "controlnet11Models_depth.safetensors" 432 | ] 433 | ] 434 | } 435 | } 436 | ], 437 | "outputs": [ 438 | { 439 | "name": "CONTROL_NET", 440 | "type": "CONTROL_NET", 441 | "links": [ 442 | 101 443 | ], 444 | "shape": 3, 445 | "slot_index": 0 446 | } 447 | ], 448 | "properties": { 449 | "Node name for S&R": "ControlNetLoader" 450 | }, 451 | "widgets_values": [ 452 | "controlnet11Models_depth.safetensors" 453 | ] 454 | }, 455 | { 456 | "id": 73, 457 | "type": "ControlNetApply", 458 | "pos": [ 459 | -60, 460 | 2760 461 | ], 462 | "size": { 463 | "0": 317.4000244140625, 464 | "1": 98 465 | }, 466 | "flags": {}, 467 | "order": 44, 468 | "mode": 0, 469 | "inputs": [ 470 | { 471 | "name": "conditioning", 472 | "type": "CONDITIONING", 473 | "link": 108 474 | }, 475 | { 476 | "name": "control_net", 477 | "type": "CONTROL_NET", 478 | "link": 101 479 | }, 480 | { 481 | "name": "image", 482 | "type": "IMAGE", 483 | "link": 158 484 | }, 485 | { 486 | "name": "strength", 487 | "type": "FLOAT", 488 | "link": 103, 489 | "widget": { 490 | "name": "strength", 491 | "config": [ 492 | "FLOAT", 493 | { 494 | "default": 1, 495 | "min": 0, 496 | "max": 10, 497 | "step": 0.01 498 | } 499 | ] 500 | } 501 | } 502 | ], 503 | "outputs": [ 504 | { 505 | "name": "CONDITIONING", 506 | "type": "CONDITIONING", 507 | "links": [ 508 | 98 509 | ], 510 | "shape": 3, 511 | "slot_index": 0 512 | } 513 | ], 514 | "properties": { 515 | "Node name for S&R": "ControlNetApply" 516 | }, 517 | "widgets_values": [ 518 | 1 519 | ] 520 | }, 521 | { 522 | "id": 60, 523 | "type": "ControlNetApply", 524 | "pos": [ 525 | -130, 526 | 1580 527 | ], 528 | "size": { 529 | "0": 317.4000244140625, 530 | "1": 98 531 | }, 532 | "flags": {}, 533 | "order": 40, 534 | "mode": 0, 535 | "inputs": [ 536 | { 537 | "name": "conditioning", 538 | "type": "CONDITIONING", 539 | "link": 83 540 | }, 541 | { 542 | "name": "control_net", 543 | "type": "CONTROL_NET", 544 | "link": 84 545 | }, 546 | { 547 | "name": "image", 548 | "type": "IMAGE", 549 | "link": 156 550 | }, 551 | { 552 | "name": "strength", 553 | "type": "FLOAT", 554 | "link": 86, 555 | "widget": { 556 | "name": "strength", 557 | "config": [ 558 | "FLOAT", 559 | { 560 | "default": 1, 561 | "min": 0, 562 | "max": 10, 563 | "step": 0.01 564 | } 565 | ] 566 | } 567 | } 568 | ], 569 | "outputs": [ 570 | { 571 | "name": "CONDITIONING", 572 | "type": "CONDITIONING", 573 | "links": [ 574 | 87, 575 | 107 576 | ], 577 | "shape": 3, 578 | "slot_index": 0 579 | } 580 | ], 581 | "properties": { 582 | "Node name for S&R": "ControlNetApply" 583 | }, 584 | "widgets_values": [ 585 | 1 586 | ] 587 | }, 588 | { 589 | "id": 67, 590 | "type": "ControlNetApply", 591 | "pos": [ 592 | -130, 593 | 2180 594 | ], 595 | "size": { 596 | "0": 317.4000244140625, 597 | "1": 98 598 | }, 599 | "flags": {}, 600 | "order": 42, 601 | "mode": 0, 602 | "inputs": [ 603 | { 604 | "name": "conditioning", 605 | "type": "CONDITIONING", 606 | "link": 107 607 | }, 608 | { 609 | "name": "control_net", 610 | "type": "CONTROL_NET", 611 | "link": 93 612 | }, 613 | { 614 | "name": "image", 615 | "type": "IMAGE", 616 | "link": 157 617 | }, 618 | { 619 | "name": "strength", 620 | "type": "FLOAT", 621 | "link": 95, 622 | "widget": { 623 | "name": "strength", 624 | "config": [ 625 | "FLOAT", 626 | { 627 | "default": 1, 628 | "min": 0, 629 | "max": 10, 630 | "step": 0.01 631 | } 632 | ] 633 | } 634 | } 635 | ], 636 | "outputs": [ 637 | { 638 | "name": "CONDITIONING", 639 | "type": "CONDITIONING", 640 | "links": [ 641 | 90, 642 | 108 643 | ], 644 | "shape": 3, 645 | "slot_index": 0 646 | } 647 | ], 648 | "properties": { 649 | "Node name for S&R": "ControlNetApply" 650 | }, 651 | "widgets_values": [ 652 | 1 653 | ] 654 | }, 655 | { 656 | "id": 66, 657 | "type": "Input (API)", 658 | "pos": [ 659 | -990, 660 | 2180 661 | ], 662 | "size": { 663 | "0": 326.162841796875, 664 | "1": 106 665 | }, 666 | "flags": {}, 667 | "order": 20, 668 | "mode": 0, 669 | "inputs": [ 670 | { 671 | "name": "default_input", 672 | "type": "*", 673 | "link": null 674 | }, 675 | { 676 | "name": "default_string", 677 | "type": "STRING", 678 | "link": 121, 679 | "widget": { 680 | "name": "default_string", 681 | "config": [ 682 | "STRING", 683 | { 684 | "multiline": false 685 | } 686 | ] 687 | } 688 | } 689 | ], 690 | "outputs": [ 691 | { 692 | "name": "*", 693 | "type": "*", 694 | "links": [ 695 | 91 696 | ], 697 | "shape": 3, 698 | "slot_index": 0 699 | } 700 | ], 701 | "properties": { 702 | "Node name for S&R": "Input (API)" 703 | }, 704 | "widgets_values": [ 705 | "alwayson_scripts.controlnet.args[1].model", 706 | "string", 707 | "controlnet11Models_depth.safetensors" 708 | ] 709 | }, 710 | { 711 | "id": 69, 712 | "type": "Input (API)", 713 | "pos": [ 714 | -970, 715 | 2500 716 | ], 717 | "size": { 718 | "0": 278.162841796875, 719 | "1": 106 720 | }, 721 | "flags": {}, 722 | "order": 1, 723 | "mode": 0, 724 | "inputs": [ 725 | { 726 | "name": "default_input", 727 | "type": "*", 728 | "link": null 729 | } 730 | ], 731 | "outputs": [ 732 | { 733 | "name": "*", 734 | "type": "*", 735 | "links": [ 736 | 95 737 | ], 738 | "shape": 3, 739 | "slot_index": 0 740 | } 741 | ], 742 | "properties": { 743 | "Node name for S&R": "Input (API)" 744 | }, 745 | "widgets_values": [ 746 | "alwayson_scripts.controlnet.args[1].weight", 747 | "float", 748 | "1.0" 749 | ] 750 | }, 751 | { 752 | "id": 72, 753 | "type": "Input (API)", 754 | "pos": [ 755 | -920, 756 | 2760 757 | ], 758 | "size": { 759 | "0": 326.162841796875, 760 | "1": 106 761 | }, 762 | "flags": {}, 763 | "order": 21, 764 | "mode": 0, 765 | "inputs": [ 766 | { 767 | "name": "default_input", 768 | "type": "*", 769 | "link": null 770 | }, 771 | { 772 | "name": "default_string", 773 | "type": "STRING", 774 | "link": 122, 775 | "widget": { 776 | "name": "default_string", 777 | "config": [ 778 | "STRING", 779 | { 780 | "multiline": false 781 | } 782 | ] 783 | } 784 | } 785 | ], 786 | "outputs": [ 787 | { 788 | "name": "*", 789 | "type": "*", 790 | "links": [ 791 | 99 792 | ], 793 | "shape": 3, 794 | "slot_index": 0 795 | } 796 | ], 797 | "properties": { 798 | "Node name for S&R": "Input (API)" 799 | }, 800 | "widgets_values": [ 801 | "alwayson_scripts.controlnet.args[2].model", 802 | "string", 803 | "controlnet11Models_depth.safetensors" 804 | ] 805 | }, 806 | { 807 | "id": 75, 808 | "type": "Input (API)", 809 | "pos": [ 810 | -900, 811 | 3080 812 | ], 813 | "size": { 814 | "0": 278.162841796875, 815 | "1": 106 816 | }, 817 | "flags": {}, 818 | "order": 2, 819 | "mode": 0, 820 | "inputs": [ 821 | { 822 | "name": "default_input", 823 | "type": "*", 824 | "link": null 825 | } 826 | ], 827 | "outputs": [ 828 | { 829 | "name": "*", 830 | "type": "*", 831 | "links": [ 832 | 103 833 | ], 834 | "shape": 3, 835 | "slot_index": 0 836 | } 837 | ], 838 | "properties": { 839 | "Node name for S&R": "Input (API)" 840 | }, 841 | "widgets_values": [ 842 | "alwayson_scripts.controlnet.args[2].weight", 843 | "float", 844 | "1.0" 845 | ] 846 | }, 847 | { 848 | "id": 59, 849 | "type": "Input (API)", 850 | "pos": [ 851 | -990, 852 | 1580 853 | ], 854 | "size": { 855 | "0": 326.162841796875, 856 | "1": 106 857 | }, 858 | "flags": {}, 859 | "order": 19, 860 | "mode": 0, 861 | "inputs": [ 862 | { 863 | "name": "default_input", 864 | "type": "*", 865 | "link": null 866 | }, 867 | { 868 | "name": "default_string", 869 | "type": "STRING", 870 | "link": 120, 871 | "widget": { 872 | "name": "default_string", 873 | "config": [ 874 | "STRING", 875 | { 876 | "multiline": false 877 | } 878 | ] 879 | } 880 | } 881 | ], 882 | "outputs": [ 883 | { 884 | "name": "*", 885 | "type": "*", 886 | "links": [ 887 | 82 888 | ], 889 | "shape": 3, 890 | "slot_index": 0 891 | } 892 | ], 893 | "properties": { 894 | "Node name for S&R": "Input (API)" 895 | }, 896 | "widgets_values": [ 897 | "alwayson_scripts.controlnet.args[0].model", 898 | "string", 899 | "controlnet11Models_depth.safetensors" 900 | ] 901 | }, 902 | { 903 | "id": 48, 904 | "type": "Serialize (API)", 905 | "pos": [ 906 | 2493.726008522727, 907 | 1120.88912553267 908 | ], 909 | "size": { 910 | "0": 270.3999938964844, 911 | "1": 78 912 | }, 913 | "flags": {}, 914 | "order": 63, 915 | "mode": 0, 916 | "inputs": [ 917 | { 918 | "name": "value", 919 | "type": "*", 920 | "link": 324 921 | }, 922 | { 923 | "name": "json_object_optional", 924 | "type": "JSON_OBJECT", 925 | "link": null 926 | } 927 | ], 928 | "outputs": [ 929 | { 930 | "name": "JSON_OBJECT", 931 | "type": "JSON_OBJECT", 932 | "links": [ 933 | 71 934 | ], 935 | "shape": 3, 936 | "slot_index": 0 937 | } 938 | ], 939 | "properties": { 940 | "Node name for S&R": "Serialize (API)" 941 | }, 942 | "widgets_values": [ 943 | "images" 944 | ] 945 | }, 946 | { 947 | "id": 57, 948 | "type": "Switch (API)", 949 | "pos": [ 950 | 339, 951 | 1564 952 | ], 953 | "size": { 954 | "0": 285, 955 | "1": 102 956 | }, 957 | "flags": {}, 958 | "order": 41, 959 | "mode": 0, 960 | "inputs": [ 961 | { 962 | "name": "on_false", 963 | "type": "*", 964 | "link": 80 965 | }, 966 | { 967 | "name": "on_true", 968 | "type": "*", 969 | "link": 87 970 | } 971 | ], 972 | "outputs": [ 973 | { 974 | "name": "*", 975 | "type": "*", 976 | "links": [ 977 | 105 978 | ], 979 | "shape": 3, 980 | "slot_index": 0 981 | } 982 | ], 983 | "properties": { 984 | "Node name for S&R": "Switch (API)" 985 | }, 986 | "widgets_values": [ 987 | "alwayson_scripts.controlnet.args[0]", 988 | false 989 | ] 990 | }, 991 | { 992 | "id": 61, 993 | "type": "Input (API)", 994 | "pos": [ 995 | -980, 996 | 1740 997 | ], 998 | "size": { 999 | "0": 278.162841796875, 1000 | "1": 106 1001 | }, 1002 | "flags": {}, 1003 | "order": 32, 1004 | "mode": 0, 1005 | "inputs": [ 1006 | { 1007 | "name": "default_input", 1008 | "type": "*", 1009 | "link": 88 1010 | } 1011 | ], 1012 | "outputs": [ 1013 | { 1014 | "name": "*", 1015 | "type": "*", 1016 | "links": [ 1017 | 116 1018 | ], 1019 | "shape": 3, 1020 | "slot_index": 0 1021 | } 1022 | ], 1023 | "properties": { 1024 | "Node name for S&R": "Input (API)" 1025 | }, 1026 | "widgets_values": [ 1027 | "alwayson_scripts.controlnet.args[0].image", 1028 | "image", 1029 | "" 1030 | ] 1031 | }, 1032 | { 1033 | "id": 86, 1034 | "type": "PrimitiveNode", 1035 | "pos": [ 1036 | -2351.3693923828127, 1037 | 143.92841813964847 1038 | ], 1039 | "size": { 1040 | "0": 210, 1041 | "1": 58 1042 | }, 1043 | "flags": {}, 1044 | "order": 3, 1045 | "mode": 0, 1046 | "outputs": [ 1047 | { 1048 | "name": "STRING", 1049 | "type": "STRING", 1050 | "links": [ 1051 | 120, 1052 | 121, 1053 | 122 1054 | ], 1055 | "slot_index": 0, 1056 | "widget": { 1057 | "name": "default_string", 1058 | "config": [ 1059 | "STRING", 1060 | { 1061 | "multiline": false 1062 | } 1063 | ] 1064 | } 1065 | } 1066 | ], 1067 | "title": "Default ControlNet Model", 1068 | "properties": {}, 1069 | "widgets_values": [ 1070 | "controlnet11Models_depth.safetensors" 1071 | ] 1072 | }, 1073 | { 1074 | "id": 64, 1075 | "type": "Switch (API)", 1076 | "pos": [ 1077 | 343, 1078 | 2132 1079 | ], 1080 | "size": { 1081 | "0": 285, 1082 | "1": 102 1083 | }, 1084 | "flags": {}, 1085 | "order": 43, 1086 | "mode": 0, 1087 | "inputs": [ 1088 | { 1089 | "name": "on_false", 1090 | "type": "*", 1091 | "link": 105 1092 | }, 1093 | { 1094 | "name": "on_true", 1095 | "type": "*", 1096 | "link": 90 1097 | } 1098 | ], 1099 | "outputs": [ 1100 | { 1101 | "name": "*", 1102 | "type": "*", 1103 | "links": [ 1104 | 106 1105 | ], 1106 | "shape": 3, 1107 | "slot_index": 0 1108 | } 1109 | ], 1110 | "properties": { 1111 | "Node name for S&R": "Switch (API)" 1112 | }, 1113 | "widgets_values": [ 1114 | "alwayson_scripts.controlnet.args[1]", 1115 | false 1116 | ] 1117 | }, 1118 | { 1119 | "id": 68, 1120 | "type": "Input (API)", 1121 | "pos": [ 1122 | -980, 1123 | 2340 1124 | ], 1125 | "size": { 1126 | "0": 278.162841796875, 1127 | "1": 106 1128 | }, 1129 | "flags": {}, 1130 | "order": 33, 1131 | "mode": 0, 1132 | "inputs": [ 1133 | { 1134 | "name": "default_input", 1135 | "type": "*", 1136 | "link": 96 1137 | } 1138 | ], 1139 | "outputs": [ 1140 | { 1141 | "name": "*", 1142 | "type": "*", 1143 | "links": [ 1144 | 139 1145 | ], 1146 | "shape": 3, 1147 | "slot_index": 0 1148 | } 1149 | ], 1150 | "properties": { 1151 | "Node name for S&R": "Input (API)" 1152 | }, 1153 | "widgets_values": [ 1154 | "alwayson_scripts.controlnet.args[1].image", 1155 | "image", 1156 | "" 1157 | ] 1158 | }, 1159 | { 1160 | "id": 70, 1161 | "type": "Switch (API)", 1162 | "pos": [ 1163 | 400, 1164 | 2692 1165 | ], 1166 | "size": { 1167 | "0": 285, 1168 | "1": 102 1169 | }, 1170 | "flags": {}, 1171 | "order": 45, 1172 | "mode": 0, 1173 | "inputs": [ 1174 | { 1175 | "name": "on_false", 1176 | "type": "*", 1177 | "link": 106 1178 | }, 1179 | { 1180 | "name": "on_true", 1181 | "type": "*", 1182 | "link": 98 1183 | } 1184 | ], 1185 | "outputs": [ 1186 | { 1187 | "name": "*", 1188 | "type": "*", 1189 | "links": [ 1190 | 109, 1191 | 338 1192 | ], 1193 | "shape": 3, 1194 | "slot_index": 0 1195 | } 1196 | ], 1197 | "properties": { 1198 | "Node name for S&R": "Switch (API)" 1199 | }, 1200 | "widgets_values": [ 1201 | "alwayson_scripts.controlnet.args[2]", 1202 | false 1203 | ] 1204 | }, 1205 | { 1206 | "id": 74, 1207 | "type": "Input (API)", 1208 | "pos": [ 1209 | -910, 1210 | 2920 1211 | ], 1212 | "size": { 1213 | "0": 278.162841796875, 1214 | "1": 106 1215 | }, 1216 | "flags": {}, 1217 | "order": 34, 1218 | "mode": 0, 1219 | "inputs": [ 1220 | { 1221 | "name": "default_input", 1222 | "type": "*", 1223 | "link": 104 1224 | } 1225 | ], 1226 | "outputs": [ 1227 | { 1228 | "name": "*", 1229 | "type": "*", 1230 | "links": [ 1231 | 145 1232 | ], 1233 | "shape": 3, 1234 | "slot_index": 0 1235 | } 1236 | ], 1237 | "properties": { 1238 | "Node name for S&R": "Input (API)" 1239 | }, 1240 | "widgets_values": [ 1241 | "alwayson_scripts.controlnet.args[2].image", 1242 | "image", 1243 | "" 1244 | ] 1245 | }, 1246 | { 1247 | "id": 80, 1248 | "type": "Change Channel Count", 1249 | "pos": [ 1250 | -586, 1251 | 1722 1252 | ], 1253 | "size": { 1254 | "0": 210, 1255 | "1": 58 1256 | }, 1257 | "flags": {}, 1258 | "order": 37, 1259 | "mode": 0, 1260 | "inputs": [ 1261 | { 1262 | "name": "image", 1263 | "type": "IMAGE", 1264 | "link": 116 1265 | } 1266 | ], 1267 | "outputs": [ 1268 | { 1269 | "name": "IMAGE", 1270 | "type": "IMAGE", 1271 | "links": [ 1272 | 156, 1273 | 352 1274 | ], 1275 | "shape": 3, 1276 | "slot_index": 0 1277 | } 1278 | ], 1279 | "properties": { 1280 | "Node name for S&R": "Change Channel Count" 1281 | }, 1282 | "widgets_values": [ 1283 | "RGB" 1284 | ] 1285 | }, 1286 | { 1287 | "id": 94, 1288 | "type": "Change Channel Count", 1289 | "pos": [ 1290 | -569, 1291 | 2306 1292 | ], 1293 | "size": { 1294 | "0": 210, 1295 | "1": 58 1296 | }, 1297 | "flags": {}, 1298 | "order": 38, 1299 | "mode": 0, 1300 | "inputs": [ 1301 | { 1302 | "name": "image", 1303 | "type": "IMAGE", 1304 | "link": 139 1305 | } 1306 | ], 1307 | "outputs": [ 1308 | { 1309 | "name": "IMAGE", 1310 | "type": "IMAGE", 1311 | "links": [ 1312 | 157, 1313 | 358 1314 | ], 1315 | "shape": 3, 1316 | "slot_index": 0 1317 | } 1318 | ], 1319 | "properties": { 1320 | "Node name for S&R": "Change Channel Count" 1321 | }, 1322 | "widgets_values": [ 1323 | "RGB" 1324 | ] 1325 | }, 1326 | { 1327 | "id": 96, 1328 | "type": "Change Channel Count", 1329 | "pos": [ 1330 | -491, 1331 | 2895 1332 | ], 1333 | "size": { 1334 | "0": 210, 1335 | "1": 58 1336 | }, 1337 | "flags": {}, 1338 | "order": 39, 1339 | "mode": 0, 1340 | "inputs": [ 1341 | { 1342 | "name": "image", 1343 | "type": "IMAGE", 1344 | "link": 145 1345 | } 1346 | ], 1347 | "outputs": [ 1348 | { 1349 | "name": "IMAGE", 1350 | "type": "IMAGE", 1351 | "links": [ 1352 | 158, 1353 | 360 1354 | ], 1355 | "shape": 3, 1356 | "slot_index": 0 1357 | } 1358 | ], 1359 | "properties": { 1360 | "Node name for S&R": "Change Channel Count" 1361 | }, 1362 | "widgets_values": [ 1363 | "RGB" 1364 | ] 1365 | }, 1366 | { 1367 | "id": 44, 1368 | "type": "Input (API)", 1369 | "pos": [ 1370 | -1330, 1371 | 790 1372 | ], 1373 | "size": { 1374 | "0": 315, 1375 | "1": 106 1376 | }, 1377 | "flags": {}, 1378 | "order": 4, 1379 | "mode": 0, 1380 | "inputs": [ 1381 | { 1382 | "name": "default_input", 1383 | "type": "*", 1384 | "link": null 1385 | } 1386 | ], 1387 | "outputs": [ 1388 | { 1389 | "name": "*", 1390 | "type": "*", 1391 | "links": [ 1392 | 64 1393 | ], 1394 | "shape": 3, 1395 | "slot_index": 0 1396 | } 1397 | ], 1398 | "properties": { 1399 | "Node name for S&R": "Input (API)" 1400 | }, 1401 | "widgets_values": [ 1402 | "prompt", 1403 | "string", 1404 | "photo of a lighthouse during a storm, giant waves" 1405 | ] 1406 | }, 1407 | { 1408 | "id": 50, 1409 | "type": "Input (API)", 1410 | "pos": [ 1411 | -1330, 1412 | 950 1413 | ], 1414 | "size": { 1415 | "0": 315, 1416 | "1": 106 1417 | }, 1418 | "flags": {}, 1419 | "order": 5, 1420 | "mode": 0, 1421 | "inputs": [ 1422 | { 1423 | "name": "default_input", 1424 | "type": "*", 1425 | "link": null 1426 | } 1427 | ], 1428 | "outputs": [ 1429 | { 1430 | "name": "*", 1431 | "type": "*", 1432 | "links": [ 1433 | 72 1434 | ], 1435 | "shape": 3, 1436 | "slot_index": 0 1437 | } 1438 | ], 1439 | "properties": { 1440 | "Node name for S&R": "Input (API)" 1441 | }, 1442 | "widgets_values": [ 1443 | "negative_prompt", 1444 | "string", 1445 | "" 1446 | ] 1447 | }, 1448 | { 1449 | "id": 51, 1450 | "type": "Input (API)", 1451 | "pos": [ 1452 | -950, 1453 | 790 1454 | ], 1455 | "size": { 1456 | "0": 210, 1457 | "1": 106 1458 | }, 1459 | "flags": {}, 1460 | "order": 6, 1461 | "mode": 0, 1462 | "inputs": [ 1463 | { 1464 | "name": "default_input", 1465 | "type": "*", 1466 | "link": null 1467 | } 1468 | ], 1469 | "outputs": [ 1470 | { 1471 | "name": "*", 1472 | "type": "*", 1473 | "links": [ 1474 | 73, 1475 | 341 1476 | ], 1477 | "shape": 3, 1478 | "slot_index": 0 1479 | } 1480 | ], 1481 | "properties": { 1482 | "Node name for S&R": "Input (API)" 1483 | }, 1484 | "widgets_values": [ 1485 | "cfg_scale", 1486 | "float", 1487 | "8.0" 1488 | ] 1489 | }, 1490 | { 1491 | "id": 53, 1492 | "type": "Input (API)", 1493 | "pos": [ 1494 | -950, 1495 | 1100 1496 | ], 1497 | "size": { 1498 | "0": 210, 1499 | "1": 106 1500 | }, 1501 | "flags": {}, 1502 | "order": 24, 1503 | "mode": 0, 1504 | "inputs": [ 1505 | { 1506 | "name": "default_input", 1507 | "type": "*", 1508 | "link": 152 1509 | } 1510 | ], 1511 | "outputs": [ 1512 | { 1513 | "name": "*", 1514 | "type": "*", 1515 | "links": [ 1516 | 153 1517 | ], 1518 | "shape": 3, 1519 | "slot_index": 0 1520 | } 1521 | ], 1522 | "properties": { 1523 | "Node name for S&R": "Input (API)" 1524 | }, 1525 | "widgets_values": [ 1526 | "seed", 1527 | "integer", 1528 | "" 1529 | ] 1530 | }, 1531 | { 1532 | "id": 111, 1533 | "type": "Value Switch (API)", 1534 | "pos": [ 1535 | -670, 1536 | 1090 1537 | ], 1538 | "size": { 1539 | "0": 210, 1540 | "1": 126 1541 | }, 1542 | "flags": {}, 1543 | "order": 31, 1544 | "mode": 0, 1545 | "inputs": [ 1546 | { 1547 | "name": "on_not_equal", 1548 | "type": "*", 1549 | "link": 153 1550 | }, 1551 | { 1552 | "name": "on_equal", 1553 | "type": "*", 1554 | "link": 154 1555 | } 1556 | ], 1557 | "outputs": [ 1558 | { 1559 | "name": "*", 1560 | "type": "*", 1561 | "links": [ 1562 | 155, 1563 | 343 1564 | ], 1565 | "shape": 3, 1566 | "slot_index": 0 1567 | } 1568 | ], 1569 | "properties": { 1570 | "Node name for S&R": "Value Switch (API)" 1571 | }, 1572 | "widgets_values": [ 1573 | "seed", 1574 | "-1", 1575 | "" 1576 | ] 1577 | }, 1578 | { 1579 | "id": 56, 1580 | "type": "Input (API)", 1581 | "pos": [ 1582 | -1320, 1583 | 630 1584 | ], 1585 | "size": { 1586 | "0": 315, 1587 | "1": 106 1588 | }, 1589 | "flags": {}, 1590 | "order": 22, 1591 | "mode": 0, 1592 | "inputs": [ 1593 | { 1594 | "name": "default_input", 1595 | "type": "*", 1596 | "link": null 1597 | }, 1598 | { 1599 | "name": "default_string", 1600 | "type": "STRING", 1601 | "link": 300, 1602 | "widget": { 1603 | "name": "default_string", 1604 | "config": [ 1605 | "STRING", 1606 | { 1607 | "multiline": false 1608 | } 1609 | ] 1610 | } 1611 | } 1612 | ], 1613 | "outputs": [ 1614 | { 1615 | "name": "*", 1616 | "type": "*", 1617 | "links": [ 1618 | 79 1619 | ], 1620 | "shape": 3, 1621 | "slot_index": 0 1622 | } 1623 | ], 1624 | "properties": { 1625 | "Node name for S&R": "Input (API)" 1626 | }, 1627 | "widgets_values": [ 1628 | "override_settings.sd_model_checkpoint", 1629 | "string", 1630 | "reliberate_v10.safetensors" 1631 | ] 1632 | }, 1633 | { 1634 | "id": 63, 1635 | "type": "Constant Mask", 1636 | "pos": [ 1637 | -2346, 1638 | 1201 1639 | ], 1640 | "size": [ 1641 | 315, 1642 | 106 1643 | ], 1644 | "flags": {}, 1645 | "order": 26, 1646 | "mode": 0, 1647 | "inputs": [ 1648 | { 1649 | "name": "copy_image_size", 1650 | "type": "IMAGE", 1651 | "link": null 1652 | }, 1653 | { 1654 | "name": "explicit_width", 1655 | "type": "INT", 1656 | "link": 366, 1657 | "widget": { 1658 | "name": "explicit_width", 1659 | "config": [ 1660 | "INT", 1661 | { 1662 | "default": 0, 1663 | "min": 0, 1664 | "max": 1048576, 1665 | "step": 1 1666 | } 1667 | ] 1668 | } 1669 | }, 1670 | { 1671 | "name": "explicit_height", 1672 | "type": "INT", 1673 | "link": 367, 1674 | "widget": { 1675 | "name": "explicit_height", 1676 | "config": [ 1677 | "INT", 1678 | { 1679 | "default": 0, 1680 | "min": 0, 1681 | "max": 1048576, 1682 | "step": 1 1683 | } 1684 | ] 1685 | } 1686 | } 1687 | ], 1688 | "outputs": [ 1689 | { 1690 | "name": "IMAGE", 1691 | "type": "IMAGE", 1692 | "links": [ 1693 | 88, 1694 | 96, 1695 | 104 1696 | ], 1697 | "shape": 3, 1698 | "slot_index": 0 1699 | } 1700 | ], 1701 | "properties": { 1702 | "Node name for S&R": "Constant Mask" 1703 | }, 1704 | "widgets_values": [ 1705 | 0, 1706 | 512, 1707 | 512 1708 | ] 1709 | }, 1710 | { 1711 | "id": 152, 1712 | "type": "CheckpointLoaderSimple", 1713 | "pos": [ 1714 | -2469.52453125, 1715 | -429.0340405273437 1716 | ], 1717 | "size": { 1718 | "0": 315, 1719 | "1": 98 1720 | }, 1721 | "flags": {}, 1722 | "order": 7, 1723 | "mode": 0, 1724 | "outputs": [ 1725 | { 1726 | "name": "MODEL", 1727 | "type": "MODEL", 1728 | "links": null, 1729 | "shape": 3 1730 | }, 1731 | { 1732 | "name": "CLIP", 1733 | "type": "CLIP", 1734 | "links": null, 1735 | "shape": 3 1736 | }, 1737 | { 1738 | "name": "VAE", 1739 | "type": "VAE", 1740 | "links": null, 1741 | "shape": 3 1742 | } 1743 | ], 1744 | "properties": { 1745 | "Node name for S&R": "CheckpointLoaderSimple" 1746 | }, 1747 | "widgets_values": [ 1748 | "reliberate_v10.safetensors" 1749 | ] 1750 | }, 1751 | { 1752 | "id": 153, 1753 | "type": "PrimitiveNode", 1754 | "pos": [ 1755 | -2163, 1756 | 17 1757 | ], 1758 | "size": { 1759 | "0": 210, 1760 | "1": 58 1761 | }, 1762 | "flags": {}, 1763 | "order": 8, 1764 | "mode": 0, 1765 | "outputs": [ 1766 | { 1767 | "name": "STRING", 1768 | "type": "STRING", 1769 | "links": [ 1770 | 300 1771 | ], 1772 | "slot_index": 0, 1773 | "widget": { 1774 | "name": "default_string", 1775 | "config": [ 1776 | "STRING", 1777 | { 1778 | "multiline": false 1779 | } 1780 | ] 1781 | } 1782 | } 1783 | ], 1784 | "title": "Default Model", 1785 | "properties": {}, 1786 | "widgets_values": [ 1787 | "reliberate_v10.safetensors" 1788 | ] 1789 | }, 1790 | { 1791 | "id": 172, 1792 | "type": "EmptyLatentImage", 1793 | "pos": [ 1794 | 176, 1795 | 531 1796 | ], 1797 | "size": { 1798 | "0": 315, 1799 | "1": 106 1800 | }, 1801 | "flags": {}, 1802 | "order": 25, 1803 | "mode": 0, 1804 | "inputs": [ 1805 | { 1806 | "name": "width", 1807 | "type": "INT", 1808 | "link": 317, 1809 | "widget": { 1810 | "name": "width", 1811 | "config": [ 1812 | "INT", 1813 | { 1814 | "default": 512, 1815 | "min": 64, 1816 | "max": 8192, 1817 | "step": 8 1818 | } 1819 | ] 1820 | } 1821 | }, 1822 | { 1823 | "name": "height", 1824 | "type": "INT", 1825 | "link": 318, 1826 | "widget": { 1827 | "name": "height", 1828 | "config": [ 1829 | "INT", 1830 | { 1831 | "default": 512, 1832 | "min": 64, 1833 | "max": 8192, 1834 | "step": 8 1835 | } 1836 | ] 1837 | } 1838 | }, 1839 | { 1840 | "name": "batch_size", 1841 | "type": "INT", 1842 | "link": 319, 1843 | "widget": { 1844 | "name": "batch_size", 1845 | "config": [ 1846 | "INT", 1847 | { 1848 | "default": 1, 1849 | "min": 1, 1850 | "max": 64 1851 | } 1852 | ] 1853 | } 1854 | } 1855 | ], 1856 | "outputs": [ 1857 | { 1858 | "name": "LATENT", 1859 | "type": "LATENT", 1860 | "links": [ 1861 | 320 1862 | ], 1863 | "shape": 3, 1864 | "slot_index": 0 1865 | } 1866 | ], 1867 | "properties": { 1868 | "Node name for S&R": "EmptyLatentImage" 1869 | }, 1870 | "widgets_values": [ 1871 | 512, 1872 | 512, 1873 | 1 1874 | ] 1875 | }, 1876 | { 1877 | "id": 175, 1878 | "type": "Reroute", 1879 | "pos": [ 1880 | 2148, 1881 | 1009 1882 | ], 1883 | "size": [ 1884 | 75, 1885 | 26 1886 | ], 1887 | "flags": {}, 1888 | "order": 61, 1889 | "mode": 0, 1890 | "inputs": [ 1891 | { 1892 | "name": "", 1893 | "type": "*", 1894 | "link": 364 1895 | } 1896 | ], 1897 | "outputs": [ 1898 | { 1899 | "name": "", 1900 | "type": "*", 1901 | "links": [ 1902 | 323, 1903 | 324, 1904 | 325 1905 | ], 1906 | "slot_index": 0 1907 | } 1908 | ], 1909 | "properties": { 1910 | "showOutputText": false, 1911 | "horizontal": false 1912 | } 1913 | }, 1914 | { 1915 | "id": 35, 1916 | "type": "KSampler", 1917 | "pos": [ 1918 | 811, 1919 | 551 1920 | ], 1921 | "size": { 1922 | "0": 315, 1923 | "1": 474 1924 | }, 1925 | "flags": {}, 1926 | "order": 46, 1927 | "mode": 0, 1928 | "inputs": [ 1929 | { 1930 | "name": "model", 1931 | "type": "MODEL", 1932 | "link": 43 1933 | }, 1934 | { 1935 | "name": "positive", 1936 | "type": "CONDITIONING", 1937 | "link": 109 1938 | }, 1939 | { 1940 | "name": "negative", 1941 | "type": "CONDITIONING", 1942 | "link": 45 1943 | }, 1944 | { 1945 | "name": "latent_image", 1946 | "type": "LATENT", 1947 | "link": 320 1948 | }, 1949 | { 1950 | "name": "cfg", 1951 | "type": "FLOAT", 1952 | "link": 73, 1953 | "widget": { 1954 | "name": "cfg", 1955 | "config": [ 1956 | "FLOAT", 1957 | { 1958 | "default": 8, 1959 | "min": 0, 1960 | "max": 100 1961 | } 1962 | ] 1963 | } 1964 | }, 1965 | { 1966 | "name": "steps", 1967 | "type": "INT", 1968 | "link": 74, 1969 | "widget": { 1970 | "name": "steps", 1971 | "config": [ 1972 | "INT", 1973 | { 1974 | "default": 20, 1975 | "min": 1, 1976 | "max": 10000 1977 | } 1978 | ] 1979 | } 1980 | }, 1981 | { 1982 | "name": "seed", 1983 | "type": "INT", 1984 | "link": 155, 1985 | "widget": { 1986 | "name": "seed", 1987 | "config": [ 1988 | "INT", 1989 | { 1990 | "default": 0, 1991 | "min": 0, 1992 | "max": 18446744073709552000 1993 | } 1994 | ] 1995 | } 1996 | } 1997 | ], 1998 | "outputs": [ 1999 | { 2000 | "name": "LATENT", 2001 | "type": "LATENT", 2002 | "links": [ 2003 | 49 2004 | ], 2005 | "shape": 3, 2006 | "slot_index": 0 2007 | } 2008 | ], 2009 | "properties": { 2010 | "Node name for S&R": "KSampler" 2011 | }, 2012 | "widgets_values": [ 2013 | 0, 2014 | "fixed", 2015 | 36, 2016 | 8, 2017 | "dpmpp_2m", 2018 | "karras", 2019 | 1 2020 | ] 2021 | }, 2022 | { 2023 | "id": 186, 2024 | "type": "VAEEncode", 2025 | "pos": [ 2026 | 2307.10258553125, 2027 | -64.02782101562505 2028 | ], 2029 | "size": { 2030 | "0": 210, 2031 | "1": 46 2032 | }, 2033 | "flags": {}, 2034 | "order": 51, 2035 | "mode": 0, 2036 | "inputs": [ 2037 | { 2038 | "name": "pixels", 2039 | "type": "IMAGE", 2040 | "link": 335 2041 | }, 2042 | { 2043 | "name": "vae", 2044 | "type": "VAE", 2045 | "link": 336 2046 | } 2047 | ], 2048 | "outputs": [ 2049 | { 2050 | "name": "LATENT", 2051 | "type": "LATENT", 2052 | "links": [ 2053 | 344 2054 | ], 2055 | "shape": 3, 2056 | "slot_index": 0 2057 | } 2058 | ], 2059 | "properties": { 2060 | "Node name for S&R": "VAEEncode" 2061 | } 2062 | }, 2063 | { 2064 | "id": 52, 2065 | "type": "Input (API)", 2066 | "pos": [ 2067 | -950, 2068 | 940 2069 | ], 2070 | "size": { 2071 | "0": 210, 2072 | "1": 106 2073 | }, 2074 | "flags": {}, 2075 | "order": 9, 2076 | "mode": 0, 2077 | "inputs": [ 2078 | { 2079 | "name": "default_input", 2080 | "type": "*", 2081 | "link": null 2082 | } 2083 | ], 2084 | "outputs": [ 2085 | { 2086 | "name": "*", 2087 | "type": "*", 2088 | "links": [ 2089 | 74, 2090 | 346 2091 | ], 2092 | "shape": 3, 2093 | "slot_index": 0 2094 | } 2095 | ], 2096 | "properties": { 2097 | "Node name for S&R": "Input (API)" 2098 | }, 2099 | "widgets_values": [ 2100 | "steps", 2101 | "integer", 2102 | "36" 2103 | ] 2104 | }, 2105 | { 2106 | "id": 188, 2107 | "type": "KSampler", 2108 | "pos": [ 2109 | 2650.10258553125, 2110 | -388.0278210156251 2111 | ], 2112 | "size": { 2113 | "0": 315, 2114 | "1": 474 2115 | }, 2116 | "flags": {}, 2117 | "order": 52, 2118 | "mode": 0, 2119 | "inputs": [ 2120 | { 2121 | "name": "model", 2122 | "type": "MODEL", 2123 | "link": 337 2124 | }, 2125 | { 2126 | "name": "positive", 2127 | "type": "CONDITIONING", 2128 | "link": 338 2129 | }, 2130 | { 2131 | "name": "negative", 2132 | "type": "CONDITIONING", 2133 | "link": 339 2134 | }, 2135 | { 2136 | "name": "latent_image", 2137 | "type": "LATENT", 2138 | "link": 344 2139 | }, 2140 | { 2141 | "name": "cfg", 2142 | "type": "FLOAT", 2143 | "link": 341, 2144 | "widget": { 2145 | "name": "cfg", 2146 | "config": [ 2147 | "FLOAT", 2148 | { 2149 | "default": 8, 2150 | "min": 0, 2151 | "max": 100 2152 | } 2153 | ] 2154 | } 2155 | }, 2156 | { 2157 | "name": "steps", 2158 | "type": "INT", 2159 | "link": 347, 2160 | "widget": { 2161 | "name": "steps", 2162 | "config": [ 2163 | "INT", 2164 | { 2165 | "default": 20, 2166 | "min": 1, 2167 | "max": 10000 2168 | } 2169 | ] 2170 | } 2171 | }, 2172 | { 2173 | "name": "seed", 2174 | "type": "INT", 2175 | "link": 343, 2176 | "widget": { 2177 | "name": "seed", 2178 | "config": [ 2179 | "INT", 2180 | { 2181 | "default": 0, 2182 | "min": 0, 2183 | "max": 18446744073709552000 2184 | } 2185 | ] 2186 | } 2187 | }, 2188 | { 2189 | "name": "denoise", 2190 | "type": "FLOAT", 2191 | "link": 345, 2192 | "widget": { 2193 | "name": "denoise", 2194 | "config": [ 2195 | "FLOAT", 2196 | { 2197 | "default": 1, 2198 | "min": 0, 2199 | "max": 1, 2200 | "step": 0.01 2201 | } 2202 | ] 2203 | } 2204 | } 2205 | ], 2206 | "outputs": [ 2207 | { 2208 | "name": "LATENT", 2209 | "type": "LATENT", 2210 | "links": [ 2211 | 348 2212 | ], 2213 | "shape": 3, 2214 | "slot_index": 0 2215 | } 2216 | ], 2217 | "properties": { 2218 | "Node name for S&R": "KSampler" 2219 | }, 2220 | "widgets_values": [ 2221 | 0, 2222 | "fixed", 2223 | 36, 2224 | 8, 2225 | "dpmpp_2m", 2226 | "karras", 2227 | 1 2228 | ] 2229 | }, 2230 | { 2231 | "id": 31, 2232 | "type": "CheckpointLoaderSimple", 2233 | "pos": [ 2234 | -354, 2235 | 502 2236 | ], 2237 | "size": { 2238 | "0": 315, 2239 | "1": 98 2240 | }, 2241 | "flags": {}, 2242 | "order": 30, 2243 | "mode": 0, 2244 | "inputs": [ 2245 | { 2246 | "name": "ckpt_name", 2247 | "type": "reliberate_v10.safetensors,v1-5-pruned-emaonly.ckpt", 2248 | "link": 79, 2249 | "widget": { 2250 | "name": "ckpt_name", 2251 | "config": [ 2252 | [ 2253 | "reliberate_v10.safetensors", 2254 | "v1-5-pruned-emaonly.ckpt" 2255 | ] 2256 | ] 2257 | } 2258 | } 2259 | ], 2260 | "outputs": [ 2261 | { 2262 | "name": "MODEL", 2263 | "type": "MODEL", 2264 | "links": [ 2265 | 43, 2266 | 337 2267 | ], 2268 | "shape": 3, 2269 | "slot_index": 0 2270 | }, 2271 | { 2272 | "name": "CLIP", 2273 | "type": "CLIP", 2274 | "links": [ 2275 | 41, 2276 | 42 2277 | ], 2278 | "shape": 3, 2279 | "slot_index": 1 2280 | }, 2281 | { 2282 | "name": "VAE", 2283 | "type": "VAE", 2284 | "links": [ 2285 | 50, 2286 | 336, 2287 | 349 2288 | ], 2289 | "shape": 3, 2290 | "slot_index": 2 2291 | } 2292 | ], 2293 | "properties": { 2294 | "Node name for S&R": "CheckpointLoaderSimple" 2295 | }, 2296 | "widgets_values": [ 2297 | "cineDiffusion_v3.safetensors" 2298 | ] 2299 | }, 2300 | { 2301 | "id": 191, 2302 | "type": "VAEDecode", 2303 | "pos": [ 2304 | 3254.252243734375, 2305 | -212.21960568359376 2306 | ], 2307 | "size": { 2308 | "0": 210, 2309 | "1": 46 2310 | }, 2311 | "flags": {}, 2312 | "order": 53, 2313 | "mode": 0, 2314 | "inputs": [ 2315 | { 2316 | "name": "samples", 2317 | "type": "LATENT", 2318 | "link": 348 2319 | }, 2320 | { 2321 | "name": "vae", 2322 | "type": "VAE", 2323 | "link": 349 2324 | } 2325 | ], 2326 | "outputs": [ 2327 | { 2328 | "name": "IMAGE", 2329 | "type": "IMAGE", 2330 | "links": [ 2331 | 350 2332 | ], 2333 | "shape": 3, 2334 | "slot_index": 0 2335 | } 2336 | ], 2337 | "properties": { 2338 | "Node name for S&R": "VAEDecode" 2339 | } 2340 | }, 2341 | { 2342 | "id": 110, 2343 | "type": "Random Seed (API)", 2344 | "pos": [ 2345 | -1260, 2346 | 1140 2347 | ], 2348 | "size": { 2349 | "0": 210, 2350 | "1": 82 2351 | }, 2352 | "flags": {}, 2353 | "order": 10, 2354 | "mode": 0, 2355 | "outputs": [ 2356 | { 2357 | "name": "INT", 2358 | "type": "INT", 2359 | "links": [ 2360 | 152, 2361 | 154 2362 | ], 2363 | "shape": 3, 2364 | "slot_index": 0 2365 | } 2366 | ], 2367 | "properties": { 2368 | "Node name for S&R": "Random Seed (API)" 2369 | }, 2370 | "widgets_values": [ 2371 | 225, 2372 | "fixed" 2373 | ] 2374 | }, 2375 | { 2376 | "id": 37, 2377 | "type": "VAEDecode", 2378 | "pos": [ 2379 | 1193, 2380 | 593 2381 | ], 2382 | "size": { 2383 | "0": 210, 2384 | "1": 46 2385 | }, 2386 | "flags": {}, 2387 | "order": 47, 2388 | "mode": 0, 2389 | "inputs": [ 2390 | { 2391 | "name": "samples", 2392 | "type": "LATENT", 2393 | "link": 49 2394 | }, 2395 | { 2396 | "name": "vae", 2397 | "type": "VAE", 2398 | "link": 50 2399 | } 2400 | ], 2401 | "outputs": [ 2402 | { 2403 | "name": "IMAGE", 2404 | "type": "IMAGE", 2405 | "links": [ 2406 | 321, 2407 | 326, 2408 | 327 2409 | ], 2410 | "shape": 3, 2411 | "slot_index": 0 2412 | } 2413 | ], 2414 | "properties": { 2415 | "Node name for S&R": "VAEDecode" 2416 | } 2417 | }, 2418 | { 2419 | "id": 184, 2420 | "type": "Switch (API)", 2421 | "pos": [ 2422 | 1899.1025855312503, 2423 | -66.02782101562505 2424 | ], 2425 | "size": { 2426 | "0": 315, 2427 | "1": 102 2428 | }, 2429 | "flags": {}, 2430 | "order": 50, 2431 | "mode": 0, 2432 | "inputs": [ 2433 | { 2434 | "name": "on_false", 2435 | "type": "*", 2436 | "link": 334 2437 | }, 2438 | { 2439 | "name": "on_true", 2440 | "type": "*", 2441 | "link": 333 2442 | } 2443 | ], 2444 | "outputs": [ 2445 | { 2446 | "name": "*", 2447 | "type": "*", 2448 | "links": [ 2449 | 335 2450 | ], 2451 | "shape": 3, 2452 | "slot_index": 0 2453 | } 2454 | ], 2455 | "properties": { 2456 | "Node name for S&R": "Switch (API)" 2457 | }, 2458 | "widgets_values": [ 2459 | "hr_resize_x", 2460 | false 2461 | ] 2462 | }, 2463 | { 2464 | "id": 180, 2465 | "type": "Input (API)", 2466 | "pos": [ 2467 | -1450, 2468 | 80 2469 | ], 2470 | "size": { 2471 | "0": 315, 2472 | "1": 106 2473 | }, 2474 | "flags": {}, 2475 | "order": 11, 2476 | "mode": 0, 2477 | "inputs": [ 2478 | { 2479 | "name": "default_input", 2480 | "type": "*", 2481 | "link": null 2482 | } 2483 | ], 2484 | "outputs": [ 2485 | { 2486 | "name": "*", 2487 | "type": "*", 2488 | "links": [ 2489 | 328 2490 | ], 2491 | "shape": 3, 2492 | "slot_index": 0 2493 | } 2494 | ], 2495 | "properties": { 2496 | "Node name for S&R": "Input (API)" 2497 | }, 2498 | "widgets_values": [ 2499 | "hr_scale", 2500 | "float", 2501 | "2" 2502 | ] 2503 | }, 2504 | { 2505 | "id": 182, 2506 | "type": "Input (API)", 2507 | "pos": [ 2508 | -1440, 2509 | 240 2510 | ], 2511 | "size": { 2512 | "0": 315, 2513 | "1": 106 2514 | }, 2515 | "flags": {}, 2516 | "order": 12, 2517 | "mode": 0, 2518 | "inputs": [ 2519 | { 2520 | "name": "default_input", 2521 | "type": "*", 2522 | "link": null 2523 | } 2524 | ], 2525 | "outputs": [ 2526 | { 2527 | "name": "*", 2528 | "type": "*", 2529 | "links": [ 2530 | 329 2531 | ], 2532 | "shape": 3, 2533 | "slot_index": 0 2534 | } 2535 | ], 2536 | "properties": { 2537 | "Node name for S&R": "Input (API)" 2538 | }, 2539 | "widgets_values": [ 2540 | "hr_resize_x", 2541 | "integer", 2542 | "1024" 2543 | ] 2544 | }, 2545 | { 2546 | "id": 183, 2547 | "type": "Input (API)", 2548 | "pos": [ 2549 | -1420, 2550 | 400 2551 | ], 2552 | "size": { 2553 | "0": 315, 2554 | "1": 106 2555 | }, 2556 | "flags": {}, 2557 | "order": 13, 2558 | "mode": 0, 2559 | "inputs": [ 2560 | { 2561 | "name": "default_input", 2562 | "type": "*", 2563 | "link": null 2564 | } 2565 | ], 2566 | "outputs": [ 2567 | { 2568 | "name": "*", 2569 | "type": "*", 2570 | "links": [ 2571 | 330 2572 | ], 2573 | "shape": 3, 2574 | "slot_index": 0 2575 | } 2576 | ], 2577 | "properties": { 2578 | "Node name for S&R": "Input (API)" 2579 | }, 2580 | "widgets_values": [ 2581 | "hr_resize_y", 2582 | "integer", 2583 | "1024" 2584 | ] 2585 | }, 2586 | { 2587 | "id": 173, 2588 | "type": "Input (API)", 2589 | "pos": [ 2590 | -660, 2591 | 440 2592 | ], 2593 | "size": { 2594 | "0": 210, 2595 | "1": 106 2596 | }, 2597 | "flags": {}, 2598 | "order": 14, 2599 | "mode": 0, 2600 | "inputs": [ 2601 | { 2602 | "name": "default_input", 2603 | "type": "*", 2604 | "link": null 2605 | } 2606 | ], 2607 | "outputs": [ 2608 | { 2609 | "name": "*", 2610 | "type": "*", 2611 | "links": [ 2612 | 319 2613 | ], 2614 | "shape": 3, 2615 | "slot_index": 0 2616 | } 2617 | ], 2618 | "properties": { 2619 | "Node name for S&R": "Input (API)" 2620 | }, 2621 | "widgets_values": [ 2622 | "batch_size", 2623 | "integer", 2624 | "1" 2625 | ] 2626 | }, 2627 | { 2628 | "id": 190, 2629 | "type": "Input (API)", 2630 | "pos": [ 2631 | -1385, 2632 | -90 2633 | ], 2634 | "size": { 2635 | "0": 221.1334686279297, 2636 | "1": 106 2637 | }, 2638 | "flags": {}, 2639 | "order": 23, 2640 | "mode": 0, 2641 | "inputs": [ 2642 | { 2643 | "name": "default_input", 2644 | "type": "*", 2645 | "link": 346 2646 | } 2647 | ], 2648 | "outputs": [ 2649 | { 2650 | "name": "*", 2651 | "type": "*", 2652 | "links": [ 2653 | 347 2654 | ], 2655 | "shape": 3, 2656 | "slot_index": 0 2657 | } 2658 | ], 2659 | "properties": { 2660 | "Node name for S&R": "Input (API)" 2661 | }, 2662 | "widgets_values": [ 2663 | "hr_second_pass_steps", 2664 | "integer", 2665 | "" 2666 | ] 2667 | }, 2668 | { 2669 | "id": 179, 2670 | "type": "ImageScaleBy", 2671 | "pos": [ 2672 | 1492.1025855312503, 2673 | -216.02782101562508 2674 | ], 2675 | "size": { 2676 | "0": 315, 2677 | "1": 82 2678 | }, 2679 | "flags": {}, 2680 | "order": 49, 2681 | "mode": 0, 2682 | "inputs": [ 2683 | { 2684 | "name": "image", 2685 | "type": "IMAGE", 2686 | "link": 327 2687 | }, 2688 | { 2689 | "name": "scale_by", 2690 | "type": "FLOAT", 2691 | "link": 328, 2692 | "widget": { 2693 | "name": "scale_by", 2694 | "config": [ 2695 | "FLOAT", 2696 | { 2697 | "default": 1, 2698 | "min": 0.01, 2699 | "max": 8, 2700 | "step": 0.01 2701 | } 2702 | ] 2703 | } 2704 | } 2705 | ], 2706 | "outputs": [ 2707 | { 2708 | "name": "IMAGE", 2709 | "type": "IMAGE", 2710 | "links": [ 2711 | 334 2712 | ], 2713 | "shape": 3, 2714 | "slot_index": 0 2715 | } 2716 | ], 2717 | "properties": { 2718 | "Node name for S&R": "ImageScaleBy" 2719 | }, 2720 | "widgets_values": [ 2721 | "bilinear", 2722 | 1 2723 | ] 2724 | }, 2725 | { 2726 | "id": 178, 2727 | "type": "ImageScale", 2728 | "pos": [ 2729 | 1483.1025855312503, 2730 | -40.02782101562505 2731 | ], 2732 | "size": { 2733 | "0": 315, 2734 | "1": 130 2735 | }, 2736 | "flags": {}, 2737 | "order": 48, 2738 | "mode": 0, 2739 | "inputs": [ 2740 | { 2741 | "name": "image", 2742 | "type": "IMAGE", 2743 | "link": 326 2744 | }, 2745 | { 2746 | "name": "width", 2747 | "type": "INT", 2748 | "link": 329, 2749 | "widget": { 2750 | "name": "width", 2751 | "config": [ 2752 | "INT", 2753 | { 2754 | "default": 512, 2755 | "min": 1, 2756 | "max": 8192, 2757 | "step": 1 2758 | } 2759 | ] 2760 | } 2761 | }, 2762 | { 2763 | "name": "height", 2764 | "type": "INT", 2765 | "link": 330, 2766 | "widget": { 2767 | "name": "height", 2768 | "config": [ 2769 | "INT", 2770 | { 2771 | "default": 512, 2772 | "min": 1, 2773 | "max": 8192, 2774 | "step": 1 2775 | } 2776 | ] 2777 | } 2778 | } 2779 | ], 2780 | "outputs": [ 2781 | { 2782 | "name": "IMAGE", 2783 | "type": "IMAGE", 2784 | "links": [ 2785 | 333 2786 | ], 2787 | "shape": 3, 2788 | "slot_index": 0 2789 | } 2790 | ], 2791 | "properties": { 2792 | "Node name for S&R": "ImageScale" 2793 | }, 2794 | "widgets_values": [ 2795 | "bilinear", 2796 | 512, 2797 | 512, 2798 | "disabled" 2799 | ] 2800 | }, 2801 | { 2802 | "id": 189, 2803 | "type": "Input (API)", 2804 | "pos": [ 2805 | -1114, 2806 | -84 2807 | ], 2808 | "size": { 2809 | "0": 315, 2810 | "1": 106 2811 | }, 2812 | "flags": {}, 2813 | "order": 15, 2814 | "mode": 0, 2815 | "inputs": [ 2816 | { 2817 | "name": "default_input", 2818 | "type": "*", 2819 | "link": null 2820 | } 2821 | ], 2822 | "outputs": [ 2823 | { 2824 | "name": "*", 2825 | "type": "*", 2826 | "links": [ 2827 | 345 2828 | ], 2829 | "shape": 3, 2830 | "slot_index": 0 2831 | } 2832 | ], 2833 | "properties": { 2834 | "Node name for S&R": "Input (API)" 2835 | }, 2836 | "widgets_values": [ 2837 | "denoising_strength", 2838 | "float", 2839 | "0.7" 2840 | ] 2841 | }, 2842 | { 2843 | "id": 198, 2844 | "type": "Make Image Batch", 2845 | "pos": [ 2846 | 990, 2847 | 2880 2848 | ], 2849 | "size": { 2850 | "0": 210, 2851 | "1": 126 2852 | }, 2853 | "flags": {}, 2854 | "order": 59, 2855 | "mode": 0, 2856 | "inputs": [ 2857 | { 2858 | "name": "image1", 2859 | "type": "IMAGE", 2860 | "link": 359 2861 | }, 2862 | { 2863 | "name": "image2", 2864 | "type": "IMAGE", 2865 | "link": 360 2866 | }, 2867 | { 2868 | "name": "image3", 2869 | "type": "IMAGE", 2870 | "link": null 2871 | }, 2872 | { 2873 | "name": "image4", 2874 | "type": "IMAGE", 2875 | "link": null 2876 | }, 2877 | { 2878 | "name": "image5", 2879 | "type": "IMAGE", 2880 | "link": null 2881 | }, 2882 | { 2883 | "name": "image6", 2884 | "type": "IMAGE", 2885 | "link": null 2886 | } 2887 | ], 2888 | "outputs": [ 2889 | { 2890 | "name": "IMAGE", 2891 | "type": "IMAGE", 2892 | "links": [ 2893 | 362 2894 | ], 2895 | "shape": 3, 2896 | "slot_index": 0 2897 | } 2898 | ], 2899 | "properties": { 2900 | "Node name for S&R": "Make Image Batch" 2901 | } 2902 | }, 2903 | { 2904 | "id": 197, 2905 | "type": "Make Image Batch", 2906 | "pos": [ 2907 | 1010, 2908 | 2320 2909 | ], 2910 | "size": { 2911 | "0": 210, 2912 | "1": 126 2913 | }, 2914 | "flags": {}, 2915 | "order": 57, 2916 | "mode": 0, 2917 | "inputs": [ 2918 | { 2919 | "name": "image1", 2920 | "type": "IMAGE", 2921 | "link": 357 2922 | }, 2923 | { 2924 | "name": "image2", 2925 | "type": "IMAGE", 2926 | "link": 358 2927 | }, 2928 | { 2929 | "name": "image3", 2930 | "type": "IMAGE", 2931 | "link": null 2932 | }, 2933 | { 2934 | "name": "image4", 2935 | "type": "IMAGE", 2936 | "link": null 2937 | }, 2938 | { 2939 | "name": "image5", 2940 | "type": "IMAGE", 2941 | "link": null 2942 | }, 2943 | { 2944 | "name": "image6", 2945 | "type": "IMAGE", 2946 | "link": null 2947 | } 2948 | ], 2949 | "outputs": [ 2950 | { 2951 | "name": "IMAGE", 2952 | "type": "IMAGE", 2953 | "links": [ 2954 | 356 2955 | ], 2956 | "shape": 3, 2957 | "slot_index": 0 2958 | } 2959 | ], 2960 | "properties": { 2961 | "Node name for S&R": "Make Image Batch" 2962 | } 2963 | }, 2964 | { 2965 | "id": 196, 2966 | "type": "Switch (API)", 2967 | "pos": [ 2968 | 1370, 2969 | 2220 2970 | ], 2971 | "size": { 2972 | "0": 285, 2973 | "1": 102 2974 | }, 2975 | "flags": {}, 2976 | "order": 58, 2977 | "mode": 0, 2978 | "inputs": [ 2979 | { 2980 | "name": "on_false", 2981 | "type": "*", 2982 | "link": 355 2983 | }, 2984 | { 2985 | "name": "on_true", 2986 | "type": "*", 2987 | "link": 356 2988 | } 2989 | ], 2990 | "outputs": [ 2991 | { 2992 | "name": "*", 2993 | "type": "*", 2994 | "links": [ 2995 | 359, 2996 | 361 2997 | ], 2998 | "shape": 3, 2999 | "slot_index": 0 3000 | } 3001 | ], 3002 | "properties": { 3003 | "Node name for S&R": "Switch (API)" 3004 | }, 3005 | "widgets_values": [ 3006 | "alwayson_scripts.controlnet.args[1]", 3007 | false 3008 | ] 3009 | }, 3010 | { 3011 | "id": 193, 3012 | "type": "Make Image Batch", 3013 | "pos": [ 3014 | 1050, 3015 | 1750 3016 | ], 3017 | "size": { 3018 | "0": 210, 3019 | "1": 126 3020 | }, 3021 | "flags": {}, 3022 | "order": 55, 3023 | "mode": 0, 3024 | "inputs": [ 3025 | { 3026 | "name": "image1", 3027 | "type": "IMAGE", 3028 | "link": 365 3029 | }, 3030 | { 3031 | "name": "image2", 3032 | "type": "IMAGE", 3033 | "link": 352 3034 | }, 3035 | { 3036 | "name": "image3", 3037 | "type": "IMAGE", 3038 | "link": null 3039 | }, 3040 | { 3041 | "name": "image4", 3042 | "type": "IMAGE", 3043 | "link": null 3044 | }, 3045 | { 3046 | "name": "image5", 3047 | "type": "IMAGE", 3048 | "link": null 3049 | }, 3050 | { 3051 | "name": "image6", 3052 | "type": "IMAGE", 3053 | "link": null 3054 | } 3055 | ], 3056 | "outputs": [ 3057 | { 3058 | "name": "IMAGE", 3059 | "type": "IMAGE", 3060 | "links": [ 3061 | 354 3062 | ], 3063 | "shape": 3, 3064 | "slot_index": 0 3065 | } 3066 | ], 3067 | "properties": { 3068 | "Node name for S&R": "Make Image Batch" 3069 | } 3070 | }, 3071 | { 3072 | "id": 194, 3073 | "type": "Switch (API)", 3074 | "pos": [ 3075 | 1420, 3076 | 1620 3077 | ], 3078 | "size": { 3079 | "0": 285, 3080 | "1": 102 3081 | }, 3082 | "flags": {}, 3083 | "order": 56, 3084 | "mode": 0, 3085 | "inputs": [ 3086 | { 3087 | "name": "on_false", 3088 | "type": "*", 3089 | "link": 363 3090 | }, 3091 | { 3092 | "name": "on_true", 3093 | "type": "*", 3094 | "link": 354 3095 | } 3096 | ], 3097 | "outputs": [ 3098 | { 3099 | "name": "*", 3100 | "type": "*", 3101 | "links": [ 3102 | 355, 3103 | 357 3104 | ], 3105 | "shape": 3, 3106 | "slot_index": 0 3107 | } 3108 | ], 3109 | "properties": { 3110 | "Node name for S&R": "Switch (API)" 3111 | }, 3112 | "widgets_values": [ 3113 | "alwayson_scripts.controlnet.args[0]", 3114 | false 3115 | ] 3116 | }, 3117 | { 3118 | "id": 195, 3119 | "type": "Note", 3120 | "pos": [ 3121 | 1040, 3122 | 1590 3123 | ], 3124 | "size": { 3125 | "0": 210, 3126 | "1": 90.90908813476562 3127 | }, 3128 | "flags": {}, 3129 | "order": 16, 3130 | "mode": 0, 3131 | "properties": { 3132 | "text": "" 3133 | }, 3134 | "widgets_values": [ 3135 | "For some reason, automatic1111 returns the depth map (or other controlnet inputs) with the results" 3136 | ], 3137 | "color": "#432", 3138 | "bgcolor": "#653" 3139 | }, 3140 | { 3141 | "id": 199, 3142 | "type": "Switch (API)", 3143 | "pos": [ 3144 | 1380, 3145 | 2780 3146 | ], 3147 | "size": { 3148 | "0": 285, 3149 | "1": 102 3150 | }, 3151 | "flags": {}, 3152 | "order": 60, 3153 | "mode": 0, 3154 | "inputs": [ 3155 | { 3156 | "name": "on_false", 3157 | "type": "*", 3158 | "link": 361 3159 | }, 3160 | { 3161 | "name": "on_true", 3162 | "type": "*", 3163 | "link": 362 3164 | } 3165 | ], 3166 | "outputs": [ 3167 | { 3168 | "name": "*", 3169 | "type": "*", 3170 | "links": [ 3171 | 364 3172 | ], 3173 | "shape": 3, 3174 | "slot_index": 0 3175 | } 3176 | ], 3177 | "properties": { 3178 | "Node name for S&R": "Switch (API)" 3179 | }, 3180 | "widgets_values": [ 3181 | "alwayson_scripts.controlnet.args[2]", 3182 | false 3183 | ] 3184 | }, 3185 | { 3186 | "id": 174, 3187 | "type": "Switch (API)", 3188 | "pos": [ 3189 | 1621, 3190 | 884 3191 | ], 3192 | "size": { 3193 | "0": 315, 3194 | "1": 102 3195 | }, 3196 | "flags": {}, 3197 | "order": 54, 3198 | "mode": 0, 3199 | "inputs": [ 3200 | { 3201 | "name": "on_false", 3202 | "type": "*", 3203 | "link": 321 3204 | }, 3205 | { 3206 | "name": "on_true", 3207 | "type": "*", 3208 | "link": 350 3209 | } 3210 | ], 3211 | "outputs": [ 3212 | { 3213 | "name": "*", 3214 | "type": "*", 3215 | "links": [ 3216 | 363, 3217 | 365 3218 | ], 3219 | "shape": 3, 3220 | "slot_index": 0 3221 | } 3222 | ], 3223 | "properties": { 3224 | "Node name for S&R": "Switch (API)" 3225 | }, 3226 | "widgets_values": [ 3227 | "enable_hr", 3228 | false 3229 | ] 3230 | }, 3231 | { 3232 | "id": 115, 3233 | "type": "Input (API)", 3234 | "pos": [ 3235 | -666, 3236 | 102 3237 | ], 3238 | "size": { 3239 | "0": 210, 3240 | "1": 106 3241 | }, 3242 | "flags": {}, 3243 | "order": 17, 3244 | "mode": 0, 3245 | "inputs": [ 3246 | { 3247 | "name": "default_input", 3248 | "type": "*", 3249 | "link": null 3250 | } 3251 | ], 3252 | "outputs": [ 3253 | { 3254 | "name": "*", 3255 | "type": "*", 3256 | "links": [ 3257 | 317, 3258 | 366 3259 | ], 3260 | "shape": 3, 3261 | "slot_index": 0 3262 | } 3263 | ], 3264 | "properties": { 3265 | "Node name for S&R": "Input (API)" 3266 | }, 3267 | "widgets_values": [ 3268 | "width", 3269 | "integer", 3270 | "512" 3271 | ] 3272 | }, 3273 | { 3274 | "id": 118, 3275 | "type": "Input (API)", 3276 | "pos": [ 3277 | -650, 3278 | 280 3279 | ], 3280 | "size": { 3281 | "0": 210, 3282 | "1": 106 3283 | }, 3284 | "flags": {}, 3285 | "order": 18, 3286 | "mode": 0, 3287 | "inputs": [ 3288 | { 3289 | "name": "default_input", 3290 | "type": "*", 3291 | "link": null 3292 | } 3293 | ], 3294 | "outputs": [ 3295 | { 3296 | "name": "*", 3297 | "type": "*", 3298 | "links": [ 3299 | 318, 3300 | 367 3301 | ], 3302 | "shape": 3, 3303 | "slot_index": 0 3304 | } 3305 | ], 3306 | "properties": { 3307 | "Node name for S&R": "Input (API)" 3308 | }, 3309 | "widgets_values": [ 3310 | "height", 3311 | "integer", 3312 | "512" 3313 | ] 3314 | } 3315 | ], 3316 | "links": [ 3317 | [ 3318 | 41, 3319 | 31, 3320 | 1, 3321 | 32, 3322 | 0, 3323 | "CLIP" 3324 | ], 3325 | [ 3326 | 42, 3327 | 31, 3328 | 1, 3329 | 34, 3330 | 0, 3331 | "CLIP" 3332 | ], 3333 | [ 3334 | 43, 3335 | 31, 3336 | 0, 3337 | 35, 3338 | 0, 3339 | "MODEL" 3340 | ], 3341 | [ 3342 | 45, 3343 | 34, 3344 | 0, 3345 | 35, 3346 | 2, 3347 | "CONDITIONING" 3348 | ], 3349 | [ 3350 | 49, 3351 | 35, 3352 | 0, 3353 | 37, 3354 | 0, 3355 | "LATENT" 3356 | ], 3357 | [ 3358 | 50, 3359 | 31, 3360 | 2, 3361 | 37, 3362 | 1, 3363 | "VAE" 3364 | ], 3365 | [ 3366 | 64, 3367 | 44, 3368 | 0, 3369 | 32, 3370 | 1, 3371 | "STRING" 3372 | ], 3373 | [ 3374 | 71, 3375 | 48, 3376 | 0, 3377 | 13, 3378 | 0, 3379 | "JSON_OBJECT" 3380 | ], 3381 | [ 3382 | 72, 3383 | 50, 3384 | 0, 3385 | 34, 3386 | 1, 3387 | "STRING" 3388 | ], 3389 | [ 3390 | 73, 3391 | 51, 3392 | 0, 3393 | 35, 3394 | 4, 3395 | "FLOAT" 3396 | ], 3397 | [ 3398 | 74, 3399 | 52, 3400 | 0, 3401 | 35, 3402 | 5, 3403 | "INT" 3404 | ], 3405 | [ 3406 | 78, 3407 | 55, 3408 | 0, 3409 | 46, 3410 | 0, 3411 | "IMAGE" 3412 | ], 3413 | [ 3414 | 79, 3415 | 56, 3416 | 0, 3417 | 31, 3418 | 0, 3419 | "reliberate_v10.safetensors,v1-5-pruned-emaonly.ckpt" 3420 | ], 3421 | [ 3422 | 80, 3423 | 32, 3424 | 0, 3425 | 57, 3426 | 0, 3427 | "*" 3428 | ], 3429 | [ 3430 | 82, 3431 | 59, 3432 | 0, 3433 | 58, 3434 | 0, 3435 | "controlnet11Models_depth.safetensors" 3436 | ], 3437 | [ 3438 | 83, 3439 | 32, 3440 | 0, 3441 | 60, 3442 | 0, 3443 | "CONDITIONING" 3444 | ], 3445 | [ 3446 | 84, 3447 | 58, 3448 | 0, 3449 | 60, 3450 | 1, 3451 | "CONTROL_NET" 3452 | ], 3453 | [ 3454 | 86, 3455 | 62, 3456 | 0, 3457 | 60, 3458 | 3, 3459 | "FLOAT" 3460 | ], 3461 | [ 3462 | 87, 3463 | 60, 3464 | 0, 3465 | 57, 3466 | 1, 3467 | "*" 3468 | ], 3469 | [ 3470 | 88, 3471 | 63, 3472 | 0, 3473 | 61, 3474 | 0, 3475 | "*" 3476 | ], 3477 | [ 3478 | 90, 3479 | 67, 3480 | 0, 3481 | 64, 3482 | 1, 3483 | "*" 3484 | ], 3485 | [ 3486 | 91, 3487 | 66, 3488 | 0, 3489 | 65, 3490 | 0, 3491 | "controlnet11Models_depth.safetensors" 3492 | ], 3493 | [ 3494 | 93, 3495 | 65, 3496 | 0, 3497 | 67, 3498 | 1, 3499 | "CONTROL_NET" 3500 | ], 3501 | [ 3502 | 95, 3503 | 69, 3504 | 0, 3505 | 67, 3506 | 3, 3507 | "FLOAT" 3508 | ], 3509 | [ 3510 | 96, 3511 | 63, 3512 | 0, 3513 | 68, 3514 | 0, 3515 | "*" 3516 | ], 3517 | [ 3518 | 98, 3519 | 73, 3520 | 0, 3521 | 70, 3522 | 1, 3523 | "*" 3524 | ], 3525 | [ 3526 | 99, 3527 | 72, 3528 | 0, 3529 | 71, 3530 | 0, 3531 | "controlnet11Models_depth.safetensors" 3532 | ], 3533 | [ 3534 | 101, 3535 | 71, 3536 | 0, 3537 | 73, 3538 | 1, 3539 | "CONTROL_NET" 3540 | ], 3541 | [ 3542 | 103, 3543 | 75, 3544 | 0, 3545 | 73, 3546 | 3, 3547 | "FLOAT" 3548 | ], 3549 | [ 3550 | 104, 3551 | 63, 3552 | 0, 3553 | 74, 3554 | 0, 3555 | "*" 3556 | ], 3557 | [ 3558 | 105, 3559 | 57, 3560 | 0, 3561 | 64, 3562 | 0, 3563 | "*" 3564 | ], 3565 | [ 3566 | 106, 3567 | 64, 3568 | 0, 3569 | 70, 3570 | 0, 3571 | "*" 3572 | ], 3573 | [ 3574 | 107, 3575 | 60, 3576 | 0, 3577 | 67, 3578 | 0, 3579 | "CONDITIONING" 3580 | ], 3581 | [ 3582 | 108, 3583 | 67, 3584 | 0, 3585 | 73, 3586 | 0, 3587 | "CONDITIONING" 3588 | ], 3589 | [ 3590 | 109, 3591 | 70, 3592 | 0, 3593 | 35, 3594 | 1, 3595 | "CONDITIONING" 3596 | ], 3597 | [ 3598 | 116, 3599 | 61, 3600 | 0, 3601 | 80, 3602 | 0, 3603 | "IMAGE" 3604 | ], 3605 | [ 3606 | 120, 3607 | 86, 3608 | 0, 3609 | 59, 3610 | 1, 3611 | "STRING" 3612 | ], 3613 | [ 3614 | 121, 3615 | 86, 3616 | 0, 3617 | 66, 3618 | 1, 3619 | "STRING" 3620 | ], 3621 | [ 3622 | 122, 3623 | 86, 3624 | 0, 3625 | 72, 3626 | 1, 3627 | "STRING" 3628 | ], 3629 | [ 3630 | 139, 3631 | 68, 3632 | 0, 3633 | 94, 3634 | 0, 3635 | "IMAGE" 3636 | ], 3637 | [ 3638 | 145, 3639 | 74, 3640 | 0, 3641 | 96, 3642 | 0, 3643 | "IMAGE" 3644 | ], 3645 | [ 3646 | 152, 3647 | 110, 3648 | 0, 3649 | 53, 3650 | 0, 3651 | "*" 3652 | ], 3653 | [ 3654 | 153, 3655 | 53, 3656 | 0, 3657 | 111, 3658 | 0, 3659 | "*" 3660 | ], 3661 | [ 3662 | 154, 3663 | 110, 3664 | 0, 3665 | 111, 3666 | 1, 3667 | "*" 3668 | ], 3669 | [ 3670 | 155, 3671 | 111, 3672 | 0, 3673 | 35, 3674 | 6, 3675 | "INT" 3676 | ], 3677 | [ 3678 | 156, 3679 | 80, 3680 | 0, 3681 | 60, 3682 | 2, 3683 | "IMAGE" 3684 | ], 3685 | [ 3686 | 157, 3687 | 94, 3688 | 0, 3689 | 67, 3690 | 2, 3691 | "IMAGE" 3692 | ], 3693 | [ 3694 | 158, 3695 | 96, 3696 | 0, 3697 | 73, 3698 | 2, 3699 | "IMAGE" 3700 | ], 3701 | [ 3702 | 300, 3703 | 153, 3704 | 0, 3705 | 56, 3706 | 1, 3707 | "STRING" 3708 | ], 3709 | [ 3710 | 317, 3711 | 115, 3712 | 0, 3713 | 172, 3714 | 0, 3715 | "INT" 3716 | ], 3717 | [ 3718 | 318, 3719 | 118, 3720 | 0, 3721 | 172, 3722 | 1, 3723 | "INT" 3724 | ], 3725 | [ 3726 | 319, 3727 | 173, 3728 | 0, 3729 | 172, 3730 | 2, 3731 | "INT" 3732 | ], 3733 | [ 3734 | 320, 3735 | 172, 3736 | 0, 3737 | 35, 3738 | 3, 3739 | "LATENT" 3740 | ], 3741 | [ 3742 | 321, 3743 | 37, 3744 | 0, 3745 | 174, 3746 | 0, 3747 | "*" 3748 | ], 3749 | [ 3750 | 323, 3751 | 175, 3752 | 0, 3753 | 40, 3754 | 0, 3755 | "*" 3756 | ], 3757 | [ 3758 | 324, 3759 | 175, 3760 | 0, 3761 | 48, 3762 | 0, 3763 | "*" 3764 | ], 3765 | [ 3766 | 325, 3767 | 175, 3768 | 0, 3769 | 55, 3770 | 1, 3771 | "*" 3772 | ], 3773 | [ 3774 | 326, 3775 | 37, 3776 | 0, 3777 | 178, 3778 | 0, 3779 | "IMAGE" 3780 | ], 3781 | [ 3782 | 327, 3783 | 37, 3784 | 0, 3785 | 179, 3786 | 0, 3787 | "IMAGE" 3788 | ], 3789 | [ 3790 | 328, 3791 | 180, 3792 | 0, 3793 | 179, 3794 | 1, 3795 | "FLOAT" 3796 | ], 3797 | [ 3798 | 329, 3799 | 182, 3800 | 0, 3801 | 178, 3802 | 1, 3803 | "INT" 3804 | ], 3805 | [ 3806 | 330, 3807 | 183, 3808 | 0, 3809 | 178, 3810 | 2, 3811 | "INT" 3812 | ], 3813 | [ 3814 | 333, 3815 | 178, 3816 | 0, 3817 | 184, 3818 | 1, 3819 | "*" 3820 | ], 3821 | [ 3822 | 334, 3823 | 179, 3824 | 0, 3825 | 184, 3826 | 0, 3827 | "*" 3828 | ], 3829 | [ 3830 | 335, 3831 | 184, 3832 | 0, 3833 | 186, 3834 | 0, 3835 | "IMAGE" 3836 | ], 3837 | [ 3838 | 336, 3839 | 31, 3840 | 2, 3841 | 186, 3842 | 1, 3843 | "VAE" 3844 | ], 3845 | [ 3846 | 337, 3847 | 31, 3848 | 0, 3849 | 188, 3850 | 0, 3851 | "MODEL" 3852 | ], 3853 | [ 3854 | 338, 3855 | 70, 3856 | 0, 3857 | 188, 3858 | 1, 3859 | "CONDITIONING" 3860 | ], 3861 | [ 3862 | 339, 3863 | 34, 3864 | 0, 3865 | 188, 3866 | 2, 3867 | "CONDITIONING" 3868 | ], 3869 | [ 3870 | 341, 3871 | 51, 3872 | 0, 3873 | 188, 3874 | 4, 3875 | "FLOAT" 3876 | ], 3877 | [ 3878 | 343, 3879 | 111, 3880 | 0, 3881 | 188, 3882 | 6, 3883 | "INT" 3884 | ], 3885 | [ 3886 | 344, 3887 | 186, 3888 | 0, 3889 | 188, 3890 | 3, 3891 | "LATENT" 3892 | ], 3893 | [ 3894 | 345, 3895 | 189, 3896 | 0, 3897 | 188, 3898 | 7, 3899 | "FLOAT" 3900 | ], 3901 | [ 3902 | 346, 3903 | 52, 3904 | 0, 3905 | 190, 3906 | 0, 3907 | "*" 3908 | ], 3909 | [ 3910 | 347, 3911 | 190, 3912 | 0, 3913 | 188, 3914 | 5, 3915 | "INT" 3916 | ], 3917 | [ 3918 | 348, 3919 | 188, 3920 | 0, 3921 | 191, 3922 | 0, 3923 | "LATENT" 3924 | ], 3925 | [ 3926 | 349, 3927 | 31, 3928 | 2, 3929 | 191, 3930 | 1, 3931 | "VAE" 3932 | ], 3933 | [ 3934 | 350, 3935 | 191, 3936 | 0, 3937 | 174, 3938 | 1, 3939 | "*" 3940 | ], 3941 | [ 3942 | 352, 3943 | 80, 3944 | 0, 3945 | 193, 3946 | 1, 3947 | "IMAGE" 3948 | ], 3949 | [ 3950 | 354, 3951 | 193, 3952 | 0, 3953 | 194, 3954 | 1, 3955 | "*" 3956 | ], 3957 | [ 3958 | 355, 3959 | 194, 3960 | 0, 3961 | 196, 3962 | 0, 3963 | "*" 3964 | ], 3965 | [ 3966 | 356, 3967 | 197, 3968 | 0, 3969 | 196, 3970 | 1, 3971 | "*" 3972 | ], 3973 | [ 3974 | 357, 3975 | 194, 3976 | 0, 3977 | 197, 3978 | 0, 3979 | "IMAGE" 3980 | ], 3981 | [ 3982 | 358, 3983 | 94, 3984 | 0, 3985 | 197, 3986 | 1, 3987 | "IMAGE" 3988 | ], 3989 | [ 3990 | 359, 3991 | 196, 3992 | 0, 3993 | 198, 3994 | 0, 3995 | "IMAGE" 3996 | ], 3997 | [ 3998 | 360, 3999 | 96, 4000 | 0, 4001 | 198, 4002 | 1, 4003 | "IMAGE" 4004 | ], 4005 | [ 4006 | 361, 4007 | 196, 4008 | 0, 4009 | 199, 4010 | 0, 4011 | "*" 4012 | ], 4013 | [ 4014 | 362, 4015 | 198, 4016 | 0, 4017 | 199, 4018 | 1, 4019 | "*" 4020 | ], 4021 | [ 4022 | 363, 4023 | 174, 4024 | 0, 4025 | 194, 4026 | 0, 4027 | "*" 4028 | ], 4029 | [ 4030 | 364, 4031 | 199, 4032 | 0, 4033 | 175, 4034 | 0, 4035 | "*" 4036 | ], 4037 | [ 4038 | 365, 4039 | 174, 4040 | 0, 4041 | 193, 4042 | 0, 4043 | "IMAGE" 4044 | ], 4045 | [ 4046 | 366, 4047 | 115, 4048 | 0, 4049 | 63, 4050 | 1, 4051 | "INT" 4052 | ], 4053 | [ 4054 | 367, 4055 | 118, 4056 | 0, 4057 | 63, 4058 | 2, 4059 | "INT" 4060 | ] 4061 | ], 4062 | "groups": [ 4063 | { 4064 | "title": "Output", 4065 | "bounding": [ 4066 | 2317, 4067 | 406, 4068 | 1106, 4069 | 925 4070 | ], 4071 | "color": "#3f789e" 4072 | }, 4073 | { 4074 | "title": "img2img", 4075 | "bounding": [ 4076 | 128, 4077 | 439, 4078 | 1313, 4079 | 666 4080 | ], 4081 | "color": "#3f789e" 4082 | }, 4083 | { 4084 | "title": "Inputs", 4085 | "bounding": [ 4086 | -1542, 4087 | -189, 4088 | 1230, 4089 | 1569 4090 | ], 4091 | "color": "#3f789e" 4092 | }, 4093 | { 4094 | "title": "Stubs for testing in default editor", 4095 | "bounding": [ 4096 | -2489, 4097 | 656, 4098 | 877, 4099 | 734 4100 | ], 4101 | "color": "#3f789e" 4102 | }, 4103 | { 4104 | "title": "Controlnet", 4105 | "bounding": [ 4106 | -1223, 4107 | 1447, 4108 | 3271, 4109 | 1768 4110 | ], 4111 | "color": "#3f789e" 4112 | }, 4113 | { 4114 | "title": "Defaults - Edit Me", 4115 | "bounding": [ 4116 | -2431, 4117 | -107, 4118 | 869, 4119 | 551 4120 | ], 4121 | "color": "#8AA" 4122 | }, 4123 | { 4124 | "title": "High Res Fix", 4125 | "bounding": [ 4126 | 1365, 4127 | -583, 4128 | 2158, 4129 | 769 4130 | ], 4131 | "color": "#3f789e" 4132 | } 4133 | ], 4134 | "config": {}, 4135 | "extra": {}, 4136 | "version": 0.4 4137 | } 4138 | --------------------------------------------------------------------------------