diff --git a/examples/device_selector_lowvram_flux_controlnet.json b/examples/device_selector_lowvram_flux_controlnet.json new file mode 100644 index 0000000..2993701 --- /dev/null +++ b/examples/device_selector_lowvram_flux_controlnet.json @@ -0,0 +1,2096 @@ +{ + "last_node_id": 162, + "last_link_id": 261, + "nodes": [ + { + "id": 88, + "type": "Reroute", + "pos": [ + 156.76731872558594, + -115.1278305053711 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 21, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 261, + "label": "" + } + ], + "outputs": [ + { + "name": "", + "type": "CLIP", + "links": [ + 147, + 210 + ], + "slot_index": 0, + "label": "" + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 89, + "type": "Reroute", + "pos": [ + 155.76731872558594, + -64.12783813476562 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 246, + "label": "" + } + ], + "outputs": [ + { + "name": "", + "type": "VAE", + "links": [ + 151, + 207 + ], + "slot_index": 0, + "label": "" + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 139, + "type": "EmptySD3LatentImage", + "pos": [ + 821.7671508789062, + 573.8721313476562 + ], + "size": [ + 315, + 106 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 222 + ], + "slot_index": 0, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "EmptySD3LatentImage" + }, + "widgets_values": [ + 768, + 768, + 1 + ] + }, + { + "id": 72, + "type": "CLIPTextEncodeFlux", + "pos": [ + 635.7671508789062, + -120.12781524658203 + ], + "size": [ + 219.3687286376953, + 108 + ], + "flags": {}, + "order": 25, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 147, + "label": "clip" + }, + { + "name": "t5xxl", + "type": "STRING", + "link": 199, + "widget": { + "name": "t5xxl" + }, + "label": "t5xxl" + }, + { + "name": "clip_l", + "type": "STRING", + "link": 200, + "widget": { + "name": "clip_l" + }, + "label": "clip_l" + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 208 + ], + "slot_index": 0, + "shape": 3, + "label": "CONDITIONING" + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncodeFlux" + }, + "widgets_values": [ + "", + "", + 3.5 + ] + }, + { + "id": 131, + "type": "CLIPTextEncodeFlux", + "pos": [ + 897.7671508789062, + -151.12783813476562 + ], + "size": [ + 222.8309326171875, + 160 + ], + "flags": {}, + "order": 26, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 210, + "label": "clip" + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 209 + ], + "slot_index": 0, + "shape": 3, + "label": "CONDITIONING" + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncodeFlux" + }, + "widgets_values": [ + "", + "bad,ugly,deformed", + 3.5 + ] + }, + { + "id": 87, + "type": "Reroute", + "pos": [ + 159.76731872558594, + -170.12783813476562 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 24, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 259, + "label": "" + } + ], + "outputs": [ + { + "name": "", + "type": "MODEL", + "links": [ + 148, + 227 + ], + "slot_index": 0, + "label": "" + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 16, + "type": "KSamplerSelect", + "pos": [ + 823.7671508789062, + 283.8721923828125 + ], + "size": [ + 256.2611999511719, + 58 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "SAMPLER", + "type": "SAMPLER", + "links": [ + 172 + ], + "slot_index": 0, + "shape": 3, + "label": "SAMPLER" + } + ], + "properties": { + "Node name for S&R": "KSamplerSelect" + }, + "widgets_values": [ + "euler" + ] + }, + { + "id": 138, + "type": "GrowMaskWithBlur", + "pos": [ + 715.314453125, + -571.8499755859375 + ], + "size": [ + 315, + 246 + ], + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 254, + "label": "mask" + } + ], + "outputs": [ + { + "name": "mask", + "type": "MASK", + "links": [ + 218, + 219 + ], + "slot_index": 0, + "shape": 3, + "label": "mask" + }, + { + "name": "mask_inverted", + "type": "MASK", + "links": null, + "shape": 3, + "label": "mask_inverted" + } + ], + "properties": { + "Node name for S&R": "GrowMaskWithBlur" + }, + "widgets_values": [ + 2, + 0, + false, + false, + 2, + 1, + 1, + false + ] + }, + { + "id": 144, + "type": "ImageCompositeMasked", + "pos": [ + 1607, + -460 + ], + "size": [ + 315, + 146 + ], + "flags": {}, + "order": 35, + "mode": 0, + "inputs": [ + { + "name": "destination", + "type": "IMAGE", + "link": 252 + }, + { + "name": "source", + "type": "IMAGE", + "link": 232 + }, + { + "name": "mask", + "type": "MASK", + "link": 253, + "shape": 7 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 235 + ], + "slot_index": 0, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "ImageCompositeMasked" + }, + "widgets_values": [ + 0, + 0, + true + ] + }, + { + "id": 11, + "type": "DualCLIPLoader", + "pos": [ + -765.1583251953125, + -25.78927993774414 + ], + "size": [ + 315, + 106 + ], + "flags": {}, + "order": 2, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "links": [], + "slot_index": 0, + "shape": 3, + "label": "CLIP" + } + ], + "properties": { + "Node name for S&R": "DualCLIPLoader" + }, + "widgets_values": [ + "t5xxl_fp16.safetensors", + "clip_l.safetensors", + "flux", + "default" + ] + }, + { + "id": 10, + "type": "VAELoader", + "pos": [ + -758.1583251953125, + 131.21072387695312 + ], + "size": [ + 305.9473876953125, + 68.47245788574219 + ], + "flags": {}, + "order": 3, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "links": [], + "slot_index": 0, + "shape": 3, + "label": "VAE" + } + ], + "properties": { + "Node name for S&R": "VAELoader" + }, + "widgets_values": [ + "ae.safetensors" + ] + }, + { + "id": 140, + "type": "Image Comparer (rgthree)", + "pos": [ + 1618, + 306 + ], + "size": [ + 357.58453369140625, + 424.3191223144531 + ], + "flags": {}, + "order": 36, + "mode": 0, + "inputs": [ + { + "name": "image_a", + "type": "IMAGE", + "link": 257, + "dir": 3 + }, + { + "name": "image_b", + "type": "IMAGE", + "link": 258, + "dir": 3 + } + ], + "outputs": [], + "properties": { + "comparer_mode": "Slide" + }, + "widgets_values": [ + [ + { + "name": "A", + "selected": true, + "url": "/api/view?filename=rgthree.compare._temp_aiquf_00001_.png&type=temp&subfolder=&rand=0.7136088422570062" + }, + { + "name": "B", + "selected": true, + "url": "/api/view?filename=rgthree.compare._temp_aiquf_00002_.png&type=temp&subfolder=&rand=0.40638695219949295" + } + ] + ] + }, + { + "id": 111, + "type": "ShowText|pysssss", + "pos": [ + 250.7672882080078, + 517.8721923828125 + ], + "size": [ + 407.2326354980469, + 219.7727508544922 + ], + "flags": {}, + "order": 22, + "mode": 0, + "inputs": [ + { + "name": "text", + "type": "STRING", + "link": 180, + "widget": { + "name": "text" + }, + "label": "text" + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [], + "slot_index": 0, + "shape": 6, + "label": "STRING" + } + ], + "properties": { + "Node name for S&R": "ShowText|pysssss" + }, + "widgets_values": [ + [ + "The image depicts a scene from the anime series Dragon Ball Z, with the characters Goku, Elon Musk, and a child version of Gohan sharing a meal of ramen noodles. They are all sitting around a dining table, with Goku and Gohan on one side and Naruto on the other. They are all holding chopsticks and eating the noodles. The table is set with bowls of ramen, cups, and bowls of drinks. The arrangement of the characters and the food creates a sense of camaraderie and shared enjoyment of the meal." + ], + "The image depicts a beautiful young woman sitting at a desk, reading a book. She has long, wavy brown hair and is wearing a grey shirt with a black cardigan. She is holding a red pencil in her left hand and appears to be deep in thought. Surrounding her are numerous books, some stacked on the desk and others placed on a shelf behind her. A potted plant is also visible in the background, adding a touch of greenery to the scene. The image conveys a sense of serenity and intellectual pursuits." + ] + }, + { + "id": 124, + "type": "Text Concatenate (JPS)", + "pos": [ + 314, + -127 + ], + "size": [ + 219.5895233154297, + 138 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "text1", + "type": "STRING", + "link": null, + "widget": { + "name": "text1" + }, + "label": "text1" + }, + { + "name": "text2", + "type": "STRING", + "link": null, + "widget": { + "name": "text2" + }, + "label": "text2" + }, + { + "name": "text3", + "type": "STRING", + "link": null, + "widget": { + "name": "text3" + }, + "label": "text3" + }, + { + "name": "text4", + "type": "STRING", + "link": null, + "widget": { + "name": "text4" + }, + "label": "text4" + }, + { + "name": "text5", + "type": "STRING", + "link": null, + "widget": { + "name": "text5" + }, + "label": "text5" + } + ], + "outputs": [ + { + "name": "text", + "type": "STRING", + "links": [ + 198 + ], + "slot_index": 0, + "shape": 3, + "label": "text" + } + ], + "properties": { + "Node name for S&R": "Text Concatenate (JPS)" + }, + "widgets_values": [ + "comma", + "", + "", + "", + "", + "" + ] + }, + { + "id": 17, + "type": "BasicScheduler", + "pos": [ + 825.7671508789062, + 409.8721923828125 + ], + "size": [ + 315, + 106 + ], + "flags": {}, + "order": 28, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 148, + "slot_index": 0, + "label": "model" + } + ], + "outputs": [ + { + "name": "SIGMAS", + "type": "SIGMAS", + "links": [ + 20 + ], + "shape": 3, + "label": "SIGMAS" + } + ], + "properties": { + "Node name for S&R": "BasicScheduler" + }, + "widgets_values": [ + "normal", + 28, + 1 + ] + }, + { + "id": 149, + "type": "PreviewImage", + "pos": [ + 670, + -892 + ], + "size": [ + 408.4986267089844, + 246 + ], + "flags": {}, + "order": 30, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 240, + "label": "images" + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [] + }, + { + "id": 12, + "type": "UNETLoader", + "pos": [ + -759.1583251953125, + -158.789306640625 + ], + "size": [ + 308.9964904785156, + 83.4256591796875 + ], + "flags": {}, + "order": 5, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [], + "slot_index": 0, + "shape": 3, + "label": "MODEL" + } + ], + "properties": { + "Node name for S&R": "UNETLoader" + }, + "widgets_values": [ + "flux1-dev-fp8.safetensors", + "fp8_e4m3fn" + ] + }, + { + "id": 128, + "type": "ControlNetInpaintingAliMamaApply", + "pos": [ + 1080, + -538 + ], + "size": [ + 403.1999816894531, + 206 + ], + "flags": {}, + "order": 29, + "mode": 0, + "inputs": [ + { + "name": "positive", + "type": "CONDITIONING", + "link": 208, + "label": "positive" + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 209, + "label": "negative" + }, + { + "name": "control_net", + "type": "CONTROL_NET", + "link": 247, + "label": "control_net" + }, + { + "name": "vae", + "type": "VAE", + "link": 207, + "label": "vae" + }, + { + "name": "image", + "type": "IMAGE", + "link": 255, + "label": "image" + }, + { + "name": "mask", + "type": "MASK", + "link": 218, + "label": "mask" + } + ], + "outputs": [ + { + "name": "positive", + "type": "CONDITIONING", + "links": [ + 230 + ], + "slot_index": 0, + "shape": 3, + "label": "positive" + }, + { + "name": "negative", + "type": "CONDITIONING", + "links": [ + 229 + ], + "slot_index": 1, + "shape": 3, + "label": "negative" + } + ], + "properties": { + "Node name for S&R": "ControlNetInpaintingAliMamaApply" + }, + "widgets_values": [ + 0.9, + 0, + 1 + ] + }, + { + "id": 141, + "type": "CFGGuider", + "pos": [ + 1194.839599609375, + -164.75381469726562 + ], + "size": [ + 315, + 98 + ], + "flags": {}, + "order": 31, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 227 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 230 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 229 + } + ], + "outputs": [ + { + "name": "GUIDER", + "type": "GUIDER", + "links": [ + 228 + ], + "slot_index": 0, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CFGGuider" + }, + "widgets_values": [ + 3.5 + ] + }, + { + "id": 35, + "type": "StringFunction|pysssss", + "pos": [ + 234, + 72 + ], + "size": [ + 438.01171875, + 381.4057922363281 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "text_c", + "type": "STRING", + "link": 198, + "widget": { + "name": "text_c" + }, + "label": "text_c" + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 180, + 199, + 200 + ], + "slot_index": 0, + "shape": 3, + "label": "STRING" + } + ], + "properties": { + "Node name for S&R": "StringFunction|pysssss" + }, + "widgets_values": [ + "append", + "no", + "The image depicts a beautiful young woman sitting at a desk, reading a book. She has long, wavy brown hair and is wearing a grey shirt with a black cardigan. She is holding a red pencil in her left hand and appears to be deep in thought. Surrounding her are numerous books, some stacked on the desk and others placed on a shelf behind her. A potted plant is also visible in the background, adding a touch of greenery to the scene. The image conveys a sense of serenity and intellectual pursuits.", + "", + "", + "The image depicts a beautiful young woman sitting at a desk, reading a book. She has long, wavy brown hair and is wearing a grey shirt with a black cardigan. She is holding a red pencil in her left hand and appears to be deep in thought. Surrounding her are numerous books, some stacked on the desk and others placed on a shelf behind her. A potted plant is also visible in the background, adding a touch of greenery to the scene. The image conveys a sense of serenity and intellectual pursuits." + ] + }, + { + "id": 13, + "type": "SamplerCustomAdvanced", + "pos": [ + 1206.2874755859375, + -44.936370849609375 + ], + "size": [ + 266.6016845703125, + 326 + ], + "flags": {}, + "order": 32, + "mode": 0, + "inputs": [ + { + "name": "noise", + "type": "NOISE", + "link": 174, + "slot_index": 0, + "label": "noise" + }, + { + "name": "guider", + "type": "GUIDER", + "link": 228, + "slot_index": 1, + "label": "guider" + }, + { + "name": "sampler", + "type": "SAMPLER", + "link": 172, + "slot_index": 2, + "label": "sampler" + }, + { + "name": "sigmas", + "type": "SIGMAS", + "link": 20, + "slot_index": 3, + "label": "sigmas" + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 222, + "slot_index": 4, + "label": "latent_image" + } + ], + "outputs": [ + { + "name": "output", + "type": "LATENT", + "links": [ + 24 + ], + "slot_index": 0, + "shape": 3, + "label": "output" + }, + { + "name": "denoised_output", + "type": "LATENT", + "links": null, + "shape": 3, + "label": "denoised_output" + } + ], + "properties": { + "Node name for S&R": "SamplerCustomAdvanced" + }, + "widgets_values": [] + }, + { + "id": 134, + "type": "MaskToImage", + "pos": [ + 293.1459655761719, + -878.2982177734375 + ], + "size": [ + 176.39999389648438, + 29.597196578979492 + ], + "flags": {}, + "order": 23, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 219, + "label": "mask" + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 241 + ], + "slot_index": 0, + "shape": 3, + "label": "IMAGE" + } + ], + "properties": { + "Node name for S&R": "MaskToImage" + }, + "widgets_values": [] + }, + { + "id": 145, + "type": "PreviewImage", + "pos": [ + 2022.2503662109375, + 299.07696533203125 + ], + "size": [ + 434.4592590332031, + 423.6662292480469 + ], + "flags": {}, + "order": 37, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 235, + "label": "images" + } + ], + "outputs": [], + "title": "Compose", + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [ + 1513.767333984375, + 140.87216186523438 + ], + "size": [ + 210, + 46 + ], + "flags": {}, + "order": 33, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 24, + "label": "samples" + }, + { + "name": "vae", + "type": "VAE", + "link": 151, + "label": "vae" + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 127, + 232, + 258 + ], + "slot_index": 0, + "label": "IMAGE" + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + }, + "widgets_values": [] + }, + { + "id": 158, + "type": "LoadImageFromUrl", + "pos": [ + 242.51055908203125, + -787.9491577148438 + ], + "size": [ + 340.3285217285156, + 503.4264831542969 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "images", + "type": "IMAGE", + "links": [ + 250, + 252, + 255, + 257 + ], + "slot_index": 0, + "shape": 6 + }, + { + "name": "masks", + "type": "MASK", + "links": [ + 251, + 253, + 254 + ], + "slot_index": 1, + "shape": 6 + }, + { + "name": "has_image", + "type": "BOOLEAN", + "links": null + } + ], + "properties": { + "Node name for S&R": "LoadImageFromUrl" + }, + "widgets_values": { + "image": "https://raw.githubusercontent.com/pollockjj/ComfyUI-MultiGPU/dev/assets/test_images/example_inpaint_MultiGPU.png", + "keep_alpha_channel": false, + "output_mode": false, + "choose image to upload": "image" + } + }, + { + "id": 148, + "type": "ImageCompositeMasked", + "pos": [ + 1103.3099365234375, + -864.6226196289062 + ], + "size": [ + 315, + 146 + ], + "flags": {}, + "order": 27, + "mode": 0, + "inputs": [ + { + "name": "destination", + "type": "IMAGE", + "link": 250 + }, + { + "name": "source", + "type": "IMAGE", + "link": 241 + }, + { + "name": "mask", + "type": "MASK", + "link": 251, + "shape": 7 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 240 + ], + "slot_index": 0, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "ImageCompositeMasked" + }, + "widgets_values": [ + 0, + 0, + false + ] + }, + { + "id": 133, + "type": "ControlNetLoader", + "pos": [ + -357.3689880371094, + -514.8705444335938 + ], + "size": [ + 354.49285888671875, + 66.2697525024414 + ], + "flags": {}, + "order": 7, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "CONTROL_NET", + "type": "CONTROL_NET", + "links": [], + "slot_index": 0, + "shape": 3, + "label": "CONTROL_NET" + } + ], + "properties": { + "Node name for S&R": "ControlNetLoader" + }, + "widgets_values": [ + "cn-inpaint-alpha.safetensors" + ] + }, + { + "id": 130, + "type": "LoadImage", + "pos": [ + 249.4192657470703, + -1287.3426513671875 + ], + "size": [ + 210, + 314 + ], + "flags": {}, + "order": 8, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [], + "slot_index": 0, + "shape": 3, + "label": "IMAGE" + }, + { + "name": "MASK", + "type": "MASK", + "links": [], + "slot_index": 1, + "shape": 3, + "label": "MASK" + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "example_inpaint (1).png", + "image" + ] + }, + { + "id": 155, + "type": "VAELoaderMultiGPU", + "pos": [ + -331.2371520996094, + 145.98760986328125 + ], + "size": [ + 315, + 82 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "links": [ + 246 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAELoaderMultiGPU" + }, + "widgets_values": [ + "ae.safetensors", + "cpu" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 76, + "type": "SaveImage", + "pos": [ + 1212, + 300 + ], + "size": [ + 367.42144775390625, + 406.4285888671875 + ], + "flags": {}, + "order": 34, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 127, + "label": "images" + } + ], + "outputs": [], + "title": "Model Output", + "properties": { + "Node name for S&R": "SaveImage" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 157, + "type": "DeviceSelectorMultiGPU", + "pos": [ + -753.5366821289062, + -369.59674072265625 + ], + "size": [ + 315, + 58 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "device", + "type": "COMBO", + "links": [ + 248, + 249, + 260 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "DeviceSelectorMultiGPU" + }, + "widgets_values": [ + "cuda:0" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 161, + "type": "UnetLoaderGGUFMultiGPU", + "pos": [ + -338.5650939941406, + -176.5059814453125 + ], + "size": [ + 315, + 82 + ], + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [ + { + "name": "device", + "type": "COMBO", + "link": 260, + "widget": { + "name": "device" + }, + "shape": 7 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 259 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "UnetLoaderGGUFMultiGPU" + }, + "widgets_values": [ + "flux1-dev-Q2_K.gguf", + "cuda:0" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 153, + "type": "UNETLoaderMultiGPU", + "pos": [ + -769.8582763671875, + 287.21417236328125 + ], + "size": [ + 315, + 106 + ], + "flags": {}, + "order": 19, + "mode": 4, + "inputs": [ + { + "name": "device", + "type": "COMBO", + "link": 249, + "widget": { + "name": "device" + }, + "shape": 7 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "UNETLoaderMultiGPU" + }, + "widgets_values": [ + "flux1-dev-fp8.safetensors", + "fp8_e4m3fn", + "cuda:1" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 156, + "type": "ControlNetLoaderMultiGPU", + "pos": [ + -348.0879821777344, + -381.69091796875 + ], + "size": [ + 346.8614501953125, + 82 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "name": "device", + "type": "COMBO", + "link": 248, + "widget": { + "name": "device" + }, + "shape": 7 + } + ], + "outputs": [ + { + "name": "CONTROL_NET", + "type": "CONTROL_NET", + "links": [ + 247 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ControlNetLoaderMultiGPU" + }, + "widgets_values": [ + "cn-inpaint-alpha.safetensors", + "cuda:1" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 162, + "type": "DualCLIPLoaderGGUFMultiGPU", + "pos": [ + -343.19244384765625, + -42.44999313354492 + ], + "size": [ + 327.5999755859375, + 130 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 261 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "DualCLIPLoaderGGUFMultiGPU" + }, + "widgets_values": [ + "t5-v1_1-xxl-encoder-Q4_K_M.gguf", + "clip_l.safetensors", + "flux", + "cpu" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 154, + "type": "DualCLIPLoaderMultiGPU", + "pos": [ + -768.2605590820312, + 441.2303466796875 + ], + "size": [ + 315, + 130 + ], + "flags": {}, + "order": 12, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "links": [], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "DualCLIPLoaderMultiGPU" + }, + "widgets_values": [ + "t5xxl_fp16.safetensors", + "clip_l.safetensors", + "flux", + "cpu" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 25, + "type": "RandomNoise", + "pos": [ + 825.7671508789062, + 134.8721466064453 + ], + "size": [ + 290.9759216308594, + 82 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "NOISE", + "type": "NOISE", + "links": [ + 174 + ], + "shape": 3, + "label": "NOISE" + } + ], + "properties": { + "Node name for S&R": "RandomNoise" + }, + "widgets_values": [ + 5770521, + "fixed" + ] + }, + { + "id": 160, + "type": "Note", + "pos": [ + -760.862060546875, + -731.6756591796875 + ], + "size": [ + 370.59625244140625, + 270.3796081542969 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "This workflow shows how to use the DeviceSelectorMultiGPU node to link two loaders together to the same device, such as a model and controlnet.\n\n\nUses this model: https://huggingface.co/alimama-creative/FLUX.1-dev-Controlnet-Inpainting-Alpha/tree/main (rename to cn-inpaint-alpha.safetensors and place in controlnet folder." + ], + "color": "#432", + "bgcolor": "#653" + } + ], + "links": [ + [ + 20, + 17, + 0, + 13, + 3, + "SIGMAS" + ], + [ + 24, + 13, + 0, + 8, + 0, + "LATENT" + ], + [ + 127, + 8, + 0, + 76, + 0, + "IMAGE" + ], + [ + 147, + 88, + 0, + 72, + 0, + "CLIP" + ], + [ + 148, + 87, + 0, + 17, + 0, + "MODEL" + ], + [ + 151, + 89, + 0, + 8, + 1, + "VAE" + ], + [ + 172, + 16, + 0, + 13, + 2, + "SAMPLER" + ], + [ + 174, + 25, + 0, + 13, + 0, + "NOISE" + ], + [ + 180, + 35, + 0, + 111, + 0, + "STRING" + ], + [ + 198, + 124, + 0, + 35, + 0, + "STRING" + ], + [ + 199, + 35, + 0, + 72, + 1, + "STRING" + ], + [ + 200, + 35, + 0, + 72, + 2, + "STRING" + ], + [ + 207, + 89, + 0, + 128, + 3, + "VAE" + ], + [ + 208, + 72, + 0, + 128, + 0, + "CONDITIONING" + ], + [ + 209, + 131, + 0, + 128, + 1, + "CONDITIONING" + ], + [ + 210, + 88, + 0, + 131, + 0, + "CLIP" + ], + [ + 218, + 138, + 0, + 128, + 5, + "MASK" + ], + [ + 219, + 138, + 0, + 134, + 0, + "MASK" + ], + [ + 222, + 139, + 0, + 13, + 4, + "LATENT" + ], + [ + 227, + 87, + 0, + 141, + 0, + "MODEL" + ], + [ + 228, + 141, + 0, + 13, + 1, + "GUIDER" + ], + [ + 229, + 128, + 1, + 141, + 2, + "CONDITIONING" + ], + [ + 230, + 128, + 0, + 141, + 1, + "CONDITIONING" + ], + [ + 232, + 8, + 0, + 144, + 1, + "IMAGE" + ], + [ + 235, + 144, + 0, + 145, + 0, + "IMAGE" + ], + [ + 240, + 148, + 0, + 149, + 0, + "IMAGE" + ], + [ + 241, + 134, + 0, + 148, + 1, + "IMAGE" + ], + [ + 246, + 155, + 0, + 89, + 0, + "*" + ], + [ + 247, + 156, + 0, + 128, + 2, + "CONTROL_NET" + ], + [ + 248, + 157, + 0, + 156, + 0, + "COMBO" + ], + [ + 249, + 157, + 0, + 153, + 0, + "COMBO" + ], + [ + 250, + 158, + 0, + 148, + 0, + "IMAGE" + ], + [ + 251, + 158, + 1, + 148, + 2, + "MASK" + ], + [ + 252, + 158, + 0, + 144, + 0, + "IMAGE" + ], + [ + 253, + 158, + 1, + 144, + 2, + "MASK" + ], + [ + 254, + 158, + 1, + 138, + 0, + "MASK" + ], + [ + 255, + 158, + 0, + 128, + 4, + "IMAGE" + ], + [ + 257, + 158, + 0, + 140, + 0, + "IMAGE" + ], + [ + 258, + 8, + 0, + 140, + 1, + "IMAGE" + ], + [ + 259, + 161, + 0, + 87, + 0, + "*" + ], + [ + 260, + 157, + 0, + 161, + 0, + "COMBO" + ], + [ + 261, + 162, + 0, + 88, + 0, + "*" + ] + ], + "groups": [ + { + "id": 1, + "title": "AliMama Inpainting", + "bounding": [ + 214, + -963, + 1341, + 687 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 2, + "title": "FLUX-Text2Image", + "bounding": [ + 146, + -241, + 1747, + 989 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 3, + "title": "Load Model", + "bounding": [ + -785.1583251953125, + -253.7894287109375, + 365, + 491 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 4, + "title": "Load Model - MultiGPU", + "bounding": [ + -361.6991271972656, + -260.1966552734375, + 365, + 491 + ], + "color": "#8AA", + "font_size": 24, + "flags": {} + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.5989500000000829, + "offset": [ + 1537.7853104263077, + 1078.5772276337652 + ] + }, + "workspace_info": { + "id": "sSr80zkRsolLQHBh3oFSe", + "saveLock": false, + "cloudID": null, + "coverMediaPath": null + }, + "0246.VERSION": [ + 0, + 0, + 4 + ], + "ue_links": [], + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "node_versions": { + "comfy-core": "0.3.10", + "comfyui-kjnodes": "31cb7c1d14f86881ad34654a250d5e7682430fee", + "rgthree-comfy": "5d771b8b56a343c24a26e8cea1f0c87c3d58102f", + "ComfyUI-Universal-Styler": "bfe88489ff250a84bc25c210d84a58135f9a8a8f", + "ComfyUI_JPS-Nodes": "0e2a9aca02b17dde91577bfe4b65861df622dcaf", + "comfyui-custom-scripts": "dff506c7dea0e715f05518354f1f7e1986609703", + "comfyui-art-venture": "50abaace756b96f5f5dc2c9d72826ef371afd45e", + "ComfyUI-MultiGPU": "3814340e45a293075cdc2f1a27e6e2427c53671a" + } + }, + "version": 0.4 +} \ No newline at end of file diff --git a/examples/hunyuanvideowrapper_native_vae.json b/examples/hunyuanvideowrapper_native_vae.json new file mode 100644 index 0000000..b6320f5 --- /dev/null +++ b/examples/hunyuanvideowrapper_native_vae.json @@ -0,0 +1,717 @@ +{ + "last_node_id": 51, + "last_link_id": 70, + "nodes": [ + { + "id": 7, + "type": "HyVideoVAELoader", + "pos": [ + -980.2922973632812, + -830.076171875 + ], + "size": [ + 379.166748046875, + 82 + ], + "flags": {}, + "order": 0, + "mode": 4, + "inputs": [ + { + "name": "compile_args", + "type": "COMPILEARGS", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "vae", + "type": "VAE", + "links": [], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoVAELoader" + }, + "widgets_values": [ + "hunyuan_video_vae_bf16.safetensors", + "bf16" + ], + "color": "#332922", + "bgcolor": "#593930" + }, + { + "id": 30, + "type": "HyVideoTextEncode", + "pos": [ + -194.8070831298828, + -79.95932006835938 + ], + "size": [ + 425.64068603515625, + 286.85968017578125 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "text_encoders", + "type": "HYVIDTEXTENCODER", + "link": 66 + }, + { + "name": "custom_prompt_template", + "type": "PROMPT_TEMPLATE", + "link": null, + "shape": 7 + }, + { + "name": "clip_l", + "type": "CLIP", + "link": null, + "shape": 7 + }, + { + "name": "hyvid_cfg", + "type": "HYVID_CFG", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "hyvid_embeds", + "type": "HYVIDEMBEDS", + "links": [ + 36 + ] + } + ], + "properties": { + "Node name for S&R": "HyVideoTextEncode" + }, + "widgets_values": [ + "A serene Minnesota lake stretches out at sunset, the water's surface a mirror reflecting the vibrant orange and pink sky. In the foreground, a pair of loons glide gracefully across the water, their sleek black and white feathers contrasting with the warm hues of the sunset. The loons' long, slender necks curve elegantly as they dip their heads into the water, searching for fish. The camera pans slowly from left to right, capturing the tranquil scene. The shoreline is visible in the distance, lined with tall pine trees that cast long shadows across the water. The loons' haunting calls echo across the lake, adding to the peaceful atmosphere.", + false, + "video" + ] + }, + { + "id": 49, + "type": "DownloadAndLoadHyVideoTextEncoderMultiGPU", + "pos": [ + -745.2869262695312, + -80.3648452758789 + ], + "size": [ + 516.5999755859375, + 202 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "hyvid_text_encoder", + "type": "HYVIDTEXTENCODER", + "links": [ + 66 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "DownloadAndLoadHyVideoTextEncoderMultiGPU" + }, + "widgets_values": [ + "Kijai/llava-llama-3-8b-text-encoder-tokenizer", + "disabled", + "bf16", + false, + 2, + "disabled", + "cuda:1" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 48, + "type": "HyVideoModelLoaderMultiGPU", + "pos": [ + -338.0295715332031, + -403.1601257324219 + ], + "size": [ + 497.3603210449219, + 252.03509521484375 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "compile_args", + "type": "COMPILEARGS", + "link": null, + "shape": 7 + }, + { + "name": "block_swap_args", + "type": "BLOCKSWAPARGS", + "link": null, + "shape": 7 + }, + { + "name": "lora", + "type": "HYVIDLORA", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "model", + "type": "HYVIDEOMODEL", + "links": [ + 65 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoModelLoaderMultiGPU" + }, + "widgets_values": [ + "hunyuan_video_720_cfgdistill_fp8_e4m3fn.safetensors", + "fp32", + "fp8_e4m3fn", + "main_device", + "sdpa", + false, + "cuda:0" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 16, + "type": "DownloadAndLoadHyVideoTextEncoder", + "pos": [ + -1011.1117553710938, + -1076.6143798828125 + ], + "size": [ + 441, + 178 + ], + "flags": {}, + "order": 3, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "hyvid_text_encoder", + "type": "HYVIDTEXTENCODER", + "links": [] + } + ], + "properties": { + "Node name for S&R": "DownloadAndLoadHyVideoTextEncoder" + }, + "widgets_values": [ + "Kijai/llava-llama-3-8b-text-encoder-tokenizer", + "openai/clip-vit-large-patch14", + "fp16", + false, + 2, + "disabled" + ], + "color": "#332922", + "bgcolor": "#593930" + }, + { + "id": 1, + "type": "HyVideoModelLoader", + "pos": [ + -557.619384765625, + -1092.4908447265625 + ], + "size": [ + 435.37628173828125, + 221.34506225585938 + ], + "flags": {}, + "order": 4, + "mode": 4, + "inputs": [ + { + "name": "compile_args", + "type": "COMPILEARGS", + "link": null, + "shape": 7 + }, + { + "name": "block_swap_args", + "type": "BLOCKSWAPARGS", + "link": null, + "shape": 7 + }, + { + "name": "lora", + "type": "HYVIDLORA", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "model", + "type": "HYVIDEOMODEL", + "links": [], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoModelLoader" + }, + "widgets_values": [ + "hunyuan_video_720_cfgdistill_fp8_e4m3fn.safetensors", + "bf16", + "fp8_e4m3fn", + "main_device", + "sdpa", + false + ], + "color": "#332922", + "bgcolor": "#593930" + }, + { + "id": 34, + "type": "VHS_VideoCombine", + "pos": [ + 847.0758666992188, + -415.1882629394531 + ], + "size": [ + 580.7774658203125, + 698.4859008789062 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 69 + }, + { + "name": "audio", + "type": "AUDIO", + "link": null, + "shape": 7 + }, + { + "name": "meta_batch", + "type": "VHS_BatchManager", + "link": null, + "shape": 7 + }, + { + "name": "vae", + "type": "VAE", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "Filenames", + "type": "VHS_FILENAMES", + "links": null + } + ], + "properties": { + "Node name for S&R": "VHS_VideoCombine" + }, + "widgets_values": { + "frame_rate": 24, + "loop_count": 0, + "filename_prefix": "HunyuanVideo", + "format": "video/h264-mp4", + "pix_fmt": "yuv420p", + "crf": 19, + "save_metadata": true, + "trim_to_audio": false, + "pingpong": false, + "save_output": true, + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "HunyuanVideo_00161.mp4", + "subfolder": "", + "type": "output", + "format": "video/h264-mp4", + "frame_rate": 24, + "workflow": "HunyuanVideo_00161.png", + "fullpath": "/home/johnj/ComfyUI/output/HunyuanVideo_00161.mp4" + }, + "muted": false + } + } + }, + { + "id": 45, + "type": "VAEDecodeTiled", + "pos": [ + 532.4385986328125, + -644.8389282226562 + ], + "size": [ + 315, + 150 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 70 + }, + { + "name": "vae", + "type": "VAE", + "link": 56 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 69 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecodeTiled" + }, + "widgets_values": [ + 256, + 64, + 64, + 8 + ] + }, + { + "id": 44, + "type": "VAELoaderMultiGPU", + "pos": [ + -230.99607849121094, + -639.45654296875 + ], + "size": [ + 315, + 82 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "links": [ + 56 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAELoaderMultiGPU" + }, + "widgets_values": [ + "hunyuan_video_vae_bf16.safetensors", + "cuda:1" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 47, + "type": "HyVideoVAELoaderMultiGPU", + "pos": [ + -512.9594116210938, + -822.8096313476562 + ], + "size": [ + 315, + 106 + ], + "flags": {}, + "order": 6, + "mode": 4, + "inputs": [ + { + "name": "compile_args", + "type": "COMPILEARGS", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "vae", + "type": "VAE", + "links": [ + 64 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoVAELoaderMultiGPU" + }, + "widgets_values": [ + "hunyuan_video_vae_bf16.safetensors", + "bf16", + "cuda:1" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 5, + "type": "HyVideoDecode", + "pos": [ + -106.15780639648438, + -843.2271728515625 + ], + "size": [ + 345.4285888671875, + 150 + ], + "flags": {}, + "order": 9, + "mode": 4, + "inputs": [ + { + "name": "vae", + "type": "VAE", + "link": 64 + }, + { + "name": "samples", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "images", + "type": "IMAGE", + "links": [], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoDecode" + }, + "widgets_values": [ + true, + 86, + 256, + true + ] + }, + { + "id": 3, + "type": "HyVideoSampler", + "pos": [ + 255.96482849121094, + -403.58502197265625 + ], + "size": [ + 315, + 630 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "HYVIDEOMODEL", + "link": 65 + }, + { + "name": "hyvid_embeds", + "type": "HYVIDEMBEDS", + "link": 36 + }, + { + "name": "samples", + "type": "LATENT", + "link": null, + "shape": 7 + }, + { + "name": "stg_args", + "type": "STGARGS", + "link": null, + "shape": 7 + }, + { + "name": "context_options", + "type": "COGCONTEXT", + "link": null, + "shape": 7 + }, + { + "name": "feta_args", + "type": "FETAARGS", + "link": null, + "shape": 7 + }, + { + "name": "teacache_args", + "type": "TEACACHEARGS", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "samples", + "type": "LATENT", + "links": [ + 70 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoSampler" + }, + "widgets_values": [ + 512, + 320, + 85, + 20, + 6, + 9, + 5770521, + "fixed", + false, + 1, + "FlowMatchDiscreteScheduler" + ] + }, + { + "id": 51, + "type": "Note", + "pos": [ + 449.2930908203125, + -955.3724975585938 + ], + "size": [ + 1160.6077880859375, + 211.52166748046875 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "kijai already does an impressive amount of memory management in these nodes, so it is important for MultiGPU to \"play nice\" and vice-versa.\n\nFor this version of the workflow:\n\n• Only two of kijai's three nodes are used - model and text. For VAE we relying on Comfy's native VAE Loader node wrapped by MultiGPU.\n\n• HunyuanVideo TextEncode: \"force_offload\" is set to \"false\". Setting this option to \"true\" would defeat the purpose of selecting a different main_device to load to.\n\n• The main model and VAE devices are set to different cuda devices (cuda0 and cuda1). This is possible because the HunyuanVideo Sampler node outputs latents compatible with Comfy's native TiledVAE Decode.\n• Consequentially, now that we no longer have any other component on cuda0, we set \"force_offload\" to \"false\" on the \"HunyuanVideo Sampler\" node. This keeps the main model in VRAM, eliminating load times for the subsequent generations.\n\n**NOTE** This the **OPTIMAL** way to use MultiGPU with kijai's awesome nodes. If you want to use all three of kijai's loader nodes, please see device_selector_lowvram_flux_controlnet.json in ./examples" + ], + "color": "#432", + "bgcolor": "#653" + } + ], + "links": [ + [ + 36, + 30, + 0, + 3, + 1, + "HYVIDEMBEDS" + ], + [ + 56, + 44, + 0, + 45, + 1, + "VAE" + ], + [ + 64, + 47, + 0, + 5, + 0, + "VAE" + ], + [ + 65, + 48, + 0, + 3, + 0, + "HYVIDEOMODEL" + ], + [ + 66, + 49, + 0, + 30, + 0, + "HYVIDTEXTENCODER" + ], + [ + 69, + 45, + 0, + 34, + 0, + "IMAGE" + ], + [ + 70, + 3, + 0, + 45, + 0, + "LATENT" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 0.8769226950001201, + "offset": [ + 895.3038892918638, + 1121.109618095784 + ] + }, + "ue_links": [], + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0 + }, + "version": 0.4 +} \ No newline at end of file diff --git a/examples/hunyuanvideowrapper_select_device.json b/examples/hunyuanvideowrapper_select_device.json new file mode 100644 index 0000000..9dd1f8e --- /dev/null +++ b/examples/hunyuanvideowrapper_select_device.json @@ -0,0 +1,784 @@ +{ + "last_node_id": 51, + "last_link_id": 68, + "nodes": [ + { + "id": 7, + "type": "HyVideoVAELoader", + "pos": [ + -980.2922973632812, + -830.076171875 + ], + "size": [ + 379.166748046875, + 82 + ], + "flags": {}, + "order": 0, + "mode": 4, + "inputs": [ + { + "name": "compile_args", + "type": "COMPILEARGS", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "vae", + "type": "VAE", + "links": [], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoVAELoader" + }, + "widgets_values": [ + "hunyuan_video_vae_bf16.safetensors", + "bf16" + ], + "color": "#332922", + "bgcolor": "#593930" + }, + { + "id": 30, + "type": "HyVideoTextEncode", + "pos": [ + -194.8070831298828, + -79.95932006835938 + ], + "size": [ + 425.64068603515625, + 286.85968017578125 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "text_encoders", + "type": "HYVIDTEXTENCODER", + "link": 66 + }, + { + "name": "custom_prompt_template", + "type": "PROMPT_TEMPLATE", + "link": null, + "shape": 7 + }, + { + "name": "clip_l", + "type": "CLIP", + "link": null, + "shape": 7 + }, + { + "name": "hyvid_cfg", + "type": "HYVID_CFG", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "hyvid_embeds", + "type": "HYVIDEMBEDS", + "links": [ + 36 + ] + } + ], + "properties": { + "Node name for S&R": "HyVideoTextEncode" + }, + "widgets_values": [ + "A serene Minnesota lake stretches out at sunset, the water's surface a mirror reflecting the vibrant orange and pink sky. In the foreground, a pair of loons glide gracefully across the water, their sleek black and white feathers contrasting with the warm hues of the sunset. The loons' long, slender necks curve elegantly as they dip their heads into the water, searching for fish. The camera pans slowly from left to right, capturing the tranquil scene. The shoreline is visible in the distance, lined with tall pine trees that cast long shadows across the water. The loons' haunting calls echo across the lake, adding to the peaceful atmosphere.", + false, + "video" + ] + }, + { + "id": 49, + "type": "DownloadAndLoadHyVideoTextEncoderMultiGPU", + "pos": [ + -745.2869262695312, + -80.3648452758789 + ], + "size": [ + 516.5999755859375, + 202 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "hyvid_text_encoder", + "type": "HYVIDTEXTENCODER", + "links": [ + 66 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "DownloadAndLoadHyVideoTextEncoderMultiGPU" + }, + "widgets_values": [ + "Kijai/llava-llama-3-8b-text-encoder-tokenizer", + "disabled", + "bf16", + false, + 2, + "disabled", + "cuda:1" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 48, + "type": "HyVideoModelLoaderMultiGPU", + "pos": [ + -338.0295715332031, + -403.1601257324219 + ], + "size": [ + 497.3603210449219, + 252.03509521484375 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "compile_args", + "type": "COMPILEARGS", + "link": null, + "shape": 7 + }, + { + "name": "block_swap_args", + "type": "BLOCKSWAPARGS", + "link": null, + "shape": 7 + }, + { + "name": "lora", + "type": "HYVIDLORA", + "link": null, + "shape": 7 + }, + { + "name": "device", + "type": "COMBO", + "link": 67, + "widget": { + "name": "device" + }, + "shape": 7 + } + ], + "outputs": [ + { + "name": "model", + "type": "HYVIDEOMODEL", + "links": [ + 65 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoModelLoaderMultiGPU" + }, + "widgets_values": [ + "hunyuan_video_720_cfgdistill_fp8_e4m3fn.safetensors", + "fp32", + "fp8_e4m3fn", + "main_device", + "sdpa", + false, + "cuda:0" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 16, + "type": "DownloadAndLoadHyVideoTextEncoder", + "pos": [ + -1011.1117553710938, + -1076.6143798828125 + ], + "size": [ + 441, + 178 + ], + "flags": {}, + "order": 2, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "hyvid_text_encoder", + "type": "HYVIDTEXTENCODER", + "links": [] + } + ], + "properties": { + "Node name for S&R": "DownloadAndLoadHyVideoTextEncoder" + }, + "widgets_values": [ + "Kijai/llava-llama-3-8b-text-encoder-tokenizer", + "openai/clip-vit-large-patch14", + "fp16", + false, + 2, + "disabled" + ], + "color": "#332922", + "bgcolor": "#593930" + }, + { + "id": 1, + "type": "HyVideoModelLoader", + "pos": [ + -557.619384765625, + -1092.4908447265625 + ], + "size": [ + 435.37628173828125, + 221.34506225585938 + ], + "flags": {}, + "order": 3, + "mode": 4, + "inputs": [ + { + "name": "compile_args", + "type": "COMPILEARGS", + "link": null, + "shape": 7 + }, + { + "name": "block_swap_args", + "type": "BLOCKSWAPARGS", + "link": null, + "shape": 7 + }, + { + "name": "lora", + "type": "HYVIDLORA", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "model", + "type": "HYVIDEOMODEL", + "links": [], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoModelLoader" + }, + "widgets_values": [ + "hunyuan_video_720_cfgdistill_fp8_e4m3fn.safetensors", + "bf16", + "fp8_e4m3fn", + "main_device", + "sdpa", + false + ], + "color": "#332922", + "bgcolor": "#593930" + }, + { + "id": 34, + "type": "VHS_VideoCombine", + "pos": [ + 847.0758666992188, + -415.1882629394531 + ], + "size": [ + 580.7774658203125, + 698.4859008789062 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 63 + }, + { + "name": "audio", + "type": "AUDIO", + "link": null, + "shape": 7 + }, + { + "name": "meta_batch", + "type": "VHS_BatchManager", + "link": null, + "shape": 7 + }, + { + "name": "vae", + "type": "VAE", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "Filenames", + "type": "VHS_FILENAMES", + "links": null + } + ], + "properties": { + "Node name for S&R": "VHS_VideoCombine" + }, + "widgets_values": { + "frame_rate": 24, + "loop_count": 0, + "filename_prefix": "HunyuanVideo", + "format": "video/h264-mp4", + "pix_fmt": "yuv420p", + "crf": 19, + "save_metadata": true, + "trim_to_audio": false, + "pingpong": false, + "save_output": true, + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "HunyuanVideo_00161.mp4", + "subfolder": "", + "type": "output", + "format": "video/h264-mp4", + "frame_rate": 24, + "workflow": "HunyuanVideo_00161.png", + "fullpath": "/home/johnj/ComfyUI/output/HunyuanVideo_00161.mp4" + }, + "muted": false + } + } + }, + { + "id": 5, + "type": "HyVideoDecode", + "pos": [ + 538.94189453125, + -625.3562622070312 + ], + "size": [ + 345.4285888671875, + 150 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "vae", + "type": "VAE", + "link": 64 + }, + { + "name": "samples", + "type": "LATENT", + "link": 4 + } + ], + "outputs": [ + { + "name": "images", + "type": "IMAGE", + "links": [ + 63 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoDecode" + }, + "widgets_values": [ + true, + 86, + 256, + true + ] + }, + { + "id": 50, + "type": "DeviceSelectorMultiGPU", + "pos": [ + -716.0182495117188, + -492.63983154296875 + ], + "size": [ + 315, + 58 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "device", + "type": "COMBO", + "links": [ + 67, + 68 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "DeviceSelectorMultiGPU" + }, + "widgets_values": [ + "cuda:0" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 47, + "type": "HyVideoVAELoaderMultiGPU", + "pos": [ + -313.7779846191406, + -620.58740234375 + ], + "size": [ + 315, + 106 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "compile_args", + "type": "COMPILEARGS", + "link": null, + "shape": 7 + }, + { + "name": "device", + "type": "COMBO", + "link": 68, + "widget": { + "name": "device" + }, + "shape": 7 + } + ], + "outputs": [ + { + "name": "vae", + "type": "VAE", + "links": [ + 64 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoVAELoaderMultiGPU" + }, + "widgets_values": [ + "hunyuan_video_vae_bf16.safetensors", + "bf16", + "cuda:1" + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 3, + "type": "HyVideoSampler", + "pos": [ + 255.96482849121094, + -403.58502197265625 + ], + "size": [ + 315, + 630 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "HYVIDEOMODEL", + "link": 65 + }, + { + "name": "hyvid_embeds", + "type": "HYVIDEMBEDS", + "link": 36 + }, + { + "name": "samples", + "type": "LATENT", + "link": null, + "shape": 7 + }, + { + "name": "stg_args", + "type": "STGARGS", + "link": null, + "shape": 7 + }, + { + "name": "context_options", + "type": "COGCONTEXT", + "link": null, + "shape": 7 + }, + { + "name": "feta_args", + "type": "FETAARGS", + "link": null, + "shape": 7 + }, + { + "name": "teacache_args", + "type": "TEACACHEARGS", + "link": null, + "shape": 7 + } + ], + "outputs": [ + { + "name": "samples", + "type": "LATENT", + "links": [ + 4 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "HyVideoSampler" + }, + "widgets_values": [ + 512, + 320, + 85, + 20, + 6, + 9, + 5770521, + "fixed", + true, + 1, + "FlowMatchDiscreteScheduler" + ] + }, + { + "id": 44, + "type": "VAELoaderMultiGPU", + "pos": [ + -556.3764038085938, + -809.7488403320312 + ], + "size": [ + 315, + 82 + ], + "flags": {}, + "order": 5, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "links": [ + 56 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAELoaderMultiGPU" + }, + "widgets_values": [ + "hunyuan_video_vae_bf16.safetensors", + "cuda:0" + ] + }, + { + "id": 45, + "type": "VAEDecodeTiled", + "pos": [ + -195.86590576171875, + -828.8155517578125 + ], + "size": [ + 315, + 150 + ], + "flags": {}, + "order": 10, + "mode": 4, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": null + }, + { + "name": "vae", + "type": "VAE", + "link": 56 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecodeTiled" + }, + "widgets_values": [ + 256, + 64, + 64, + 8 + ] + }, + { + "id": 51, + "type": "Note", + "pos": [ + 217.09609985351562, + -905.6065063476562 + ], + "size": [ + 1160.6077880859375, + 211.52166748046875 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "kijai already does an impressive amount of memory management in these nodes, so it is important for MultiGPU to \"play nice\" and vice-versa.\n\nFor this version of the workflow:\n\n• All three of kijai's nodes are used - model, text, and VAE\n\n• HunyuanVideo TextEncode: \"force_offload\" is set to \"false\". Setting this option to \"true\" would defeat the purpose of selecting a different main_device to load to.\n\n• The main model and VAE devices are linked. This is because kijai's \"HunyuanVideo Decode\" expects both the model and the VAE to be on the same device. \n• Consequentially, to eliminate out-of-memory errors, \"force_offload\" is set to \"true\" on the \"HunyuanVideo Sampler\" node.\n\n\n**NOTE** This is not the optimial way to use MultiGPU. Please see the workflow at for an example of loading the VAE to a different cuda device using the native VAE loader and tiled decode." + ], + "color": "#432", + "bgcolor": "#653" + } + ], + "links": [ + [ + 4, + 3, + 0, + 5, + 1, + "LATENT" + ], + [ + 36, + 30, + 0, + 3, + 1, + "HYVIDEMBEDS" + ], + [ + 56, + 44, + 0, + 45, + 1, + "VAE" + ], + [ + 63, + 5, + 0, + 34, + 0, + "IMAGE" + ], + [ + 64, + 47, + 0, + 5, + 0, + "VAE" + ], + [ + 65, + 48, + 0, + 3, + 0, + "HYVIDEOMODEL" + ], + [ + 66, + 49, + 0, + 30, + 0, + "HYVIDTEXTENCODER" + ], + [ + 67, + 50, + 0, + 48, + 3, + "COMBO" + ], + [ + 68, + 50, + 0, + 47, + 1, + "COMBO" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 0.7972024500001089, + "offset": [ + 1218.3831555808085, + 1163.8844215880747 + ] + }, + "ue_links": [], + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0 + }, + "version": 0.4 +} \ No newline at end of file