Files
pollockjj-ComfyUI-MultiGPU/examples/hunyuanvideowrapper_select_device.json
T

784 lines
16 KiB
JSON

{
"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
}