You're looking at a specific version of this model. Jump to the model overview.
lucataco /hunyuan-heygen-joshua:e82a4154
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variableexport 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 lucataco/hunyuan-heygen-joshua using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/hunyuan-heygen-joshua:e82a415498ba81104f2c1f41833609e546cd53d2734b37740d685b122c93053f",
{
input: {
crf: 19,
steps: 30,
width: 960,
height: 544,
prompt: "HGM1 man standing indoors, likely in a modern, well-lit space. He is wearing a classic, tailored suit. The background shows cobblestone streets and old buildings with ornate facades. The man appears to be speaking, as he is looking directly at the camera.",
lora_url: "",
scheduler: "DPMSolverMultistepScheduler",
flow_shift: 9,
frame_rate: 15,
num_frames: 33,
enhance_end: 1,
enhance_start: 0,
force_offload: true,
lora_strength: 0.8,
enhance_double: true,
enhance_single: true,
enhance_weight: 0.3,
guidance_scale: 6,
denoise_strength: 1
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run lucataco/hunyuan-heygen-joshua using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/hunyuan-heygen-joshua:e82a415498ba81104f2c1f41833609e546cd53d2734b37740d685b122c93053f",
input={
"crf": 19,
"steps": 30,
"width": 960,
"height": 544,
"prompt": "HGM1 man standing indoors, likely in a modern, well-lit space. He is wearing a classic, tailored suit. The background shows cobblestone streets and old buildings with ornate facades. The man appears to be speaking, as he is looking directly at the camera.",
"lora_url": "",
"scheduler": "DPMSolverMultistepScheduler",
"flow_shift": 9,
"frame_rate": 15,
"num_frames": 33,
"enhance_end": 1,
"enhance_start": 0,
"force_offload": True,
"lora_strength": 0.8,
"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 variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run lucataco/hunyuan-heygen-joshua 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": "e82a415498ba81104f2c1f41833609e546cd53d2734b37740d685b122c93053f",
"input": {
"crf": 19,
"steps": 30,
"width": 960,
"height": 544,
"prompt": "HGM1 man standing indoors, likely in a modern, well-lit space. He is wearing a classic, tailored suit. The background shows cobblestone streets and old buildings with ornate facades. The man appears to be speaking, as he is looking directly at the camera.",
"lora_url": "",
"scheduler": "DPMSolverMultistepScheduler",
"flow_shift": 9,
"frame_rate": 15,
"num_frames": 33,
"enhance_end": 1,
"enhance_start": 0,
"force_offload": true,
"lora_strength": 0.8,
"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.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run lucataco/hunyuan-heygen-joshua using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/lucataco/hunyuan-heygen-joshua@sha256:e82a415498ba81104f2c1f41833609e546cd53d2734b37740d685b122c93053f \
-i 'crf=19' \
-i 'steps=30' \
-i 'width=960' \
-i 'height=544' \
-i 'prompt="HGM1 man standing indoors, likely in a modern, well-lit space. He is wearing a classic, tailored suit. The background shows cobblestone streets and old buildings with ornate facades. The man appears to be speaking, as he is looking directly at the camera."' \
-i 'lora_url=""' \
-i 'scheduler="DPMSolverMultistepScheduler"' \
-i 'flow_shift=9' \
-i 'frame_rate=15' \
-i 'num_frames=33' \
-i 'enhance_end=1' \
-i 'enhance_start=0' \
-i 'force_offload=true' \
-i 'lora_strength=0.8' \
-i 'enhance_double=true' \
-i 'enhance_single=true' \
-i 'enhance_weight=0.3' \
-i 'guidance_scale=6' \
-i 'denoise_strength=1'
To learn more, take a look at the Cog documentation.
Pull and run lucataco/hunyuan-heygen-joshua using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/lucataco/hunyuan-heygen-joshua@sha256:e82a415498ba81104f2c1f41833609e546cd53d2734b37740d685b122c93053f
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "crf": 19, "steps": 30, "width": 960, "height": 544, "prompt": "HGM1 man standing indoors, likely in a modern, well-lit space. He is wearing a classic, tailored suit. The background shows cobblestone streets and old buildings with ornate facades. The man appears to be speaking, as he is looking directly at the camera.", "lora_url": "", "scheduler": "DPMSolverMultistepScheduler", "flow_shift": 9, "frame_rate": 15, "num_frames": 33, "enhance_end": 1, "enhance_start": 0, "force_offload": true, "lora_strength": 0.8, "enhance_double": true, "enhance_single": true, "enhance_weight": 0.3, "guidance_scale": 6, "denoise_strength": 1 } }' \ http://localhost:5000/predictions
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-09T21:55:21.443334Z",
"created_at": "2025-01-09T21:53:24.117000Z",
"data_removed": false,
"error": null,
"id": "z1kfpbygjnrm80cm9m799ykcn0",
"input": {
"crf": 19,
"steps": 30,
"width": 960,
"height": 544,
"prompt": "HGM1 man standing indoors, likely in a modern, well-lit space. He is wearing a classic, tailored suit. The background shows cobblestone streets and old buildings with ornate facades. The man appears to be speaking, as he is looking directly at the camera.",
"lora_url": "",
"flow_shift": 9,
"frame_rate": 15,
"num_frames": 33,
"force_offload": true,
"lora_strength": 0.8,
"guidance_scale": 6,
"denoise_strength": 1
},
"logs": "Random seed set to: 1467522943\nChecking inputs\n====================================\nChecking weights\n✅ hunyuan_video_vae_bf16.safetensors exists in ComfyUI/models/vae\n✅ hunyuan_video_720_fp8_e4m3fn.safetensors exists in ComfyUI/models/diffusion_models\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: 59\n[ComfyUI] clipL prompt attention_mask shape: torch.Size([1, 77]), masked tokens: 58\nExecuting node 41, title: HunyuanVideo Lora Select, class type: HyVideoLoraSelect\nExecuting node 1, title: HunyuanVideo Model Loader, class type: HyVideoModelLoader\n[ComfyUI] model_type FLOW\n[ComfyUI] Using accelerate to load and assign model weights to device...\n[ComfyUI] Loading LoRA: lora_comfyui with strength: 0.8\n[ComfyUI] Requested to load HyVideoModel\n[ComfyUI] Loading 1 new model\n[ComfyUI] loaded completely 0.0 12555.953247070312 True\n[ComfyUI] Input (height, width, video_length) = (544, 960, 33)\nExecuting node 3, title: HunyuanVideo Sampler, class type: HyVideoSampler\n[ComfyUI] Sampling 33 frames in 9 latents at 960x544 with 30 inference steps\n[ComfyUI] Scheduler config: FrozenDict([('num_train_timesteps', 1000), ('shift', 9.0), ('reverse', True), ('solver', 'euler'), ('n_tokens', None), ('_use_default_values', ['num_train_timesteps', 'n_tokens'])])\n[ComfyUI]\n[ComfyUI] 0%| | 0/30 [00:00<?, ?it/s]\n[ComfyUI] 3%|▎ | 1/30 [00:02<01:02, 2.14s/it]\n[ComfyUI] 7%|▋ | 2/30 [00:05<01:13, 2.62s/it]\n[ComfyUI] 10%|█ | 3/30 [00:08<01:14, 2.77s/it]\n[ComfyUI] 13%|█▎ | 4/30 [00:11<01:13, 2.84s/it]\n[ComfyUI] 17%|█▋ | 5/30 [00:13<01:12, 2.89s/it]\n[ComfyUI] 20%|██ | 6/30 [00:16<01:09, 2.91s/it]\n[ComfyUI] 23%|██▎ | 7/30 [00:19<01:07, 2.93s/it]\n[ComfyUI] 27%|██▋ | 8/30 [00:22<01:04, 2.94s/it]\n[ComfyUI] 30%|███ | 9/30 [00:25<01:01, 2.94s/it]\n[ComfyUI] 33%|███▎ | 10/30 [00:28<00:58, 2.95s/it]\n[ComfyUI] 37%|███▋ | 11/30 [00:31<00:56, 2.95s/it]\n[ComfyUI] 40%|████ | 12/30 [00:34<00:53, 2.96s/it]\n[ComfyUI] 43%|████▎ | 13/30 [00:37<00:50, 2.96s/it]\n[ComfyUI] 47%|████▋ | 14/30 [00:40<00:47, 2.95s/it]\n[ComfyUI] 50%|█████ | 15/30 [00:43<00:44, 2.95s/it]\n[ComfyUI] 53%|█████▎ | 16/30 [00:46<00:41, 2.95s/it]\n[ComfyUI] 57%|█████▋ | 17/30 [00:49<00:38, 2.95s/it]\n[ComfyUI] 60%|██████ | 18/30 [00:52<00:35, 2.95s/it]\n[ComfyUI] 63%|██████▎ | 19/30 [00:55<00:32, 2.95s/it]\n[ComfyUI] 67%|██████▋ | 20/30 [00:58<00:29, 2.95s/it]\n[ComfyUI] 70%|███████ | 21/30 [01:01<00:26, 2.95s/it]\n[ComfyUI] 73%|███████▎ | 22/30 [01:04<00:23, 2.95s/it]\n[ComfyUI] 77%|███████▋ | 23/30 [01:07<00:20, 2.95s/it]\n[ComfyUI] 80%|████████ | 24/30 [01:10<00:17, 2.95s/it]\n[ComfyUI] 83%|████████▎ | 25/30 [01:13<00:14, 2.95s/it]\n[ComfyUI] 87%|████████▋ | 26/30 [01:15<00:11, 2.95s/it]\n[ComfyUI] 90%|█████████ | 27/30 [01:18<00:08, 2.95s/it]\n[ComfyUI] 93%|█████████▎| 28/30 [01:21<00:05, 2.95s/it]\n[ComfyUI] 97%|█████████▋| 29/30 [01:24<00:02, 2.95s/it]\n[ComfyUI] 100%|██████████| 30/30 [01:27<00:00, 2.95s/it]\n[ComfyUI] 100%|██████████| 30/30 [01:27<00:00, 2.92s/it]\n[ComfyUI] Allocated memory: memory=12.299 GB\n[ComfyUI] Max allocated memory: max_memory=15.815 GB\n[ComfyUI] Max reserved memory: max_reserved=17.281 GB\nExecuting node 5, title: HunyuanVideo Decode, class type: HyVideoDecode\n[ComfyUI]\n[ComfyUI] Decoding rows: 0%| | 0/3 [00:00<?, ?it/s]\n[ComfyUI] Decoding rows: 33%|███▎ | 1/3 [00:01<00:02, 1.01s/it]\n[ComfyUI] Decoding rows: 67%|██████▋ | 2/3 [00:02<00:01, 1.09s/it]\n[ComfyUI] Decoding rows: 100%|██████████| 3/3 [00:02<00:00, 1.06it/s]\n[ComfyUI] Decoding rows: 100%|██████████| 3/3 [00:02<00:00, 1.03it/s]\n[ComfyUI]\n[ComfyUI] Blending tiles: 0%| | 0/3 [00:00<?, ?it/s]\n[ComfyUI] Blending tiles: 67%|██████▋ | 2/3 [00:00<00:00, 18.18it/s]\nExecuting node 34, title: Video Combine 🎥🅥🅗🅢, class type: VHS_VideoCombine\n[ComfyUI] Blending tiles: 100%|██████████| 3/3 [00:00<00:00, 23.22it/s]\n[ComfyUI] Prompt executed in 113.75 seconds\noutputs: {'34': {'gifs': [{'filename': 'HunyuanVideo_00001.mp4', 'subfolder': '', 'type': 'output', 'format': 'video/h264-mp4', 'frame_rate': 15.0, 'workflow': 'HunyuanVideo_00001.png', 'fullpath': '/tmp/outputs/HunyuanVideo_00001.mp4'}]}}\n====================================\nHunyuanVideo_00001.png\nHunyuanVideo_00001.mp4",
"metrics": {
"predict_time": 117.317706085,
"total_time": 117.326334
},
"output": "https://replicate.delivery/xezq/mO0tyy8XGGroNl1N7N0H3pq0XtvAvOsgFfrsjmGeUlMJfeNQB/HunyuanVideo_00001.mp4",
"started_at": "2025-01-09T21:53:24.125628Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/bcwr-w7r536mrdagvjvxubi2qhbo5jdosjin6mlb7lztonjvjnagijeoa",
"get": "https://api.replicate.com/v1/predictions/z1kfpbygjnrm80cm9m799ykcn0",
"cancel": "https://api.replicate.com/v1/predictions/z1kfpbygjnrm80cm9m799ykcn0/cancel"
},
"version": "e82a415498ba81104f2c1f41833609e546cd53d2734b37740d685b122c93053f"
}
Random seed set to: 1467522943
Checking inputs
====================================
Checking weights
✅ hunyuan_video_vae_bf16.safetensors exists in ComfyUI/models/vae
✅ hunyuan_video_720_fp8_e4m3fn.safetensors exists in ComfyUI/models/diffusion_models
====================================
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: 59
[ComfyUI] clipL prompt attention_mask shape: torch.Size([1, 77]), masked tokens: 58
Executing node 41, title: HunyuanVideo Lora Select, class type: HyVideoLoraSelect
Executing node 1, title: HunyuanVideo Model Loader, class type: HyVideoModelLoader
[ComfyUI] model_type FLOW
[ComfyUI] Using accelerate to load and assign model weights to device...
[ComfyUI] Loading LoRA: lora_comfyui with strength: 0.8
[ComfyUI] Requested to load HyVideoModel
[ComfyUI] Loading 1 new model
[ComfyUI] loaded completely 0.0 12555.953247070312 True
[ComfyUI] Input (height, width, video_length) = (544, 960, 33)
Executing node 3, title: HunyuanVideo Sampler, class type: HyVideoSampler
[ComfyUI] Sampling 33 frames in 9 latents at 960x544 with 30 inference steps
[ComfyUI] Scheduler config: FrozenDict([('num_train_timesteps', 1000), ('shift', 9.0), ('reverse', True), ('solver', 'euler'), ('n_tokens', None), ('_use_default_values', ['num_train_timesteps', 'n_tokens'])])
[ComfyUI]
[ComfyUI] 0%| | 0/30 [00:00<?, ?it/s]
[ComfyUI] 3%|▎ | 1/30 [00:02<01:02, 2.14s/it]
[ComfyUI] 7%|▋ | 2/30 [00:05<01:13, 2.62s/it]
[ComfyUI] 10%|█ | 3/30 [00:08<01:14, 2.77s/it]
[ComfyUI] 13%|█▎ | 4/30 [00:11<01:13, 2.84s/it]
[ComfyUI] 17%|█▋ | 5/30 [00:13<01:12, 2.89s/it]
[ComfyUI] 20%|██ | 6/30 [00:16<01:09, 2.91s/it]
[ComfyUI] 23%|██▎ | 7/30 [00:19<01:07, 2.93s/it]
[ComfyUI] 27%|██▋ | 8/30 [00:22<01:04, 2.94s/it]
[ComfyUI] 30%|███ | 9/30 [00:25<01:01, 2.94s/it]
[ComfyUI] 33%|███▎ | 10/30 [00:28<00:58, 2.95s/it]
[ComfyUI] 37%|███▋ | 11/30 [00:31<00:56, 2.95s/it]
[ComfyUI] 40%|████ | 12/30 [00:34<00:53, 2.96s/it]
[ComfyUI] 43%|████▎ | 13/30 [00:37<00:50, 2.96s/it]
[ComfyUI] 47%|████▋ | 14/30 [00:40<00:47, 2.95s/it]
[ComfyUI] 50%|█████ | 15/30 [00:43<00:44, 2.95s/it]
[ComfyUI] 53%|█████▎ | 16/30 [00:46<00:41, 2.95s/it]
[ComfyUI] 57%|█████▋ | 17/30 [00:49<00:38, 2.95s/it]
[ComfyUI] 60%|██████ | 18/30 [00:52<00:35, 2.95s/it]
[ComfyUI] 63%|██████▎ | 19/30 [00:55<00:32, 2.95s/it]
[ComfyUI] 67%|██████▋ | 20/30 [00:58<00:29, 2.95s/it]
[ComfyUI] 70%|███████ | 21/30 [01:01<00:26, 2.95s/it]
[ComfyUI] 73%|███████▎ | 22/30 [01:04<00:23, 2.95s/it]
[ComfyUI] 77%|███████▋ | 23/30 [01:07<00:20, 2.95s/it]
[ComfyUI] 80%|████████ | 24/30 [01:10<00:17, 2.95s/it]
[ComfyUI] 83%|████████▎ | 25/30 [01:13<00:14, 2.95s/it]
[ComfyUI] 87%|████████▋ | 26/30 [01:15<00:11, 2.95s/it]
[ComfyUI] 90%|█████████ | 27/30 [01:18<00:08, 2.95s/it]
[ComfyUI] 93%|█████████▎| 28/30 [01:21<00:05, 2.95s/it]
[ComfyUI] 97%|█████████▋| 29/30 [01:24<00:02, 2.95s/it]
[ComfyUI] 100%|██████████| 30/30 [01:27<00:00, 2.95s/it]
[ComfyUI] 100%|██████████| 30/30 [01:27<00:00, 2.92s/it]
[ComfyUI] Allocated memory: memory=12.299 GB
[ComfyUI] Max allocated memory: max_memory=15.815 GB
[ComfyUI] Max reserved memory: max_reserved=17.281 GB
Executing node 5, title: HunyuanVideo Decode, class type: HyVideoDecode
[ComfyUI]
[ComfyUI] Decoding rows: 0%| | 0/3 [00:00<?, ?it/s]
[ComfyUI] Decoding rows: 33%|███▎ | 1/3 [00:01<00:02, 1.01s/it]
[ComfyUI] Decoding rows: 67%|██████▋ | 2/3 [00:02<00:01, 1.09s/it]
[ComfyUI] Decoding rows: 100%|██████████| 3/3 [00:02<00:00, 1.06it/s]
[ComfyUI] Decoding rows: 100%|██████████| 3/3 [00:02<00:00, 1.03it/s]
[ComfyUI]
[ComfyUI] Blending tiles: 0%| | 0/3 [00:00<?, ?it/s]
[ComfyUI] Blending tiles: 67%|██████▋ | 2/3 [00:00<00:00, 18.18it/s]
Executing node 34, title: Video Combine 🎥🅥🅗🅢, class type: VHS_VideoCombine
[ComfyUI] Blending tiles: 100%|██████████| 3/3 [00:00<00:00, 23.22it/s]
[ComfyUI] Prompt executed in 113.75 seconds
outputs: {'34': {'gifs': [{'filename': 'HunyuanVideo_00001.mp4', 'subfolder': '', 'type': 'output', 'format': 'video/h264-mp4', 'frame_rate': 15.0, 'workflow': 'HunyuanVideo_00001.png', 'fullpath': '/tmp/outputs/HunyuanVideo_00001.mp4'}]}}
====================================
HunyuanVideo_00001.png
HunyuanVideo_00001.mp4