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 sitting indoors, likely in a modern, well-lit space. He is wearing a white, long-sleeved shirt. He is reading a book with a serious look on his face",
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.9,
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 sitting indoors, likely in a modern, well-lit space. He is wearing a white, long-sleeved shirt. He is reading a book with a serious look on his face",
"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.9,
"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 sitting indoors, likely in a modern, well-lit space. He is wearing a white, long-sleeved shirt. He is reading a book with a serious look on his face",
"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.9,
"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 sitting indoors, likely in a modern, well-lit space. He is wearing a white, long-sleeved shirt. He is reading a book with a serious look on his face"' \
-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.9' \
-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 sitting indoors, likely in a modern, well-lit space. He is wearing a white, long-sleeved shirt. He is reading a book with a serious look on his face", "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.9, "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:40:40.680967Z",
"created_at": "2025-01-09T21:37:21.592000Z",
"data_removed": false,
"error": null,
"id": "nmwaw4h0q1rmc0cm9m0ahtfk2w",
"input": {
"crf": 19,
"steps": 30,
"width": 960,
"height": 544,
"prompt": "HGM1 man sitting indoors, likely in a modern, well-lit space. He is wearing a white, long-sleeved shirt. He is reading a book with a serious look on his face",
"lora_url": "",
"flow_shift": 9,
"frame_rate": 15,
"num_frames": 33,
"force_offload": true,
"lora_strength": 0.9,
"guidance_scale": 6,
"denoise_strength": 1
},
"logs": "Random seed set to: 542482491\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 7, title: HunyuanVideo VAE Loader, class type: HyVideoVAELoader\n[ComfyUI] Loading text encoder model (clipL) from: /src/ComfyUI/models/clip/clip-vit-large-patch14\nExecuting node 16, title: (Down)Load HunyuanVideo TextEncoder, class type: DownloadAndLoadHyVideoTextEncoder\n[ComfyUI] Text encoder to dtype: torch.float16\n[ComfyUI] Loading tokenizer (clipL) from: /src/ComfyUI/models/clip/clip-vit-large-patch14\n[ComfyUI] Loading text encoder model (llm) from: /src/ComfyUI/models/LLM/llava-llama-3-8b-text-encoder-tokenizer\n[ComfyUI]\n[ComfyUI] Loading checkpoint shards: 0%| | 0/4 [00:00<?, ?it/s]\n[ComfyUI] Loading checkpoint shards: 25%|██▌ | 1/4 [00:00<00:01, 1.62it/s]\n[ComfyUI] Loading checkpoint shards: 50%|█████ | 2/4 [00:01<00:01, 1.66it/s]\n[ComfyUI] Loading checkpoint shards: 75%|███████▌ | 3/4 [00:01<00:00, 1.68it/s]\n[ComfyUI] Loading checkpoint shards: 100%|██████████| 4/4 [00:01<00:00, 2.41it/s]\n[ComfyUI] Loading checkpoint shards: 100%|██████████| 4/4 [00:01<00:00, 2.07it/s]\n[ComfyUI] Text encoder to dtype: torch.float16\n[ComfyUI] Loading tokenizer (llm) from: /src/ComfyUI/models/LLM/llava-llama-3-8b-text-encoder-tokenizer\nExecuting node 30, title: HunyuanVideo TextEncode, class type: HyVideoTextEncode\n[ComfyUI] llm prompt attention_mask shape: torch.Size([1, 161]), masked tokens: 42\n[ComfyUI] clipL prompt attention_mask shape: torch.Size([1, 77]), masked tokens: 43\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.9\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:05, 2.27s/it]\n[ComfyUI] 7%|▋ | 2/30 [00:05<01:14, 2.67s/it]\n[ComfyUI] 10%|█ | 3/30 [00:08<01:15, 2.79s/it]\n[ComfyUI] 13%|█▎ | 4/30 [00:11<01:14, 2.85s/it]\n[ComfyUI] 17%|█▋ | 5/30 [00:14<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.92s/it]\n[ComfyUI] 27%|██▋ | 8/30 [00:22<01:04, 2.93s/it]\n[ComfyUI] 30%|███ | 9/30 [00:25<01:01, 2.93s/it]\n[ComfyUI] 33%|███▎ | 10/30 [00:28<00:58, 2.94s/it]\n[ComfyUI] 37%|███▋ | 11/30 [00:31<00:55, 2.94s/it]\n[ComfyUI] 40%|████ | 12/30 [00:34<00:52, 2.94s/it]\n[ComfyUI] 43%|████▎ | 13/30 [00:37<00:50, 2.94s/it]\n[ComfyUI] 47%|████▋ | 14/30 [00:40<00:47, 2.94s/it]\n[ComfyUI] 50%|█████ | 15/30 [00:43<00:44, 2.95s/it]\n[ComfyUI] 53%|█████▎ | 16/30 [00:46<00:41, 2.94s/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:12<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.94s/it]\n[ComfyUI] 93%|█████████▎| 28/30 [01:21<00:05, 2.94s/it]\n[ComfyUI] 97%|█████████▋| 29/30 [01:24<00:02, 2.94s/it]\n[ComfyUI] 100%|██████████| 30/30 [01:27<00:00, 2.94s/it]\n[ComfyUI] 100%|██████████| 30/30 [01:27<00:00, 2.92s/it]\n[ComfyUI] Allocated memory: memory=12.758 GB\n[ComfyUI] Max allocated memory: max_memory=16.274 GB\n[ComfyUI] Max reserved memory: max_reserved=17.781 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.03s/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.05it/s]\n[ComfyUI] Decoding rows: 100%|██████████| 3/3 [00:02<00:00, 1.02it/s]\n[ComfyUI]\n[ComfyUI] Blending tiles: 0%| | 0/3 [00:00<?, ?it/s]\n[ComfyUI] Blending tiles: 100%|██████████| 3/3 [00:00<00:00, 27.22it/s]\nExecuting node 34, title: Video Combine 🎥🅥🅗🅢, class type: VHS_VideoCombine\n[ComfyUI] Blending tiles: 100%|██████████| 3/3 [00:00<00:00, 27.17it/s]\n[ComfyUI] Prompt executed in 121.97 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": 143.465169224,
"total_time": 199.088967
},
"output": "https://replicate.delivery/xezq/KrsSZdZje4WYD65UT2NnavRoadmaYPYUOS6r65xf8nOYRfGoA/HunyuanVideo_00001.mp4",
"started_at": "2025-01-09T21:38:17.215798Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/bcwr-nkbgf3wccff5mcmykis4wytcmjuiwzty4yuxwnsnggfoejoh2qvq",
"get": "https://api.replicate.com/v1/predictions/nmwaw4h0q1rmc0cm9m0ahtfk2w",
"cancel": "https://api.replicate.com/v1/predictions/nmwaw4h0q1rmc0cm9m0ahtfk2w/cancel"
},
"version": "e82a415498ba81104f2c1f41833609e546cd53d2734b37740d685b122c93053f"
}
Random seed set to: 542482491
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 7, title: HunyuanVideo VAE Loader, class type: HyVideoVAELoader
[ComfyUI] Loading text encoder model (clipL) from: /src/ComfyUI/models/clip/clip-vit-large-patch14
Executing node 16, title: (Down)Load HunyuanVideo TextEncoder, class type: DownloadAndLoadHyVideoTextEncoder
[ComfyUI] Text encoder to dtype: torch.float16
[ComfyUI] Loading tokenizer (clipL) from: /src/ComfyUI/models/clip/clip-vit-large-patch14
[ComfyUI] Loading text encoder model (llm) from: /src/ComfyUI/models/LLM/llava-llama-3-8b-text-encoder-tokenizer
[ComfyUI]
[ComfyUI] Loading checkpoint shards: 0%| | 0/4 [00:00<?, ?it/s]
[ComfyUI] Loading checkpoint shards: 25%|██▌ | 1/4 [00:00<00:01, 1.62it/s]
[ComfyUI] Loading checkpoint shards: 50%|█████ | 2/4 [00:01<00:01, 1.66it/s]
[ComfyUI] Loading checkpoint shards: 75%|███████▌ | 3/4 [00:01<00:00, 1.68it/s]
[ComfyUI] Loading checkpoint shards: 100%|██████████| 4/4 [00:01<00:00, 2.41it/s]
[ComfyUI] Loading checkpoint shards: 100%|██████████| 4/4 [00:01<00:00, 2.07it/s]
[ComfyUI] Text encoder to dtype: torch.float16
[ComfyUI] Loading tokenizer (llm) from: /src/ComfyUI/models/LLM/llava-llama-3-8b-text-encoder-tokenizer
Executing node 30, title: HunyuanVideo TextEncode, class type: HyVideoTextEncode
[ComfyUI] llm prompt attention_mask shape: torch.Size([1, 161]), masked tokens: 42
[ComfyUI] clipL prompt attention_mask shape: torch.Size([1, 77]), masked tokens: 43
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.9
[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:05, 2.27s/it]
[ComfyUI] 7%|▋ | 2/30 [00:05<01:14, 2.67s/it]
[ComfyUI] 10%|█ | 3/30 [00:08<01:15, 2.79s/it]
[ComfyUI] 13%|█▎ | 4/30 [00:11<01:14, 2.85s/it]
[ComfyUI] 17%|█▋ | 5/30 [00:14<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.92s/it]
[ComfyUI] 27%|██▋ | 8/30 [00:22<01:04, 2.93s/it]
[ComfyUI] 30%|███ | 9/30 [00:25<01:01, 2.93s/it]
[ComfyUI] 33%|███▎ | 10/30 [00:28<00:58, 2.94s/it]
[ComfyUI] 37%|███▋ | 11/30 [00:31<00:55, 2.94s/it]
[ComfyUI] 40%|████ | 12/30 [00:34<00:52, 2.94s/it]
[ComfyUI] 43%|████▎ | 13/30 [00:37<00:50, 2.94s/it]
[ComfyUI] 47%|████▋ | 14/30 [00:40<00:47, 2.94s/it]
[ComfyUI] 50%|█████ | 15/30 [00:43<00:44, 2.95s/it]
[ComfyUI] 53%|█████▎ | 16/30 [00:46<00:41, 2.94s/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:12<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.94s/it]
[ComfyUI] 93%|█████████▎| 28/30 [01:21<00:05, 2.94s/it]
[ComfyUI] 97%|█████████▋| 29/30 [01:24<00:02, 2.94s/it]
[ComfyUI] 100%|██████████| 30/30 [01:27<00:00, 2.94s/it]
[ComfyUI] 100%|██████████| 30/30 [01:27<00:00, 2.92s/it]
[ComfyUI] Allocated memory: memory=12.758 GB
[ComfyUI] Max allocated memory: max_memory=16.274 GB
[ComfyUI] Max reserved memory: max_reserved=17.781 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.03s/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.05it/s]
[ComfyUI] Decoding rows: 100%|██████████| 3/3 [00:02<00:00, 1.02it/s]
[ComfyUI]
[ComfyUI] Blending tiles: 0%| | 0/3 [00:00<?, ?it/s]
[ComfyUI] Blending tiles: 100%|██████████| 3/3 [00:00<00:00, 27.22it/s]
Executing node 34, title: Video Combine 🎥🅥🅗🅢, class type: VHS_VideoCombine
[ComfyUI] Blending tiles: 100%|██████████| 3/3 [00:00<00:00, 27.17it/s]
[ComfyUI] Prompt executed in 121.97 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