Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
deepfates /hunyuan-the-lord-of-the-rings:0afc10af
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run deepfates/hunyuan-the-lord-of-the-rings using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"deepfates/hunyuan-the-lord-of-the-rings:0afc10af3117ce053b0430a8465bf0e500a1b7432305b813a4b5ea01393f4612",
{
input: {
crf: 19,
seed: 12345,
steps: 50,
width: 640,
height: 360,
prompt: "A video in the style of THLRD, THLRD The video clip depicts a horse-drawn carriage traveling along a foggy, winding road. The road is lined with trees on both sides, creating a dense and mysterious atmosphere. The carriage is a traditional style with four large wheels and a roof, pulled by a single horse. The horse is dark in color, possibly black or dark brown, and seems to be moving at a leisurely pace.\nIn the foreground, the road is clearly visible, with rocks and vegetation along the sides. The fog is thick, limiting visibility and adding to the sense of isolation and mystery. The trees are covered in leaves, suggesting a late spring or summer setting.\nIn the distance",
lora_url: "",
scheduler: "DPMSolverMultistepScheduler",
flow_shift: 9,
frame_rate: 16,
num_frames: 66,
enhance_end: 1,
enhance_start: 0,
force_offload: true,
lora_strength: 1,
enhance_double: true,
enhance_single: true,
enhance_weight: 0.3,
guidance_scale: 6,
denoise_strength: 1
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run deepfates/hunyuan-the-lord-of-the-rings using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"deepfates/hunyuan-the-lord-of-the-rings:0afc10af3117ce053b0430a8465bf0e500a1b7432305b813a4b5ea01393f4612",
input={
"crf": 19,
"seed": 12345,
"steps": 50,
"width": 640,
"height": 360,
"prompt": "A video in the style of THLRD, THLRD The video clip depicts a horse-drawn carriage traveling along a foggy, winding road. The road is lined with trees on both sides, creating a dense and mysterious atmosphere. The carriage is a traditional style with four large wheels and a roof, pulled by a single horse. The horse is dark in color, possibly black or dark brown, and seems to be moving at a leisurely pace.\nIn the foreground, the road is clearly visible, with rocks and vegetation along the sides. The fog is thick, limiting visibility and adding to the sense of isolation and mystery. The trees are covered in leaves, suggesting a late spring or summer setting.\nIn the distance",
"lora_url": "",
"scheduler": "DPMSolverMultistepScheduler",
"flow_shift": 9,
"frame_rate": 16,
"num_frames": 66,
"enhance_end": 1,
"enhance_start": 0,
"force_offload": True,
"lora_strength": 1,
"enhance_double": True,
"enhance_single": True,
"enhance_weight": 0.3,
"guidance_scale": 6,
"denoise_strength": 1
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run deepfates/hunyuan-the-lord-of-the-rings using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "deepfates/hunyuan-the-lord-of-the-rings:0afc10af3117ce053b0430a8465bf0e500a1b7432305b813a4b5ea01393f4612",
"input": {
"crf": 19,
"seed": 12345,
"steps": 50,
"width": 640,
"height": 360,
"prompt": "A video in the style of THLRD, THLRD The video clip depicts a horse-drawn carriage traveling along a foggy, winding road. The road is lined with trees on both sides, creating a dense and mysterious atmosphere. The carriage is a traditional style with four large wheels and a roof, pulled by a single horse. The horse is dark in color, possibly black or dark brown, and seems to be moving at a leisurely pace.\\nIn the foreground, the road is clearly visible, with rocks and vegetation along the sides. The fog is thick, limiting visibility and adding to the sense of isolation and mystery. The trees are covered in leaves, suggesting a late spring or summer setting.\\nIn the distance",
"lora_url": "",
"scheduler": "DPMSolverMultistepScheduler",
"flow_shift": 9,
"frame_rate": 16,
"num_frames": 66,
"enhance_end": 1,
"enhance_start": 0,
"force_offload": true,
"lora_strength": 1,
"enhance_double": true,
"enhance_single": true,
"enhance_weight": 0.3,
"guidance_scale": 6,
"denoise_strength": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2025-01-24T03:23:26.097228Z",
"created_at": "2025-01-24T03:07:29.218000Z",
"data_removed": false,
"error": null,
"id": "5y2htwv689rma0cmjs3t73wgfr",
"input": {
"seed": 12345,
"steps": 50,
"width": 640,
"height": 360,
"prompt": "A video in the style of THLRD, THLRD The video clip depicts a horse-drawn carriage traveling along a foggy, winding road. The road is lined with trees on both sides, creating a dense and mysterious atmosphere. The carriage is a traditional style with four large wheels and a roof, pulled by a single horse. The horse is dark in color, possibly black or dark brown, and seems to be moving at a leisurely pace.\nIn the foreground, the road is clearly visible, with rocks and vegetation along the sides. The fog is thick, limiting visibility and adding to the sense of isolation and mystery. The trees are covered in leaves, suggesting a late spring or summer setting.\nIn the distance",
"frame_rate": 16,
"num_frames": 66,
"lora_strength": 1,
"guidance_scale": 6
},
"logs": "Seed set to: 12345\n⚠️ Adjusted dimensions from 640x360 to 640x368 to satisfy model requirements\n⚠️ Adjusted frame count from 66 to 65 to satisfy model requirements\nChecking inputs\n====================================\nChecking weights\n✅ hunyuan_video_720_fp8_e4m3fn.safetensors exists in ComfyUI/models/diffusion_models\n✅ hunyuan_video_vae_bf16.safetensors exists in ComfyUI/models/vae\n====================================\nRunning workflow\n[ComfyUI] got prompt\nExecuting node 30, title: HunyuanVideo TextEncode, class type: HyVideoTextEncode\n[ComfyUI] llm prompt attention_mask shape: torch.Size([1, 161]), masked tokens: 146\n[ComfyUI] clipL prompt attention_mask shape: torch.Size([1, 77]), masked tokens: 77\n[ComfyUI] Input (height, width, video_length) = (368, 640, 65)\n[ComfyUI] The config attributes {'reverse': True, 'solver': 'euler'} were passed to DPMSolverMultistepScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.\nExecuting node 3, title: HunyuanVideo Sampler, class type: HyVideoSampler\n[ComfyUI] Sampling 65 frames in 17 latents at 640x368 with 50 inference steps\n[ComfyUI]\n[ComfyUI] 0%| | 0/50 [00:00<?, ?it/s]\n[ComfyUI] 2%|▏ | 1/50 [00:02<01:52, 2.29s/it]\n[ComfyUI] 4%|▍ | 2/50 [00:04<01:36, 2.01s/it]\n[ComfyUI] 6%|▌ | 3/50 [00:06<01:40, 2.14s/it]\n[ComfyUI] 8%|▊ | 4/50 [00:08<01:41, 2.20s/it]\n[ComfyUI] 10%|█ | 5/50 [00:10<01:40, 2.23s/it]\n[ComfyUI] 12%|█▏ | 6/50 [00:13<01:39, 2.25s/it]\n[ComfyUI] 14%|█▍ | 7/50 [00:15<01:37, 2.27s/it]\n[ComfyUI] 16%|█▌ | 8/50 [00:17<01:35, 2.27s/it]\n[ComfyUI] 18%|█▊ | 9/50 [00:20<01:33, 2.28s/it]\n[ComfyUI] 20%|██ | 10/50 [00:22<01:31, 2.28s/it]\n[ComfyUI] 22%|██▏ | 11/50 [00:24<01:29, 2.28s/it]\n[ComfyUI] 24%|██▍ | 12/50 [00:27<01:26, 2.29s/it]\n[ComfyUI] 26%|██▌ | 13/50 [00:29<01:24, 2.29s/it]\n[ComfyUI] 28%|██▊ | 14/50 [00:31<01:22, 2.29s/it]\n[ComfyUI] 30%|███ | 15/50 [00:33<01:20, 2.29s/it]\n[ComfyUI] 32%|███▏ | 16/50 [00:36<01:17, 2.29s/it]\n[ComfyUI] 34%|███▍ | 17/50 [00:38<01:15, 2.29s/it]\n[ComfyUI] 36%|███▌ | 18/50 [00:40<01:13, 2.29s/it]\n[ComfyUI] 38%|███▊ | 19/50 [00:43<01:11, 2.29s/it]\n[ComfyUI] 40%|████ | 20/50 [00:45<01:08, 2.29s/it]\n[ComfyUI] 42%|████▏ | 21/50 [00:47<01:06, 2.29s/it]\n[ComfyUI] 44%|████▍ | 22/50 [00:49<01:04, 2.29s/it]\n[ComfyUI] 46%|████▌ | 23/50 [00:52<01:01, 2.29s/it]\n[ComfyUI] 48%|████▊ | 24/50 [00:54<00:59, 2.29s/it]\n[ComfyUI] 50%|█████ | 25/50 [00:56<00:57, 2.29s/it]\n[ComfyUI] 52%|█████▏ | 26/50 [00:59<00:54, 2.29s/it]\n[ComfyUI] 54%|█████▍ | 27/50 [01:01<00:52, 2.29s/it]\n[ComfyUI] 56%|█████▌ | 28/50 [01:03<00:50, 2.29s/it]\n[ComfyUI] 58%|█████▊ | 29/50 [01:05<00:48, 2.29s/it]\n[ComfyUI] 60%|██████ | 30/50 [01:08<00:45, 2.29s/it]\n[ComfyUI] 62%|██████▏ | 31/50 [01:10<00:43, 2.29s/it]\n[ComfyUI] 64%|██████▍ | 32/50 [01:12<00:41, 2.29s/it]\n[ComfyUI] 66%|██████▌ | 33/50 [01:15<00:38, 2.29s/it]\n[ComfyUI] 68%|██████▊ | 34/50 [01:17<00:36, 2.29s/it]\n[ComfyUI] 70%|███████ | 35/50 [01:19<00:34, 2.29s/it]\n[ComfyUI] 72%|███████▏ | 36/50 [01:22<00:32, 2.29s/it]\n[ComfyUI] 74%|███████▍ | 37/50 [01:24<00:29, 2.29s/it]\n[ComfyUI] 76%|███████▌ | 38/50 [01:26<00:27, 2.29s/it]\n[ComfyUI] 78%|███████▊ | 39/50 [01:28<00:25, 2.29s/it]\n[ComfyUI] 80%|████████ | 40/50 [01:31<00:22, 2.29s/it]\n[ComfyUI] 82%|████████▏ | 41/50 [01:33<00:20, 2.29s/it]\n[ComfyUI] 84%|████████▍ | 42/50 [01:35<00:18, 2.29s/it]\n[ComfyUI] 86%|████████▌ | 43/50 [01:38<00:16, 2.29s/it]\n[ComfyUI] 88%|████████▊ | 44/50 [01:40<00:13, 2.29s/it]\n[ComfyUI] 90%|█████████ | 45/50 [01:42<00:11, 2.29s/it]\n[ComfyUI] 92%|█████████▏| 46/50 [01:44<00:09, 2.29s/it]\n[ComfyUI] 94%|█████████▍| 47/50 [01:47<00:06, 2.29s/it]\n[ComfyUI] 96%|█████████▌| 48/50 [01:49<00:04, 2.29s/it]\n[ComfyUI] 98%|█████████▊| 49/50 [01:51<00:02, 2.29s/it]\n[ComfyUI] 100%|██████████| 50/50 [01:54<00:00, 2.29s/it]\n[ComfyUI] 100%|██████████| 50/50 [01:54<00:00, 2.28s/it]\n[ComfyUI] Allocated memory: memory=12.300 GB\n[ComfyUI] Max allocated memory: max_memory=15.099 GB\n[ComfyUI] Max reserved memory: max_reserved=16.344 GB\nExecuting node 5, title: HunyuanVideo Decode, class type: HyVideoDecode\n[ComfyUI]\n[ComfyUI] Decoding rows: 0%| | 0/2 [00:00<?, ?it/s]\n[ComfyUI] Decoding rows: 50%|█████ | 1/2 [00:01<00:01, 1.47s/it]\n[ComfyUI] Decoding rows: 100%|██████████| 2/2 [00:02<00:00, 1.24s/it]\n[ComfyUI] Decoding rows: 100%|██████████| 2/2 [00:02<00:00, 1.27s/it]\n[ComfyUI]\n[ComfyUI] Blending tiles: 0%| | 0/2 [00:00<?, ?it/s]\n[ComfyUI] Blending tiles: 100%|██████████| 2/2 [00:00<00:00, 25.78it/s]\n[ComfyUI]\n[ComfyUI] Decoding rows: 0%| | 0/2 [00:00<?, ?it/s]\n[ComfyUI] Decoding rows: 50%|█████ | 1/2 [00:00<00:00, 2.56it/s]\n[ComfyUI] Decoding rows: 100%|██████████| 2/2 [00:00<00:00, 3.04it/s]\n[ComfyUI] Decoding rows: 100%|██████████| 2/2 [00:00<00:00, 2.96it/s]\n[ComfyUI]\n[ComfyUI] Blending tiles: 0%| | 0/2 [00:00<?, ?it/s]\nExecuting node 34, title: Video Combine 🎥🅥🅗🅢, class type: VHS_VideoCombine\n[ComfyUI] Blending tiles: 100%|██████████| 2/2 [00:00<00:00, 64.93it/s]\n[ComfyUI] Prompt executed in 132.03 seconds\noutputs: {'34': {'gifs': [{'filename': 'HunyuanVideo_00001.mp4', 'subfolder': '', 'type': 'output', 'format': 'video/h264-mp4', 'frame_rate': 16.0, 'workflow': 'HunyuanVideo_00001.png', 'fullpath': '/tmp/outputs/HunyuanVideo_00001.mp4'}]}}\n====================================\nHunyuanVideo_00001.png\nHunyuanVideo_00001.mp4",
"metrics": {
"predict_time": 149.76097594,
"total_time": 956.879228
},
"output": "https://replicate.delivery/xezq/sM8xYtugAdJZOZTiF1p80AIYSrT5LcqFDmERjl2QJdir5CCF/HunyuanVideo_00001.mp4",
"started_at": "2025-01-24T03:20:56.336252Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/bsvm-rxmbpjdi26xfsovkm6v62e5u7gcb4d6s3fcdcfw4cj7rw3ueus5q",
"get": "https://api.replicate.com/v1/predictions/5y2htwv689rma0cmjs3t73wgfr",
"cancel": "https://api.replicate.com/v1/predictions/5y2htwv689rma0cmjs3t73wgfr/cancel"
},
"version": "0afc10af3117ce053b0430a8465bf0e500a1b7432305b813a4b5ea01393f4612"
}
Seed set to: 12345
⚠️ Adjusted dimensions from 640x360 to 640x368 to satisfy model requirements
⚠️ Adjusted frame count from 66 to 65 to satisfy model requirements
Checking inputs
====================================
Checking weights
✅ hunyuan_video_720_fp8_e4m3fn.safetensors exists in ComfyUI/models/diffusion_models
✅ hunyuan_video_vae_bf16.safetensors exists in ComfyUI/models/vae
====================================
Running workflow
[ComfyUI] got prompt
Executing node 30, title: HunyuanVideo TextEncode, class type: HyVideoTextEncode
[ComfyUI] llm prompt attention_mask shape: torch.Size([1, 161]), masked tokens: 146
[ComfyUI] clipL prompt attention_mask shape: torch.Size([1, 77]), masked tokens: 77
[ComfyUI] Input (height, width, video_length) = (368, 640, 65)
[ComfyUI] The config attributes {'reverse': True, 'solver': 'euler'} were passed to DPMSolverMultistepScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
Executing node 3, title: HunyuanVideo Sampler, class type: HyVideoSampler
[ComfyUI] Sampling 65 frames in 17 latents at 640x368 with 50 inference steps
[ComfyUI]
[ComfyUI] 0%| | 0/50 [00:00<?, ?it/s]
[ComfyUI] 2%|▏ | 1/50 [00:02<01:52, 2.29s/it]
[ComfyUI] 4%|▍ | 2/50 [00:04<01:36, 2.01s/it]
[ComfyUI] 6%|▌ | 3/50 [00:06<01:40, 2.14s/it]
[ComfyUI] 8%|▊ | 4/50 [00:08<01:41, 2.20s/it]
[ComfyUI] 10%|█ | 5/50 [00:10<01:40, 2.23s/it]
[ComfyUI] 12%|█▏ | 6/50 [00:13<01:39, 2.25s/it]
[ComfyUI] 14%|█▍ | 7/50 [00:15<01:37, 2.27s/it]
[ComfyUI] 16%|█▌ | 8/50 [00:17<01:35, 2.27s/it]
[ComfyUI] 18%|█▊ | 9/50 [00:20<01:33, 2.28s/it]
[ComfyUI] 20%|██ | 10/50 [00:22<01:31, 2.28s/it]
[ComfyUI] 22%|██▏ | 11/50 [00:24<01:29, 2.28s/it]
[ComfyUI] 24%|██▍ | 12/50 [00:27<01:26, 2.29s/it]
[ComfyUI] 26%|██▌ | 13/50 [00:29<01:24, 2.29s/it]
[ComfyUI] 28%|██▊ | 14/50 [00:31<01:22, 2.29s/it]
[ComfyUI] 30%|███ | 15/50 [00:33<01:20, 2.29s/it]
[ComfyUI] 32%|███▏ | 16/50 [00:36<01:17, 2.29s/it]
[ComfyUI] 34%|███▍ | 17/50 [00:38<01:15, 2.29s/it]
[ComfyUI] 36%|███▌ | 18/50 [00:40<01:13, 2.29s/it]
[ComfyUI] 38%|███▊ | 19/50 [00:43<01:11, 2.29s/it]
[ComfyUI] 40%|████ | 20/50 [00:45<01:08, 2.29s/it]
[ComfyUI] 42%|████▏ | 21/50 [00:47<01:06, 2.29s/it]
[ComfyUI] 44%|████▍ | 22/50 [00:49<01:04, 2.29s/it]
[ComfyUI] 46%|████▌ | 23/50 [00:52<01:01, 2.29s/it]
[ComfyUI] 48%|████▊ | 24/50 [00:54<00:59, 2.29s/it]
[ComfyUI] 50%|█████ | 25/50 [00:56<00:57, 2.29s/it]
[ComfyUI] 52%|█████▏ | 26/50 [00:59<00:54, 2.29s/it]
[ComfyUI] 54%|█████▍ | 27/50 [01:01<00:52, 2.29s/it]
[ComfyUI] 56%|█████▌ | 28/50 [01:03<00:50, 2.29s/it]
[ComfyUI] 58%|█████▊ | 29/50 [01:05<00:48, 2.29s/it]
[ComfyUI] 60%|██████ | 30/50 [01:08<00:45, 2.29s/it]
[ComfyUI] 62%|██████▏ | 31/50 [01:10<00:43, 2.29s/it]
[ComfyUI] 64%|██████▍ | 32/50 [01:12<00:41, 2.29s/it]
[ComfyUI] 66%|██████▌ | 33/50 [01:15<00:38, 2.29s/it]
[ComfyUI] 68%|██████▊ | 34/50 [01:17<00:36, 2.29s/it]
[ComfyUI] 70%|███████ | 35/50 [01:19<00:34, 2.29s/it]
[ComfyUI] 72%|███████▏ | 36/50 [01:22<00:32, 2.29s/it]
[ComfyUI] 74%|███████▍ | 37/50 [01:24<00:29, 2.29s/it]
[ComfyUI] 76%|███████▌ | 38/50 [01:26<00:27, 2.29s/it]
[ComfyUI] 78%|███████▊ | 39/50 [01:28<00:25, 2.29s/it]
[ComfyUI] 80%|████████ | 40/50 [01:31<00:22, 2.29s/it]
[ComfyUI] 82%|████████▏ | 41/50 [01:33<00:20, 2.29s/it]
[ComfyUI] 84%|████████▍ | 42/50 [01:35<00:18, 2.29s/it]
[ComfyUI] 86%|████████▌ | 43/50 [01:38<00:16, 2.29s/it]
[ComfyUI] 88%|████████▊ | 44/50 [01:40<00:13, 2.29s/it]
[ComfyUI] 90%|█████████ | 45/50 [01:42<00:11, 2.29s/it]
[ComfyUI] 92%|█████████▏| 46/50 [01:44<00:09, 2.29s/it]
[ComfyUI] 94%|█████████▍| 47/50 [01:47<00:06, 2.29s/it]
[ComfyUI] 96%|█████████▌| 48/50 [01:49<00:04, 2.29s/it]
[ComfyUI] 98%|█████████▊| 49/50 [01:51<00:02, 2.29s/it]
[ComfyUI] 100%|██████████| 50/50 [01:54<00:00, 2.29s/it]
[ComfyUI] 100%|██████████| 50/50 [01:54<00:00, 2.28s/it]
[ComfyUI] Allocated memory: memory=12.300 GB
[ComfyUI] Max allocated memory: max_memory=15.099 GB
[ComfyUI] Max reserved memory: max_reserved=16.344 GB
Executing node 5, title: HunyuanVideo Decode, class type: HyVideoDecode
[ComfyUI]
[ComfyUI] Decoding rows: 0%| | 0/2 [00:00<?, ?it/s]
[ComfyUI] Decoding rows: 50%|█████ | 1/2 [00:01<00:01, 1.47s/it]
[ComfyUI] Decoding rows: 100%|██████████| 2/2 [00:02<00:00, 1.24s/it]
[ComfyUI] Decoding rows: 100%|██████████| 2/2 [00:02<00:00, 1.27s/it]
[ComfyUI]
[ComfyUI] Blending tiles: 0%| | 0/2 [00:00<?, ?it/s]
[ComfyUI] Blending tiles: 100%|██████████| 2/2 [00:00<00:00, 25.78it/s]
[ComfyUI]
[ComfyUI] Decoding rows: 0%| | 0/2 [00:00<?, ?it/s]
[ComfyUI] Decoding rows: 50%|█████ | 1/2 [00:00<00:00, 2.56it/s]
[ComfyUI] Decoding rows: 100%|██████████| 2/2 [00:00<00:00, 3.04it/s]
[ComfyUI] Decoding rows: 100%|██████████| 2/2 [00:00<00:00, 2.96it/s]
[ComfyUI]
[ComfyUI] Blending tiles: 0%| | 0/2 [00:00<?, ?it/s]
Executing node 34, title: Video Combine 🎥🅥🅗🅢, class type: VHS_VideoCombine
[ComfyUI] Blending tiles: 100%|██████████| 2/2 [00:00<00:00, 64.93it/s]
[ComfyUI] Prompt executed in 132.03 seconds
outputs: {'34': {'gifs': [{'filename': 'HunyuanVideo_00001.mp4', 'subfolder': '', 'type': 'output', 'format': 'video/h264-mp4', 'frame_rate': 16.0, 'workflow': 'HunyuanVideo_00001.png', 'fullpath': '/tmp/outputs/HunyuanVideo_00001.mp4'}]}}
====================================
HunyuanVideo_00001.png
HunyuanVideo_00001.mp4