Sergiu 1 anno fa
parent
commit
218529db3c

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+03_blender/sd_blender/sample_scene

+ 62 - 3
03_blender/sd_blender/__init__.py

@@ -89,6 +89,16 @@ def load_scene():
     # set camera
     create_cameras(scene_data)
 
+    # rename outputs
+
+    set_output_paths(
+        "D://Git//ap-canvas-creation-module//03_blender//sd_blender//sample_scene//Renders",
+        "TestProject",
+    )
+
+    # setup compositing
+    set_cryptomatte_objects("01_Products", "mask_product")
+
 
 def load_scene_data():
     print("Loading Scene Data")
@@ -225,9 +235,18 @@ def append_active_layers(newCollectionName, product_info, asset_data: AssetData)
                 collection.objects[0].location = product_info["properties"][
                     "transform"
                 ]["position"]
-                collection.objects[0].rotation_euler = product_info["properties"][
-                    "transform"
-                ]["rotation"]
+
+                # collection.objects[0].rotation_euler = product_info["properties"][
+                #     "transform"
+                # ]["rotation"]
+
+                rotation_in_degrees = product_info["properties"]["transform"][
+                    "rotation"
+                ]
+                rotation_in_radians = [math.radians(deg) for deg in rotation_in_degrees]
+
+                collection.objects[0].rotation_euler = rotation_in_radians
+
                 collection.objects[0].scale = product_info["properties"]["transform"][
                     "scale"
                 ]
@@ -357,6 +376,46 @@ def create_cameras(scene_data):
             bpy.context.scene.camera = camera
 
 
+def set_output_paths(base_path, project_name):
+    # Get the current scene
+    scene = bpy.context.scene
+
+    # Check if the scene has a compositor node tree
+    if scene.node_tree:
+        # Iterate over all nodes in the node tree
+        for node in scene.node_tree.nodes:
+            # Check if the node is an output node
+            if node.type == "OUTPUT_FILE":
+                # Set the base path of the output node
+                node.base_path = base_path + "//" + project_name
+                # Iterate over all file slots of the output node
+                # for file_slot in node.file_slots:
+                #     # Set the path of the file slot
+                #     file_slot.path = project_name
+
+
+def set_cryptomatte_objects(collection_name, node_name):
+    # Get all objects in the specified collection
+    objects = bpy.data.collections[collection_name].all_objects
+
+    # Convert the objects to a list
+    object_names = [obj.name for obj in objects]
+
+    print(object_names)
+
+    # Get the current scene
+    scene = bpy.context.scene
+
+    # Check if the scene has a compositor node tree
+    if scene.node_tree:
+        # Iterate over all nodes in the node tree
+        for node in scene.node_tree.nodes:
+            # Check if the node is a Cryptomatte node with the specified name
+            if node.type == "CRYPTOMATTE_V2" and node.name == node_name:
+                # Set the Matte ID objects of the node
+                node.matte_id = ",".join(object_names)
+
+
 # -------------------------------------------------------------------
 # Utilities
 # -------------------------------------------------------------------

BIN
03_blender/sd_blender/__pycache__/__init__.cpython-310.pyc


BIN
03_blender/sd_blender/sample_scene/03_BasicShapes/BasicShapes_Sphere_0001/BLEND/BasicShapes_Sphere_0001.blend


BIN
03_blender/sd_blender/sample_scene/Canvas_Render_Scene.blend


+ 31 - 25
03_blender/sd_blender/sample_scene/assets_database.json

@@ -1,26 +1,32 @@
 [
-    {
-        "id": "f8761a95-c28a-47ec-9254-e76cc3b693c7",
-        "name": "LNG_AntiAging_SleepingMask_MY2023",
-        "web_path": "https://www.laneige.com/LNG_AntiAging_SleepingMask_MY2023.glb",
-        "type": "product"
-    },
-    {
-        "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89f8",
-        "name": "LNG_PerfectRenew_Serum_MY2023",
-        "web_path": "https://www.laneige.com/LNG_PerfectRenew_Serum_MY2023.glb",
-        "type": "product"
-    },
-    {
-        "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89g9",
-        "name": "SWS_TablesAndDisplay_CircularCover_0001",
-        "web_path": "https://www.laneige.com/SWS_TablesAndDisplay_CircularCover_0001.glb",
-        "type": "asset"
-    },
-    {
-        "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89h2",
-        "name": "BasicShapes_Cube_0001",
-        "web_path": "https://www.laneige.com/BasicShapes_Cube_0001.glb",
-        "type": "shape"
-    }
-]
+  {
+    "id": "f8761a95-c28a-47ec-9254-e76cc3b693c7",
+    "name": "LNG_AntiAging_SleepingMask_MY2023",
+    "web_path": "https://www.laneige.com/LNG_AntiAging_SleepingMask_MY2023.glb",
+    "type": "product"
+  },
+  {
+    "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89f8",
+    "name": "LNG_PerfectRenew_Serum_MY2023",
+    "web_path": "https://www.laneige.com/LNG_PerfectRenew_Serum_MY2023.glb",
+    "type": "product"
+  },
+  {
+    "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89g9",
+    "name": "SWS_TablesAndDisplay_CircularCover_0001",
+    "web_path": "https://www.laneige.com/SWS_TablesAndDisplay_CircularCover_0001.glb",
+    "type": "asset"
+  },
+  {
+    "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89h2",
+    "name": "BasicShapes_Cube_0001",
+    "web_path": "https://www.laneige.com/BasicShapes_Cube_0001.glb",
+    "type": "shape"
+  },
+  {
+    "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89h3",
+    "name": "BasicShapes_Sphere_0001",
+    "web_path": "https://www.laneige.com/BasicShapes_Cube_0001.glb",
+    "type": "shape"
+  }
+]

+ 113 - 209
03_blender/sd_blender/sample_scene/scene_info.json

@@ -1,212 +1,116 @@
 {
-    "scene": {
-        "objects": [
-            {
-                "name": "LNG SleepingMask",
-                "type": "group",
-                "group_type": "product",
-                "id": "f8761a95-c28a-47ec-9254-e76cc3b693c7",
-                "properties": {
-                    "transform": {
-                        "position": [
-                            0,
-                            0,
-                            0
-                        ],
-                        "rotation": [
-                            0,
-                            0,
-                            0
-                        ],
-                        "scale": [
-                            1,
-                            1,
-                            1
-                        ]
-                    },
-                    "visible": true
-                }
-            },
-            {
-                "name": "LNG SleepingMask 2",
-                "type": "group",
-                "group_type": "product",
-                "id": "f8761a95-c28a-47ec-9254-e76cc3b693c7",
-                "properties": {
-                    "transform": {
-                        "position": [
-                            1,
-                            0,
-                            0
-                        ],
-                        "rotation": [
-                            45,
-                            0,
-                            0
-                        ],
-                        "scale": [
-                            1,
-                            1,
-                            1
-                        ]
-                    },
-                    "visible": true
-                }
-            },
-            {
-                "name": "LNG Serum",
-                "type": "group",
-                "group_type": "product",
-                "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89f8",
-                "properties": {
-                    "transform": {
-                        "position": [
-                            2,
-                            0,
-                            0
-                        ],
-                        "rotation": [
-                            60,
-                            0,
-                            0
-                        ],
-                        "scale": [
-                            1,
-                            1,
-                            1
-                        ]
-                    },
-                    "visible": true
-                }
-            },
-            {
-                "name": "SWS_TablesAndDisplay_CircularCover_0001",
-                "type": "group",
-                "group_type": "asset",
-                "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89g9",
-                "properties": {
-                    "transform": {
-                        "position": [
-                            0,
-                            0,
-                            1
-                        ],
-                        "rotation": [
-                            23,
-                            12,
-                            35
-                        ],
-                        "scale": [
-                            2,
-                            1,
-                            1
-                        ]
-                    },
-                    "visible": true
-                }
-            },
-            {
-                "name": "Cube",
-                "type": "group",
-                "group_type": "shape",
-                "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89h2",
-                "properties": {
-                    "transform": {
-                        "position": [
-                            0,
-                            0,
-                            0
-                        ],
-                        "rotation": [
-                            0,
-                            0,
-                            0
-                        ],
-                        "scale": [
-                            2,
-                            2,
-                            2
-                        ]
-                    },
-                    "visible": true,
-                    "color": {
-                        "r": 0.5,
-                        "g": 0.5,
-                        "b": 0.5
-                    }
-                }
-            }
-        ],
-        "cameras": [
-            {
-                "name": "Camera",
-                "type": "camera",
-                "properties": {
-                    "transform": {
-                        "position": [
-                            0,
-                            0,
-                            0
-                        ],
-                        "rotation": [
-                            0,
-                            0,
-                            0
-                        ]
-                    },
-                    "lens": {
-                        "type": "perspective",
-                        "fov": 60,
-                        "near": 0.1,
-                        "far": 100
-                    },
-                    "active": true
-                }
-            },
-            {
-                "name": "Camera 2",
-                "type": "camera",
-                "properties": {
-                    "transform": {
-                        "position": [
-                            0,
-                            0,
-                            0
-                        ],
-                        "rotation": [
-                            0,
-                            0,
-                            0
-                        ]
-                    },
-                    "lens": {
-                        "type": "perspective",
-                        "fov": 60,
-                        "near": 0.1,
-                        "far": 100
-                    },
-                    "active": false
-                }
-            }
-        ],
-        "environment": {
-            "background": {
-                "type": "color",
-                "color": {
-                    "r": 1,
-                    "g": 1,
-                    "b": 1
-                }
-            },
-            "lighting": {
-                "type": "image",
-                "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89e8",
-                "intensity": 1,
-                "rotation": 25,
-                "flip_horizontal": false,
-                "flip_vertical": false,
-                "visible": false
-            }
+  "scene": {
+    "objects": [
+      {
+        "name": "LNG Serum",
+        "type": "group",
+        "group_type": "product",
+        "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89f8",
+        "properties": {
+          "transform": {
+            "position": [0, 0, 0],
+            "rotation": [9.0, 26.1, -15.7],
+            "scale": [1, 1, 1]
+          },
+          "visible": true
         }
+      },
+
+      {
+        "name": "Sphere",
+        "type": "group",
+        "group_type": "shape",
+        "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89h3",
+        "properties": {
+          "transform": {
+            "position": [-0.041122, -0.036135, 0.155559],
+            "rotation": [0, 0, 0],
+            "scale": [0.74098, 0.74098, 0.74098]
+          },
+          "visible": true,
+          "color": {
+            "r": 0.5,
+            "g": 0.5,
+            "b": 0.5
+          }
+        }
+      },
+      {
+        "name": "Sphere",
+        "type": "group",
+        "group_type": "shape",
+        "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89h3",
+        "properties": {
+          "transform": {
+            "position": [0.067047, 0.088912, -0.023188],
+            "rotation": [0, 0, 0],
+            "scale": [0.4103, 0.4103, 0.4103]
+          },
+          "visible": true,
+          "color": {
+            "r": 0.5,
+            "g": 0.5,
+            "b": 0.5
+          }
+        }
+      },
+      {
+        "name": "Sphere",
+        "type": "group",
+        "group_type": "shape",
+        "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89h3",
+        "properties": {
+          "transform": {
+            "position": [-0.041122, -0.132029, 0.078844],
+            "rotation": [0, 0, 0],
+            "scale": [0.16679, 0.16679, 0.16679]
+          },
+          "visible": true,
+          "color": {
+            "r": 0.5,
+            "g": 0.5,
+            "b": 0.5
+          }
+        }
+      }
+    ],
+    "cameras": [
+      {
+        "name": "Camera",
+        "type": "camera",
+        "properties": {
+          "transform": {
+            "position": [0.432918, -0.165131, -0.080359],
+            "rotation": [105.303, 0.786264, 69.833]
+          },
+          "lens": {
+            "type": "perspective",
+            "fov": 46.8,
+            "near": 0.1,
+            "far": 100
+          },
+          "active": true
+        }
+      }
+    ],
+    "environment": {
+      "background": {
+        "type": "color",
+        "color": {
+          "r": 1,
+          "g": 1,
+          "b": 1
+        }
+      },
+      "lighting": {
+        "type": "image",
+        "id": "15a314a1-8ba1-4e0e-ad0c-f605b06f89e8",
+        "intensity": 1,
+        "rotation": 25,
+        "flip_horizontal": false,
+        "flip_vertical": false,
+        "visible": false
+      }
     }
-}
+  }
+}

+ 80 - 0
03_blender/sd_blender/zs_ai_ddl.py

@@ -0,0 +1,80 @@
+import requests
+from pathlib import Path
+import json
+
+DDL_SERVER = "http://69.230.251.234:8081/api"
+
+
+def send_ddl_job(
+    job_info={
+        "Plugin": "DevBlender",
+        "Frames": "0",
+        "Priority": 49,
+        "Name": "name",
+        "Group": "general",
+    },
+    plugin_info={"SceneFile": "", "AdditionalArguments": "", "CustomArguments": ""},
+):
+    url = f"{DDL_SERVER}/jobs"
+    response = requests.post(
+        url,
+        json={
+            "JobInfo": job_info,
+            "PluginInfo": plugin_info,
+            "AuxFiles": [],
+            "IdOnly": True,
+        },
+    )
+    return response.json()
+
+
+def load_scene_data():
+    print("Loading Scene Data")
+    # load scene data
+
+    # to be replaced with actual data
+    # open scene_info.json
+    script_path = Path(__file__).resolve()
+    scene_data_path = script_path.parent / "sample_scene" / "scene_info.json"
+    with scene_data_path.open() as file:
+        scene_data = json.load(file)
+        print(scene_data)
+    return scene_data
+
+
+def send_test_render():
+
+    script_path = Path(__file__).resolve()
+    scene_path = str(script_path.parent / "sample_scene" / "Canvas_Render_Scene.blend")
+
+    render_script_path = str(script_path.parent / "zs_ai_render_script.py")
+
+    # load scene data and convert it to base64 string
+
+    scene_data = load_scene_data()
+    scene_data_string = json.dumps(scene_data)
+    # scene_data_bytes = scene_data_string.encode("ascii")
+    # scene_data_base64 = scene_data_bytes.decode("ascii")
+
+    ddl_web = send_ddl_job(
+        job_info={
+            "Name": "AI_Test_Job_01",
+            "UserName": "AI_PC",
+            "Frames": 0,
+            "Priority": 49,
+            "Plugin": "DevBlender",
+            "ChunkSize": "1",
+            "MachineName": "AI_PC",
+            "PostJobScript": "D:/Git/ap-canvas-creation-module/05_deadline/sd_comfy_deadline.py",
+        },
+        plugin_info={
+            "SceneFile": scene_path,
+            "AdditionalArguments": f"-P {render_script_path}",
+            "CustomArguments": scene_data_string,
+        },
+    )
+
+    print(ddl_web)
+
+
+send_test_render()

+ 7 - 38
03_blender/sd_blender/zs_ai_render_script.py

@@ -7,49 +7,18 @@ import base64
 
 argv = sys.argv
 try:
-    argv = argv[argv.index("--") + 1:]
+    argv = argv[argv.index("--") + 1 :]
 
-    # print(argv[0])
+    # scene_info_base64 = argv[0]
 
-    # print(argv[0]["Products"][0])
+    # scene_info_bytes = base64.b64decode(scene_info_base64)
+    # scene_info_string = scene_info_bytes.decode("ascii")
 
-    # shotInfo = json.loads(argv[0])
+    scene_info_string = argv[0]
 
-    # base64_message = argv[0].decode('ascii')
+    print("loading scene data", scene_info_string)
 
-    # shot_info_bytes = base64.b64decode(argv[0])
-    # shot_info_string = shot_info_bytes.decode('ascii')
+    bpy.ops.zs_sd_loader.load_scene()
 
-    shot_info_base64 = argv[0]
-
-    #shot_info_base64_bytes = shot_info_base64.encode('ascii')
-    shot_info_bytes = base64.b64decode(shot_info_base64)
-    shot_info_string = shot_info_bytes.decode('ascii')
-
-    # print(shotInfo["ShotPath"])
-
-    # print("Argument List:", str(sys.argv))
-
-    bpy.ops.render.zs_load_scene_commandline(shot_info_string=shot_info_string)
-    # zsrs.load_shot(shotInfo)
-    # print(argv[0])
-
-    # styleIndex = argv[0]
 except Exception as e:
     print("Error:", e)
-    # styleIndex = 0
-
-
-# load shot
-
-
-# bpy.ops.render.zs_render(index=0)
-
-
-# "C:\\Program Files\\Blender Foundation\\Blender 2.93\\blender.exe" "D:\\Temp\\TestDeadline\\Cube.blend" -b -python "C:\\Users\\sergiuhulpe.TENCENT\\AppData\\Roaming\\Blender Foundation\\Blender\\2.93\\scripts\\addons\\zs-scene-manager-addon\\zs_renderScript.py" -f 1 -- example args 123
-
-# Z:\\01_Production_MB\\MB_2201_Vans\\02_CG\\01_Studio\\130\\00_Blender\\130.blend
-
-# C:\\Users\\Sergiu\\AppDataRoaming\\Blender Foundation\\Blender\\3.0\\scripts\\addons_contrib\\zs-scene-manager-addon\\zs_render_script.py
-
-# "C:\\Program Files\\Blender Foundation\\Blender 3.0\\blender.exe" "Z:\\01_Production_MB\\MB_2201_Vans\\02_CG\\01_Studio\\130\\00_Blender\\130.blend" -python "C:\\Users\\Sergiu\\AppData\\Roaming\\Blender Foundation\\Blender\\3.0\\scripts\\addons_contrib\\zs-scene-manager-addon\\zs_render_script.py" - f 1 - - example args 123

+ 27 - 8
04_stable_diffusion/sd_comfy_api.py

@@ -14,7 +14,7 @@ import random
 
 # load the prompt from a workflow_api_test.json file
 with open(
-    "D://Temp//ComfyUI_windows_portable_nvidia//ComfyUI_windows_portable//ComfyUI//script_examples//custom//workflow_api_test.json",
+    "D://Git//ap-canvas-creation-module//04_stable_diffusion//workflows//canvas_3d_to_img_standard.json",
     "r",
 ) as f:
     prompt_text_json = f.read()
@@ -52,18 +52,37 @@ def set_filename(json_obj, title, new_prefix):
     return None
 
 
+positive_text = "cosmetics bottle at sunset, beautiful product advertising, luxury"
+negative_text = "ugly, bad"
+
+image_path = "D://Git//ap-canvas-creation-module//03_blender//sd_blender//sample_scene//Renders//TestProject//"
+
+image_base_path = image_path + "base0001.png"
+image_alpha_products_path = image_path + "alpha_products0001.png"
+image_depth_path = image_path + "depth0001.png"
+
 prompt = json.loads(prompt_text_json)
 set_filename(prompt, "Save Image", "custom/basic_api_example")
 
 ksampler_main = find_node(prompt, "KSampler")
-ksampler_main["inputs"]["seed"] = random.randint(0, 1000000)
+ksampler_main["inputs"]["noise_seed"] = random.randint(0, 1000000)
+
+prompt_positive = find_node(prompt, "positive_CLIPTextEncodeSDXL")
+prompt_positive["inputs"]["text_g"] = positive_text
+
+prompt_positive["inputs"]["text_l"] = positive_text
+
+prompt_negative = find_node(prompt, "negative_CLIPTextEncodeSDXL")
+prompt_negative["inputs"]["text_g"] = negative_text
+prompt_negative["inputs"]["text_l"] = negative_text
+
+image_base = find_node(prompt, "image_base")
+image_base["inputs"]["image"] = image_base_path
 
-prompt_positive = find_node(prompt, "prompt_positive")
-prompt_positive["inputs"][
-    "text"
-] = "cosmetics bottle at sunset, beautiful product advertising, luxury"
+image_base = find_node(prompt, "image_product_mask")
+image_base["inputs"]["image"] = image_alpha_products_path
 
-prompt_negative = find_node(prompt, "prompt_negative")
-prompt_negative["inputs"]["text"] = "ugly, bad"
+image_base = find_node(prompt, "image_depth")
+image_base["inputs"]["image"] = image_depth_path
 
 queue_prompt(prompt)

+ 251 - 0
04_stable_diffusion/workflows/canvas_3d_to_img_standard.json

@@ -0,0 +1,251 @@
+{
+  "1": {
+    "inputs": {
+      "ckpt_name": "epicrealismXL_v8Kiss.safetensors"
+    },
+    "class_type": "CheckpointLoaderSimple",
+    "_meta": {
+      "title": "Load Checkpoint"
+    }
+  },
+  "2": {
+    "inputs": {
+      "width": 4096,
+      "height": 4096,
+      "crop_w": 0,
+      "crop_h": 0,
+      "target_width": 1024,
+      "target_height": 1024,
+      "text_g": "a photo of a beauty product on a clean background, high-end, elegant, clean geometric shapes highlighting the product, sunlight",
+      "text_l": "a photo of a beauty product on a clean background, high-end, elegant, clean geometric shapes highlighting the product, sunlight",
+      "clip": [
+        "1",
+        1
+      ]
+    },
+    "class_type": "CLIPTextEncodeSDXL",
+    "_meta": {
+      "title": "positive_CLIPTextEncodeSDXL"
+    }
+  },
+  "5": {
+    "inputs": {
+      "width": 4096,
+      "height": 4096,
+      "crop_w": 0,
+      "crop_h": 0,
+      "target_width": 1024,
+      "target_height": 1024,
+      "text_g": "",
+      "text_l": "",
+      "clip": [
+        "1",
+        1
+      ]
+    },
+    "class_type": "CLIPTextEncodeSDXL",
+    "_meta": {
+      "title": "negative_CLIPTextEncodeSDXL"
+    }
+  },
+  "8": {
+    "inputs": {
+      "add_noise": "enable",
+      "noise_seed": 106,
+      "steps": 12,
+      "cfg": 5,
+      "sampler_name": "dpmpp_sde_gpu",
+      "scheduler": "exponential",
+      "start_at_step": 0,
+      "end_at_step": 10000,
+      "return_with_leftover_noise": "disable",
+      "model": [
+        "1",
+        0
+      ],
+      "positive": [
+        "25",
+        0
+      ],
+      "negative": [
+        "25",
+        1
+      ],
+      "latent_image": [
+        "9",
+        0
+      ]
+    },
+    "class_type": "KSamplerAdvanced",
+    "_meta": {
+      "title": "KSampler"
+    }
+  },
+  "9": {
+    "inputs": {
+      "width": 1024,
+      "height": 1024,
+      "batch_size": 1
+    },
+    "class_type": "EmptyLatentImage",
+    "_meta": {
+      "title": "Empty Latent Image"
+    }
+  },
+  "17": {
+    "inputs": {
+      "images": [
+        "55",
+        0
+      ]
+    },
+    "class_type": "PreviewImage",
+    "_meta": {
+      "title": "Preview Image"
+    }
+  },
+  "20": {
+    "inputs": {
+      "image": "010_KER_AlwaysOn_Beauty (1).png",
+      "upload": "image"
+    },
+    "class_type": "LoadImage",
+    "_meta": {
+      "title": "image_base"
+    }
+  },
+  "25": {
+    "inputs": {
+      "strength": 0.7000000000000001,
+      "start_percent": 0,
+      "end_percent": 1,
+      "positive": [
+        "2",
+        0
+      ],
+      "negative": [
+        "5",
+        0
+      ],
+      "control_net": [
+        "26",
+        0
+      ],
+      "image": [
+        "30",
+        0
+      ]
+    },
+    "class_type": "ControlNetApplyAdvanced",
+    "_meta": {
+      "title": "Apply ControlNet (Advanced)"
+    }
+  },
+  "26": {
+    "inputs": {
+      "control_net_name": "control-lora-depth-rank256.safetensors"
+    },
+    "class_type": "ControlNetLoader",
+    "_meta": {
+      "title": "Load ControlNet Model"
+    }
+  },
+  "30": {
+    "inputs": {
+      "image": "010_KER_AlwaysOn_Depth_2.png",
+      "upload": "image"
+    },
+    "class_type": "LoadImage",
+    "_meta": {
+      "title": "image_depth"
+    }
+  },
+  "33": {
+    "inputs": {
+      "image": "010_KER_AlwaysOn_Alpha (1).png",
+      "channel": "red",
+      "upload": "image"
+    },
+    "class_type": "LoadImageMask",
+    "_meta": {
+      "title": "image_product_mask"
+    }
+  },
+  "38": {
+    "inputs": {
+      "x": 0,
+      "y": 0,
+      "resize_source": true,
+      "destination": [
+        "40",
+        0
+      ],
+      "source": [
+        "20",
+        0
+      ],
+      "mask": [
+        "33",
+        0
+      ]
+    },
+    "class_type": "ImageCompositeMasked",
+    "_meta": {
+      "title": "ImageCompositeMasked"
+    }
+  },
+  "40": {
+    "inputs": {
+      "samples": [
+        "8",
+        0
+      ],
+      "vae": [
+        "1",
+        2
+      ]
+    },
+    "class_type": "VAEDecode",
+    "_meta": {
+      "title": "VAE Decode"
+    }
+  },
+  "45": {
+    "inputs": {
+      "filename_prefix": "ComfyUI",
+      "images": [
+        "55",
+        0
+      ]
+    },
+    "class_type": "SaveImage",
+    "_meta": {
+      "title": "Save Image"
+    }
+  },
+  "53": {
+    "inputs": {
+      "model_name": "4xRealWebPhoto_v4_dat2.safetensors"
+    },
+    "class_type": "UpscaleModelLoader",
+    "_meta": {
+      "title": "Load Upscale Model"
+    }
+  },
+  "55": {
+    "inputs": {
+      "upscale_model": [
+        "53",
+        0
+      ],
+      "image": [
+        "38",
+        0
+      ]
+    },
+    "class_type": "ImageUpscaleWithModel",
+    "_meta": {
+      "title": "Upscale Image (using Model)"
+    }
+  }
+}

+ 1 - 1
05_deadline/sd_comfy_deadline.py

@@ -2,7 +2,7 @@ import requests
 
 DDL_SERVER = "http://69.230.251.234:8081/api"
 
-script_path = "D://Temp//ComfyUI_windows_portable_nvidia//ComfyUI_windows_portable//ComfyUI//script_examples//custom//basic_api_example - Copy.py"
+script_path = "D://Git//ap-canvas-creation-module//04_stable_diffusion//sd_comfy_api.py"
 
 
 def send_sd_comfy_ddl_job(