zurk / hunyuanvideo

API for HunyuanVideo text to video generator

  • Public
  • 10 runs
  • A100 (80GB)
  • GitHub
Iterate in playground

Input

Run this model in Node.js with one line of code:

npx create-replicate --model=zurk/hunyuanvideo
or set up a project from scratch
npm install replicate
Set the REPLICATE_API_TOKEN environment variable:
export REPLICATE_API_TOKEN=<paste-your-token-here>

Find your API token in your account settings.

Import and set up the client:
import Replicate from "replicate";
import fs from "node:fs";

const replicate = new Replicate({
  auth: process.env.REPLICATE_API_TOKEN,
});

Run zurk/hunyuanvideo using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.

const output = await replicate.run(
  "zurk/hunyuanvideo:d12e226425c7cc026ca374b44628d7cb9f3a1faf8d4579bc0161ca5815138dc3",
  {
    input: {
      width: 1280,
      height: 720,
      prompt: "A cat walks on the grass, realistic style.",
      flow_shift: 7,
      flow_reverse: true,
      video_length: 129,
      guidance_scale: 6,
      num_inference_steps: 50,
      embedded_guidance_scale: 6
    }
  }
);

// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"

// To write the file to disk:
fs.writeFile("my-image.png", output[0]);

To learn more, take a look at the guide on getting started with Node.js.

Output

No output yet! Press "Submit" to start a prediction.

Run time and cost

This model runs on Nvidia A100 (80GB) GPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

WORK IN PROGRESS, STAY TUNNED

HunyuanVideo API

HunyuanVideo is a state-of-the-art text-to-video generation model that creates high-quality videos from text descriptions. This model outperforms many closed-source alternatives in text alignment, motion quality, and visual quality.

Examples

import replicate

output = replicate.run(
    "zurk/hunyuanvideo:main",
    input={
        "prompt": "A cat walks on the grass, realistic style.",
        "width": 1280,
        "height": 720,
        "video_length": 129,
        "guidance_scale": 6.0,
        "num_inference_steps": 50,
        "seed": 43,
    }
)

Parameters

  • prompt (string, required) - Text description of the video you want to generate
  • negative_prompt (string, optional) - Text describing what you don’t want in the video
  • width (integer, default: 1280) - Video width in pixels
  • height (integer, default: 720) - Video height in pixels
  • video_length (integer, default: 129) - Number of frames (max 129)
  • seed (integer, optional) - Random seed for reproducibility
  • guidance_scale (float, default: 6.0) - Controls how closely the model follows the prompt
  • embedded_guidance_scale (float, default: 6.0) - Additional guidance scale for embedded features
  • num_inference_steps (integer, default: 50) - Number of denoising steps
  • flow_shift (float, default: 7.0) - Flow shift parameter for motion control
  • flow_reverse (boolean, default: true) - Whether to reverse flow direction

Limitations

  • Maximum video length is 129 frames (5.3 seconds)

Feedback

If you have any issues running this API, create an issue on https://github.com/zurk/replicate-hunyuan-video/issues I try to fix them as soon as possible. However, I do not have direct access to GPUs with 80GB VRAM, so it may take some time.

For more details, visit the HunyuanVideo GitHub repository.