+
{}} // Already handled in parent component.
+ resolution={resolution}
+ onStreamReady={handleCanvasStreamReady}
/>
);
diff --git a/ui/src/hooks/use-peer.ts b/ui/src/hooks/use-peer.ts
index 6ed8ff05..5b5226ea 100644
--- a/ui/src/hooks/use-peer.ts
+++ b/ui/src/hooks/use-peer.ts
@@ -104,6 +104,21 @@ export function usePeer(props: PeerProps): Peer {
channel.readyState,
);
setControlChannel(channel);
+
+ // Send resolution configuration to server if available
+ if (props.resolution) {
+ // Add a small delay to ensure the channel is fully established
+ setTimeout(() => {
+ const resolution = props.resolution!;
+ const resolutionMessage = {
+ type: "update_resolution",
+ width: resolution.width,
+ height: resolution.height
+ };
+ channel.send(JSON.stringify(resolutionMessage));
+ console.log("[usePeer] Sent resolution configuration:", resolutionMessage);
+ }, 200);
+ }
};
channel.onclose = () => {
@@ -164,8 +179,23 @@ export function usePeer(props: PeerProps): Peer {
sendOffer,
url,
handleConnectionStateChange,
+ props.resolution,
]);
+ // Update resolution when it changes
+ useEffect(() => {
+ if (controlChannel && controlChannel.readyState === 'open' && props.resolution) {
+ const resolution = props.resolution;
+ const resolutionMessage = {
+ type: "update_resolution",
+ width: resolution.width,
+ height: resolution.height
+ };
+ controlChannel.send(JSON.stringify(resolutionMessage));
+ console.log("[usePeer] Updated resolution configuration:", resolutionMessage);
+ }
+ }, [controlChannel, props.resolution]);
+
return {
peerConnection,
remoteStream,
diff --git a/workflows/comfystream/sd15-multi-cnet-depthanything-face-dynamic-api.json b/workflows/comfystream/sd15-multi-cnet-depthanything-face-dynamic-api.json
new file mode 100644
index 00000000..06f085c4
--- /dev/null
+++ b/workflows/comfystream/sd15-multi-cnet-depthanything-face-dynamic-api.json
@@ -0,0 +1,351 @@
+{
+ "2": {
+ "inputs": {
+ "engine": "depth_anything_vitl14-fp16.engine",
+ "images": [
+ "26",
+ 0
+ ]
+ },
+ "class_type": "DepthAnythingTensorrt",
+ "_meta": {
+ "title": "Depth Anything Tensorrt"
+ }
+ },
+ "3": {
+ "inputs": {
+ "unet_name": "dynamic-dreamshaper8_SD15_$dyn-b-1-4-2-h-448-704-512-w-448-704-512_00001_.engine",
+ "model_type": "SD15"
+ },
+ "class_type": "TensorRTLoader",
+ "_meta": {
+ "title": "TensorRT Loader"
+ }
+ },
+ "5": {
+ "inputs": {
+ "text": "beautiful pencil sketch, masterpiece ",
+ "clip": [
+ "18",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Prompt)"
+ }
+ },
+ "6": {
+ "inputs": {
+ "text": "",
+ "clip": [
+ "18",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Prompt)"
+ }
+ },
+ "7": {
+ "inputs": {
+ "seed": 59790989568715,
+ "steps": 2,
+ "cfg": 1,
+ "sampler_name": "lcm",
+ "scheduler": "normal",
+ "denoise": 1,
+ "model": [
+ "41",
+ 0
+ ],
+ "positive": [
+ "38",
+ 0
+ ],
+ "negative": [
+ "37",
+ 0
+ ],
+ "latent_image": [
+ "16",
+ 0
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "8": {
+ "inputs": {
+ "control_net_name": "control_v11f1p_sd15_depth_fp16.safetensors"
+ },
+ "class_type": "ControlNetLoader",
+ "_meta": {
+ "title": "Load ControlNet Model"
+ }
+ },
+ "9": {
+ "inputs": {
+ "strength": 0.9000000000000001,
+ "start_percent": 0,
+ "end_percent": 1,
+ "positive": [
+ "5",
+ 0
+ ],
+ "negative": [
+ "6",
+ 0
+ ],
+ "control_net": [
+ "10",
+ 0
+ ],
+ "image": [
+ "2",
+ 0
+ ]
+ },
+ "class_type": "ControlNetApplyAdvanced",
+ "_meta": {
+ "title": "Apply ControlNet"
+ }
+ },
+ "10": {
+ "inputs": {
+ "backend": "inductor",
+ "fullgraph": false,
+ "mode": "reduce-overhead",
+ "controlnet": [
+ "8",
+ 0
+ ]
+ },
+ "class_type": "TorchCompileLoadControlNet",
+ "_meta": {
+ "title": "TorchCompileLoadControlNet"
+ }
+ },
+ "11": {
+ "inputs": {
+ "vae_name": "taesd"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "13": {
+ "inputs": {
+ "backend": "inductor",
+ "fullgraph": true,
+ "mode": "reduce-overhead",
+ "compile_encoder": true,
+ "compile_decoder": true,
+ "vae": [
+ "11",
+ 0
+ ]
+ },
+ "class_type": "TorchCompileLoadVAE",
+ "_meta": {
+ "title": "TorchCompileLoadVAE"
+ }
+ },
+ "14": {
+ "inputs": {
+ "samples": [
+ "7",
+ 0
+ ],
+ "vae": [
+ "13",
+ 0
+ ]
+ },
+ "class_type": "VAEDecode",
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "15": {
+ "inputs": {
+ "images": [
+ "14",
+ 0
+ ]
+ },
+ "class_type": "PreviewImage",
+ "_meta": {
+ "title": "Preview Image"
+ }
+ },
+ "16": {
+ "inputs": {
+ "width": 448,
+ "height": 704,
+ "batch_size": 1
+ },
+ "class_type": "EmptyLatentImage",
+ "_meta": {
+ "title": "Empty Latent Image"
+ }
+ },
+ "18": {
+ "inputs": {
+ "stop_at_clip_layer": -2,
+ "clip": [
+ "36",
+ 0
+ ]
+ },
+ "class_type": "CLIPSetLastLayer",
+ "_meta": {
+ "title": "CLIP Set Last Layer"
+ }
+ },
+ "19": {
+ "inputs": {
+ "strength": 0.9000000000000001,
+ "start_percent": 0,
+ "end_percent": 1,
+ "positive": [
+ "5",
+ 0
+ ],
+ "negative": [
+ "6",
+ 0
+ ],
+ "control_net": [
+ "21",
+ 0
+ ],
+ "image": [
+ "39",
+ 1
+ ]
+ },
+ "class_type": "ControlNetApplyAdvanced",
+ "_meta": {
+ "title": "Apply ControlNet"
+ }
+ },
+ "20": {
+ "inputs": {
+ "control_net_name": "control_v2p_sd15_mediapipe_face.safetensors"
+ },
+ "class_type": "ControlNetLoader",
+ "_meta": {
+ "title": "Load ControlNet Model"
+ }
+ },
+ "21": {
+ "inputs": {
+ "backend": "inductor",
+ "fullgraph": false,
+ "mode": "reduce-overhead",
+ "controlnet": [
+ "20",
+ 0
+ ]
+ },
+ "class_type": "TorchCompileLoadControlNet",
+ "_meta": {
+ "title": "TorchCompileLoadControlNet"
+ }
+ },
+ "26": {
+ "inputs": {
+ "image": "example.png"
+ },
+ "class_type": "LoadImage",
+ "_meta": {
+ "title": "Load Image"
+ }
+ },
+ "36": {
+ "inputs": {
+ "clip_name": "CLIPText/model.fp16.safetensors",
+ "type": "stable_diffusion",
+ "device": "default"
+ },
+ "class_type": "CLIPLoader",
+ "_meta": {
+ "title": "Load CLIP"
+ }
+ },
+ "37": {
+ "inputs": {
+ "conditioning_to": [
+ "9",
+ 1
+ ],
+ "conditioning_from": [
+ "19",
+ 1
+ ]
+ },
+ "class_type": "ConditioningConcat",
+ "_meta": {
+ "title": "Conditioning (Concat)"
+ }
+ },
+ "38": {
+ "inputs": {
+ "conditioning_to": [
+ "9",
+ 0
+ ],
+ "conditioning_from": [
+ "19",
+ 0
+ ]
+ },
+ "class_type": "ConditioningConcat",
+ "_meta": {
+ "title": "Conditioning (Concat)"
+ }
+ },
+ "39": {
+ "inputs": {
+ "static_image_mode": false,
+ "max_num_faces": 1,
+ "refine_landmarks": false,
+ "min_detection_confidence": 0.3500000000000001,
+ "min_tracking_confidence": 0.3500000000000001,
+ "draw_mesh": true,
+ "draw_contours": true,
+ "mesh_color": "green",
+ "mesh_thickness": 2,
+ "image": [
+ "26",
+ 0
+ ]
+ },
+ "class_type": "FaceMeshNode",
+ "_meta": {
+ "title": "Face Mesh"
+ }
+ },
+ "41": {
+ "inputs": {
+ "use_feature_injection": false,
+ "feature_injection_strength": 0.8000000000000002,
+ "feature_similarity_threshold": 0.9800000000000002,
+ "feature_cache_interval": 4,
+ "feature_bank_max_frames": 4,
+ "model": [
+ "3",
+ 0
+ ]
+ },
+ "class_type": "FeatureBankAttentionProcessor",
+ "_meta": {
+ "title": "Feature Bank Attention Processor"
+ }
+ }
+}
\ No newline at end of file
diff --git a/workflows/comfystream/sd15-tensorrt-depthanything-large-api.json b/workflows/comfystream/sd15-tensorrt-depthanything-large-api.json
new file mode 100644
index 00000000..d110685a
--- /dev/null
+++ b/workflows/comfystream/sd15-tensorrt-depthanything-large-api.json
@@ -0,0 +1,217 @@
+{
+ "1": {
+ "inputs": {
+ "image": "example.png"
+ },
+ "class_type": "LoadImage",
+ "_meta": {
+ "title": "Load Image"
+ }
+ },
+ "2": {
+ "inputs": {
+ "engine": "depth_anything_v2_vitl-fp16.engine",
+ "images": [
+ "1",
+ 0
+ ]
+ },
+ "class_type": "DepthAnythingTensorrt",
+ "_meta": {
+ "title": "Depth Anything Tensorrt"
+ }
+ },
+ "3": {
+ "inputs": {
+ "unet_name": "static-dreamshaper8_SD15_$stat-b-1-h-512-w-512_00001_.engine",
+ "model_type": "SD15"
+ },
+ "class_type": "TensorRTLoader",
+ "_meta": {
+ "title": "TensorRT Loader"
+ }
+ },
+ "5": {
+ "inputs": {
+ "text": "the hulk",
+ "clip": [
+ "23",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Prompt)"
+ }
+ },
+ "6": {
+ "inputs": {
+ "text": "",
+ "clip": [
+ "23",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Prompt)"
+ }
+ },
+ "7": {
+ "inputs": {
+ "seed": 446080115054598,
+ "steps": 1,
+ "cfg": 1,
+ "sampler_name": "lcm",
+ "scheduler": "normal",
+ "denoise": 1,
+ "model": [
+ "3",
+ 0
+ ],
+ "positive": [
+ "9",
+ 0
+ ],
+ "negative": [
+ "9",
+ 1
+ ],
+ "latent_image": [
+ "16",
+ 0
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "8": {
+ "inputs": {
+ "control_net_name": "control_v11f1p_sd15_depth_fp16.safetensors"
+ },
+ "class_type": "ControlNetLoader",
+ "_meta": {
+ "title": "Load ControlNet Model"
+ }
+ },
+ "9": {
+ "inputs": {
+ "strength": 1.0000000000000002,
+ "start_percent": 0,
+ "end_percent": 1,
+ "positive": [
+ "5",
+ 0
+ ],
+ "negative": [
+ "6",
+ 0
+ ],
+ "control_net": [
+ "10",
+ 0
+ ],
+ "image": [
+ "2",
+ 0
+ ]
+ },
+ "class_type": "ControlNetApplyAdvanced",
+ "_meta": {
+ "title": "Apply ControlNet"
+ }
+ },
+ "10": {
+ "inputs": {
+ "backend": "inductor",
+ "fullgraph": false,
+ "mode": "reduce-overhead",
+ "controlnet": [
+ "8",
+ 0
+ ]
+ },
+ "class_type": "TorchCompileLoadControlNet",
+ "_meta": {
+ "title": "TorchCompileLoadControlNet"
+ }
+ },
+ "11": {
+ "inputs": {
+ "vae_name": "taesd"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "13": {
+ "inputs": {
+ "backend": "inductor",
+ "fullgraph": true,
+ "mode": "reduce-overhead",
+ "compile_encoder": true,
+ "compile_decoder": true,
+ "vae": [
+ "11",
+ 0
+ ]
+ },
+ "class_type": "TorchCompileLoadVAE",
+ "_meta": {
+ "title": "TorchCompileLoadVAE"
+ }
+ },
+ "14": {
+ "inputs": {
+ "samples": [
+ "7",
+ 0
+ ],
+ "vae": [
+ "13",
+ 0
+ ]
+ },
+ "class_type": "VAEDecode",
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "15": {
+ "inputs": {
+ "images": [
+ "14",
+ 0
+ ]
+ },
+ "class_type": "PreviewImage",
+ "_meta": {
+ "title": "Preview Image"
+ }
+ },
+ "16": {
+ "inputs": {
+ "width": 512,
+ "height": 512,
+ "batch_size": 1
+ },
+ "class_type": "EmptyLatentImage",
+ "_meta": {
+ "title": "Empty Latent Image"
+ }
+ },
+ "23": {
+ "inputs": {
+ "clip_name": "CLIPText/model.fp16.safetensors",
+ "type": "stable_diffusion",
+ "device": "default"
+ },
+ "class_type": "CLIPLoader",
+ "_meta": {
+ "title": "Load CLIP"
+ }
+ }
+}
\ No newline at end of file
diff --git a/workflows/comfyui/sd15-multi-cnet-depthanything-face-dynamic.json b/workflows/comfyui/sd15-multi-cnet-depthanything-face-dynamic.json
new file mode 100644
index 00000000..e7547372
--- /dev/null
+++ b/workflows/comfyui/sd15-multi-cnet-depthanything-face-dynamic.json
@@ -0,0 +1,1176 @@
+{
+ "id": "00000000-0000-0000-0000-000000000000",
+ "revision": 0,
+ "last_node_id": 41,
+ "last_link_id": 56,
+ "nodes": [
+ {
+ "id": 2,
+ "type": "DepthAnythingTensorrt",
+ "pos": [
+ 515,
+ 1170
+ ],
+ "size": [
+ 315,
+ 58
+ ],
+ "flags": {},
+ "order": 11,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "images",
+ "type": "IMAGE",
+ "link": 29
+ }
+ ],
+ "outputs": [
+ {
+ "name": "IMAGE",
+ "type": "IMAGE",
+ "links": [
+ 39
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "DepthAnythingTensorrt"
+ },
+ "widgets_values": [
+ "depth_anything_vitl14-fp16.engine"
+ ]
+ },
+ {
+ "id": 5,
+ "type": "CLIPTextEncode",
+ "pos": [
+ 1018.199951171875,
+ 130
+ ],
+ "size": [
+ 400,
+ 200
+ ],
+ "flags": {},
+ "order": 14,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "clip",
+ "type": "CLIP",
+ "link": 30
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "links": [
+ 36,
+ 46
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "CLIPTextEncode"
+ },
+ "widgets_values": [
+ "beautiful pencil sketch, masterpiece "
+ ]
+ },
+ {
+ "id": 6,
+ "type": "CLIPTextEncode",
+ "pos": [
+ 1018.199951171875,
+ 460
+ ],
+ "size": [
+ 400,
+ 200
+ ],
+ "flags": {},
+ "order": 15,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "clip",
+ "type": "CLIP",
+ "link": 31
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "links": [
+ 37,
+ 47
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "CLIPTextEncode"
+ },
+ "widgets_values": [
+ ""
+ ]
+ },
+ {
+ "id": 7,
+ "type": "KSampler",
+ "pos": [
+ 2413.60009765625,
+ 130
+ ],
+ "size": [
+ 315,
+ 262
+ ],
+ "flags": {},
+ "order": 20,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 32
+ },
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "link": 33
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "link": 34
+ },
+ {
+ "name": "latent_image",
+ "type": "LATENT",
+ "link": 35
+ }
+ ],
+ "outputs": [
+ {
+ "name": "LATENT",
+ "type": "LATENT",
+ "links": [
+ 42
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "KSampler"
+ },
+ "widgets_values": [
+ 59790989568715,
+ "randomize",
+ 2,
+ 1,
+ "lcm",
+ "normal",
+ 1
+ ]
+ },
+ {
+ "id": 8,
+ "type": "ControlNetLoader",
+ "pos": [
+ 100,
+ 342
+ ],
+ "size": [
+ 315,
+ 58
+ ],
+ "flags": {},
+ "order": 0,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "CONTROL_NET",
+ "type": "CONTROL_NET",
+ "links": [
+ 40
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "ControlNetLoader"
+ },
+ "widgets_values": [
+ "control_v11f1p_sd15_depth_fp16.safetensors"
+ ]
+ },
+ {
+ "id": 9,
+ "type": "ControlNetApplyAdvanced",
+ "pos": [
+ 1518.199951171875,
+ 130
+ ],
+ "size": [
+ 315,
+ 186
+ ],
+ "flags": {},
+ "order": 16,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "link": 36
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "link": 37
+ },
+ {
+ "name": "control_net",
+ "type": "CONTROL_NET",
+ "link": 38
+ },
+ {
+ "name": "image",
+ "type": "IMAGE",
+ "link": 39
+ },
+ {
+ "name": "vae",
+ "shape": 7,
+ "type": "VAE",
+ "link": null
+ }
+ ],
+ "outputs": [
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "links": [
+ 53
+ ]
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "links": [
+ 51
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "ControlNetApplyAdvanced"
+ },
+ "widgets_values": [
+ 0.9000000000000001,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": 10,
+ "type": "TorchCompileLoadControlNet",
+ "pos": [
+ 515,
+ 414
+ ],
+ "size": [
+ 327.5999755859375,
+ 106
+ ],
+ "flags": {},
+ "order": 7,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "controlnet",
+ "type": "CONTROL_NET",
+ "link": 40
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONTROL_NET",
+ "type": "CONTROL_NET",
+ "links": [
+ 38
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "TorchCompileLoadControlNet"
+ },
+ "widgets_values": [
+ "inductor",
+ false,
+ "reduce-overhead"
+ ]
+ },
+ {
+ "id": 11,
+ "type": "VAELoader",
+ "pos": [
+ 100,
+ 530
+ ],
+ "size": [
+ 315,
+ 58
+ ],
+ "flags": {},
+ "order": 1,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "VAE",
+ "type": "VAE",
+ "links": [
+ 41
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "VAELoader"
+ },
+ "widgets_values": [
+ "taesd"
+ ]
+ },
+ {
+ "id": 13,
+ "type": "TorchCompileLoadVAE",
+ "pos": [
+ 515,
+ 650
+ ],
+ "size": [
+ 315,
+ 154
+ ],
+ "flags": {},
+ "order": 8,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "vae",
+ "type": "VAE",
+ "link": 41
+ }
+ ],
+ "outputs": [
+ {
+ "name": "VAE",
+ "type": "VAE",
+ "links": [
+ 43
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "TorchCompileLoadVAE"
+ },
+ "widgets_values": [
+ "inductor",
+ true,
+ "reduce-overhead",
+ true,
+ true
+ ]
+ },
+ {
+ "id": 14,
+ "type": "VAEDecode",
+ "pos": [
+ 2828.60009765625,
+ 130
+ ],
+ "size": [
+ 210,
+ 46
+ ],
+ "flags": {},
+ "order": 21,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "samples",
+ "type": "LATENT",
+ "link": 42
+ },
+ {
+ "name": "vae",
+ "type": "VAE",
+ "link": 43
+ }
+ ],
+ "outputs": [
+ {
+ "name": "IMAGE",
+ "type": "IMAGE",
+ "links": [
+ 44
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "VAEDecode"
+ },
+ "widgets_values": []
+ },
+ {
+ "id": 15,
+ "type": "PreviewImage",
+ "pos": [
+ 3138.60009765625,
+ 130
+ ],
+ "size": [
+ 210,
+ 246
+ ],
+ "flags": {},
+ "order": 22,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "images",
+ "type": "IMAGE",
+ "link": 44
+ }
+ ],
+ "outputs": [],
+ "properties": {
+ "Node name for S&R": "PreviewImage"
+ },
+ "widgets_values": []
+ },
+ {
+ "id": 16,
+ "type": "EmptyLatentImage",
+ "pos": [
+ 100,
+ 718
+ ],
+ "size": [
+ 315,
+ 106
+ ],
+ "flags": {},
+ "order": 2,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "LATENT",
+ "type": "LATENT",
+ "links": [
+ 35
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "EmptyLatentImage"
+ },
+ "widgets_values": [
+ 448,
+ 704,
+ 1
+ ]
+ },
+ {
+ "id": 18,
+ "type": "CLIPSetLastLayer",
+ "pos": [
+ 515,
+ 1758
+ ],
+ "size": [
+ 315,
+ 58
+ ],
+ "flags": {},
+ "order": 10,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "clip",
+ "type": "CLIP",
+ "link": 45
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CLIP",
+ "type": "CLIP",
+ "links": [
+ 30,
+ 31
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "CLIPSetLastLayer"
+ },
+ "widgets_values": [
+ -2
+ ]
+ },
+ {
+ "id": 19,
+ "type": "ControlNetApplyAdvanced",
+ "pos": [
+ 1518.199951171875,
+ 446
+ ],
+ "size": [
+ 315,
+ 186
+ ],
+ "flags": {},
+ "order": 17,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "link": 46
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "link": 47
+ },
+ {
+ "name": "control_net",
+ "type": "CONTROL_NET",
+ "link": 48
+ },
+ {
+ "name": "image",
+ "type": "IMAGE",
+ "link": 49
+ },
+ {
+ "name": "vae",
+ "shape": 7,
+ "type": "VAE",
+ "link": null
+ }
+ ],
+ "outputs": [
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "links": [
+ 54
+ ]
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "links": [
+ 52
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "ControlNetApplyAdvanced"
+ },
+ "widgets_values": [
+ 0.9000000000000001,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": 20,
+ "type": "ControlNetLoader",
+ "pos": [
+ 100,
+ 954
+ ],
+ "size": [
+ 315,
+ 58
+ ],
+ "flags": {},
+ "order": 3,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "CONTROL_NET",
+ "type": "CONTROL_NET",
+ "links": [
+ 50
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "ControlNetLoader"
+ },
+ "widgets_values": [
+ "control_v2p_sd15_mediapipe_face.safetensors"
+ ]
+ },
+ {
+ "id": 21,
+ "type": "TorchCompileLoadControlNet",
+ "pos": [
+ 515,
+ 934
+ ],
+ "size": [
+ 327.5999755859375,
+ 106
+ ],
+ "flags": {},
+ "order": 9,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "controlnet",
+ "type": "CONTROL_NET",
+ "link": 50
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONTROL_NET",
+ "type": "CONTROL_NET",
+ "links": [
+ 48
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "TorchCompileLoadControlNet"
+ },
+ "widgets_values": [
+ "inductor",
+ false,
+ "reduce-overhead"
+ ]
+ },
+ {
+ "id": 36,
+ "type": "CLIPLoader",
+ "pos": [
+ 100,
+ 1374
+ ],
+ "size": [
+ 315,
+ 98
+ ],
+ "flags": {},
+ "order": 4,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "CLIP",
+ "type": "CLIP",
+ "links": [
+ 45
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "CLIPLoader"
+ },
+ "widgets_values": [
+ "CLIPText/model.fp16.safetensors",
+ "stable_diffusion",
+ "default"
+ ]
+ },
+ {
+ "id": 37,
+ "type": "ConditioningConcat",
+ "pos": [
+ 1933.199951171875,
+ 306
+ ],
+ "size": [
+ 380.4000244140625,
+ 46
+ ],
+ "flags": {},
+ "order": 19,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "conditioning_to",
+ "type": "CONDITIONING",
+ "link": 51
+ },
+ {
+ "name": "conditioning_from",
+ "type": "CONDITIONING",
+ "link": 52
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "links": [
+ 34
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "ConditioningConcat"
+ },
+ "widgets_values": []
+ },
+ {
+ "id": 38,
+ "type": "ConditioningConcat",
+ "pos": [
+ 1933.199951171875,
+ 130
+ ],
+ "size": [
+ 380.4000244140625,
+ 46
+ ],
+ "flags": {},
+ "order": 18,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "conditioning_to",
+ "type": "CONDITIONING",
+ "link": 53
+ },
+ {
+ "name": "conditioning_from",
+ "type": "CONDITIONING",
+ "link": 54
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "links": [
+ 33
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "ConditioningConcat"
+ },
+ "widgets_values": []
+ },
+ {
+ "id": 39,
+ "type": "FaceMeshNode",
+ "pos": [
+ 515,
+ 1358
+ ],
+ "size": [
+ 315,
+ 270
+ ],
+ "flags": {},
+ "order": 12,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "image",
+ "type": "IMAGE",
+ "link": 55
+ }
+ ],
+ "outputs": [
+ {
+ "name": "facemesh_data",
+ "type": "FACEMESH_DATA",
+ "links": null
+ },
+ {
+ "name": "annotations",
+ "type": "IMAGE",
+ "links": [
+ 49
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "FaceMeshNode"
+ },
+ "widgets_values": [
+ false,
+ 1,
+ false,
+ 0.3500000000000001,
+ 0.3500000000000001,
+ true,
+ true,
+ "green",
+ 2
+ ]
+ },
+ {
+ "id": 41,
+ "type": "FeatureBankAttentionProcessor",
+ "pos": [
+ 515,
+ 130
+ ],
+ "size": [
+ 403.1999816894531,
+ 154
+ ],
+ "flags": {},
+ "order": 13,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 56
+ }
+ ],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "links": [
+ 32
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "FeatureBankAttentionProcessor"
+ },
+ "widgets_values": [
+ false,
+ 0.8000000000000002,
+ 0.9800000000000002,
+ 4,
+ 4
+ ]
+ },
+ {
+ "id": 26,
+ "type": "LoadImage",
+ "pos": [
+ 100,
+ 1142
+ ],
+ "size": [
+ 315,
+ 314
+ ],
+ "flags": {},
+ "order": 5,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "IMAGE",
+ "type": "IMAGE",
+ "links": [
+ 29,
+ 55
+ ]
+ },
+ {
+ "name": "MASK",
+ "type": "MASK",
+ "links": null
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "LoadImage"
+ },
+ "widgets_values": [
+ "example.png",
+ "image",
+ ""
+ ]
+ },
+ {
+ "id": 3,
+ "type": "TensorRTLoader",
+ "pos": [
+ 100,
+ 130
+ ],
+ "size": [
+ 315,
+ 82
+ ],
+ "flags": {},
+ "order": 6,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "links": [
+ 56
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "TensorRTLoader"
+ },
+ "widgets_values": [
+ "dynamic-dreamshaper8_SD15_$dyn-b-1-4-2-h-448-704-512-w-448-704-512_00001_.engine",
+ "SD15"
+ ]
+ }
+ ],
+ "links": [
+ [
+ 29,
+ 26,
+ 0,
+ 2,
+ 0,
+ "IMAGE"
+ ],
+ [
+ 30,
+ 18,
+ 0,
+ 5,
+ 0,
+ "CLIP"
+ ],
+ [
+ 31,
+ 18,
+ 0,
+ 6,
+ 0,
+ "CLIP"
+ ],
+ [
+ 32,
+ 41,
+ 0,
+ 7,
+ 0,
+ "MODEL"
+ ],
+ [
+ 33,
+ 38,
+ 0,
+ 7,
+ 1,
+ "CONDITIONING"
+ ],
+ [
+ 34,
+ 37,
+ 0,
+ 7,
+ 2,
+ "CONDITIONING"
+ ],
+ [
+ 35,
+ 16,
+ 0,
+ 7,
+ 3,
+ "LATENT"
+ ],
+ [
+ 36,
+ 5,
+ 0,
+ 9,
+ 0,
+ "CONDITIONING"
+ ],
+ [
+ 37,
+ 6,
+ 0,
+ 9,
+ 1,
+ "CONDITIONING"
+ ],
+ [
+ 38,
+ 10,
+ 0,
+ 9,
+ 2,
+ "CONTROL_NET"
+ ],
+ [
+ 39,
+ 2,
+ 0,
+ 9,
+ 3,
+ "IMAGE"
+ ],
+ [
+ 40,
+ 8,
+ 0,
+ 10,
+ 0,
+ "CONTROL_NET"
+ ],
+ [
+ 41,
+ 11,
+ 0,
+ 13,
+ 0,
+ "VAE"
+ ],
+ [
+ 42,
+ 7,
+ 0,
+ 14,
+ 0,
+ "LATENT"
+ ],
+ [
+ 43,
+ 13,
+ 0,
+ 14,
+ 1,
+ "VAE"
+ ],
+ [
+ 44,
+ 14,
+ 0,
+ 15,
+ 0,
+ "IMAGE"
+ ],
+ [
+ 45,
+ 36,
+ 0,
+ 18,
+ 0,
+ "CLIP"
+ ],
+ [
+ 46,
+ 5,
+ 0,
+ 19,
+ 0,
+ "CONDITIONING"
+ ],
+ [
+ 47,
+ 6,
+ 0,
+ 19,
+ 1,
+ "CONDITIONING"
+ ],
+ [
+ 48,
+ 21,
+ 0,
+ 19,
+ 2,
+ "CONTROL_NET"
+ ],
+ [
+ 49,
+ 39,
+ 1,
+ 19,
+ 3,
+ "IMAGE"
+ ],
+ [
+ 50,
+ 20,
+ 0,
+ 21,
+ 0,
+ "CONTROL_NET"
+ ],
+ [
+ 51,
+ 9,
+ 1,
+ 37,
+ 0,
+ "CONDITIONING"
+ ],
+ [
+ 52,
+ 19,
+ 1,
+ 37,
+ 1,
+ "CONDITIONING"
+ ],
+ [
+ 53,
+ 9,
+ 0,
+ 38,
+ 0,
+ "CONDITIONING"
+ ],
+ [
+ 54,
+ 19,
+ 0,
+ 38,
+ 1,
+ "CONDITIONING"
+ ],
+ [
+ 55,
+ 26,
+ 0,
+ 39,
+ 0,
+ "IMAGE"
+ ],
+ [
+ 56,
+ 3,
+ 0,
+ 41,
+ 0,
+ "MODEL"
+ ]
+ ],
+ "groups": [],
+ "config": {},
+ "extra": {
+ "ds": {
+ "scale": 0.6209213230591556,
+ "offset": [
+ 613.6321989855093,
+ -40.290581461085715
+ ]
+ }
+ },
+ "version": 0.4
+}
\ No newline at end of file
diff --git a/workflows/comfyui/sd15-multi-cnet-depthanything-o2o.json b/workflows/comfyui/sd15-multi-cnet-depthanything-o2o.json
index 164dcc69..339d20dc 100644
--- a/workflows/comfyui/sd15-multi-cnet-depthanything-o2o.json
+++ b/workflows/comfyui/sd15-multi-cnet-depthanything-o2o.json
@@ -218,24 +218,24 @@
"id": 9,
"type": "ControlNetApplyAdvanced",
"pos": [
- 1442.5999755859375,
- 130
+ 2194.300048828125,
+ 35.87420654296875
],
"size": [
- 315,
- 186
+ 380.4000244140625,
+ 46
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
- "name": "positive",
+ "name": "conditioning_to",
"type": "CONDITIONING",
"link": 34
},
{
- "name": "negative",
+ "name": "conditioning_from",
"type": "CONDITIONING",
"link": 35
},
@@ -258,7 +258,7 @@
],
"outputs": [
{
- "name": "positive",
+ "name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
49
@@ -284,11 +284,11 @@
]
},
{
- "id": 10,
- "type": "TorchCompileLoadControlNet",
+ "id": 30,
+ "type": "ConditioningConcat",
"pos": [
- 515,
- 130
+ 2174.00830078125,
+ 362.9764099121094
],
"size": [
327.5999755859375,
@@ -428,8 +428,8 @@
],
"outputs": [
{
- "name": "IMAGE",
- "type": "IMAGE",
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
"links": [
42
]
diff --git a/workflows/comfyui/utility/build-dynamic-tensorrt-engine.json b/workflows/comfyui/utility/build-dynamic-tensorrt-engine.json
new file mode 100644
index 00000000..9781663c
--- /dev/null
+++ b/workflows/comfyui/utility/build-dynamic-tensorrt-engine.json
@@ -0,0 +1,167 @@
+{
+ "id": "b94b9ee8-89f2-45d9-ba96-4b80c369957e",
+ "revision": 0,
+ "last_node_id": 6,
+ "last_link_id": 5,
+ "nodes": [
+ {
+ "id": 4,
+ "type": "ONNXModelSelector",
+ "pos": [
+ 395.43280029296875,
+ 764.8189697265625
+ ],
+ "size": [
+ 315,
+ 78
+ ],
+ "flags": {},
+ "order": 0,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "model_path",
+ "type": "STRING",
+ "links": [
+ 3
+ ]
+ },
+ {
+ "name": "model_name",
+ "type": "STRING",
+ "links": null
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "ONNXModelSelector"
+ },
+ "widgets_values": [
+ "dreamshaper8_fp8.onnx"
+ ]
+ },
+ {
+ "id": 1,
+ "type": "DYNAMIC_TRT_MODEL_CONVERSION",
+ "pos": [
+ 886.4519653320312,
+ 453.85260009765625
+ ],
+ "size": [
+ 352.79998779296875,
+ 394
+ ],
+ "flags": {},
+ "order": 2,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 5
+ },
+ {
+ "name": "onnx_model_path",
+ "shape": 7,
+ "type": "STRING",
+ "widget": {
+ "name": "onnx_model_path"
+ },
+ "link": 3
+ }
+ ],
+ "outputs": [],
+ "properties": {
+ "Node name for S&R": "DYNAMIC_TRT_MODEL_CONVERSION"
+ },
+ "widgets_values": [
+ "tensorrt/dynamic-dreamshaper8",
+ 1,
+ 2,
+ 4,
+ 448,
+ 512,
+ 704,
+ 448,
+ 512,
+ 704,
+ 1,
+ 1,
+ 128,
+ 14,
+ ""
+ ]
+ },
+ {
+ "id": 6,
+ "type": "CheckpointLoaderSimple",
+ "pos": [
+ 422.7054443359375,
+ 456.5543212890625
+ ],
+ "size": [
+ 315,
+ 98
+ ],
+ "flags": {},
+ "order": 1,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "links": [
+ 5
+ ]
+ },
+ {
+ "name": "CLIP",
+ "type": "CLIP",
+ "links": null
+ },
+ {
+ "name": "VAE",
+ "type": "VAE",
+ "links": null
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "CheckpointLoaderSimple"
+ },
+ "widgets_values": [
+ "SD1.5/dreamshaper-8.safetensors"
+ ]
+ }
+ ],
+ "links": [
+ [
+ 3,
+ 4,
+ 0,
+ 1,
+ 1,
+ "STRING"
+ ],
+ [
+ 5,
+ 6,
+ 0,
+ 1,
+ 0,
+ "MODEL"
+ ]
+ ],
+ "groups": [],
+ "config": {},
+ "extra": {
+ "ds": {
+ "scale": 1.2100000000000002,
+ "offset": [
+ 12.005354192121825,
+ -363.9923522048871
+ ]
+ }
+ },
+ "version": 0.4
+}
\ No newline at end of file