defaultA cat walks on the grass, realistic style.
typetext
{
"embedded_cfg_scale": 6,
"flow_shift": 17,
"fps": 24,
"guidance_scale": 1,
"height": 720,
"negative_prompt": "",
"num_frames": 125,
"num_inference_steps": 6,
"prompt": "A cat walks on the grass, realistic style.",
"seed": 0,
"width": 1280
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_XnJ**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run jzhang38/fast-hunyuan-video using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"jzhang38/fast-hunyuan-video:6915992f696ccc626a53bb3e7e8941af911e9121df705d5f2cfde4a2a58f8330",
{
input: {
embedded_cfg_scale: 6,
flow_shift: 17,
fps: 24,
guidance_scale: 1,
height: 720,
negative_prompt: "",
num_frames: 125,
num_inference_steps: 6,
prompt: "A cat walks on the grass, realistic style.",
seed: 0,
width: 1280
}
}
);
// 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=r8_XnJ**********************************
This is your API token. Keep it to yourself.
import replicate
Run jzhang38/fast-hunyuan-video using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"jzhang38/fast-hunyuan-video:6915992f696ccc626a53bb3e7e8941af911e9121df705d5f2cfde4a2a58f8330",
input={
"embedded_cfg_scale": 6,
"flow_shift": 17,
"fps": 24,
"guidance_scale": 1,
"height": 720,
"negative_prompt": "",
"num_frames": 125,
"num_inference_steps": 6,
"prompt": "A cat walks on the grass, realistic style.",
"seed": 0,
"width": 1280
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_XnJ**********************************
This is your API token. Keep it to yourself.
Run jzhang38/fast-hunyuan-video 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": "jzhang38/fast-hunyuan-video:6915992f696ccc626a53bb3e7e8941af911e9121df705d5f2cfde4a2a58f8330",
"input": {
"embedded_cfg_scale": 6,
"flow_shift": 17,
"fps": 24,
"guidance_scale": 1,
"height": 720,
"negative_prompt": "",
"num_frames": 125,
"num_inference_steps": 6,
"prompt": "A cat walks on the grass, realistic style.",
"seed": 0,
"width": 1280
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "6990bz5xjsrme0ckvggsrh7pxr",
"model": "jzhang38/fast-hunyuan-video",
"version": "6915992f696ccc626a53bb3e7e8941af911e9121df705d5f2cfde4a2a58f8330",
"input": {
"embedded_cfg_scale": 6,
"flow_shift": 17,
"fps": 24,
"guidance_scale": 1,
"height": 720,
"negative_prompt": "",
"num_frames": 125,
"num_inference_steps": 6,
"prompt": "A cat walks on the grass, realistic style.",
"seed": 0,
"width": 1280
},
"logs": "Using seed: 26705\n2024-12-18 23:38:43.793 | INFO | fastvideo.models.hunyuan.inference:predict:444 - Input (height, width, video_length) = (720, 1280, 125)\n2024-12-18 23:38:43.793 | DEBUG | fastvideo.models.hunyuan.inference:predict:502 -\nheight: 720\nwidth: 1280\nvideo_length: 125\nprompt: ['A cat walks on the grass, realistic style.']\nneg_prompt: ['Aerial view, aerial view, overexposed, low quality, deformation, a poor composition, bad hands, bad teeth, bad eyes, bad limbs, distortion']\nseed: 26705\ninfer_steps: 6\nnum_videos_per_prompt: 1\nguidance_scale: 1.0\nn_tokens: 460800\nflow_shift: 17\nembedded_guidance_scale: 6.0\n 0%| | 0/6 [00:00<?, ?it/s]\n 17%|█▋ | 1/6 [00:33<02:47, 33.48s/it]\n 33%|███▎ | 2/6 [01:06<02:12, 33.19s/it]\n 50%|█████ | 3/6 [01:39<01:39, 33.32s/it]\n 67%|██████▋ | 4/6 [02:13<01:06, 33.38s/it]\n 83%|████████▎ | 5/6 [02:46<00:33, 33.43s/it]\n100%|██████████| 6/6 [03:20<00:00, 33.44s/it]\n100%|██████████| 6/6 [03:20<00:00, 33.40s/it]\n2024-12-18 23:42:36.345 | INFO | fastvideo.models.hunyuan.inference:predict:530 - Success, time: 232.55122566223145\nhuggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\nTo disable this warning, you can either:\n- Avoid using `tokenizers` before the fork if possible\n- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)",
"output": "https://replicate.delivery/xezq/AifSVmGKpbzuBiXNcergoyqf6DqcEgls0j06JDmf0vN1eHifE/output.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-12-18T23:36:59.03Z",
"started_at": "2024-12-18T23:38:43.795291Z",
"completed_at": "2024-12-18T23:42:37.591346Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/6990bz5xjsrme0ckvggsrh7pxr/cancel",
"get": "https://api.replicate.com/v1/predictions/6990bz5xjsrme0ckvggsrh7pxr",
"stream": "https://stream.replicate.com/v1/files/bcwr-5s7tr6wle6heeipntr6krxljmx5tazgcvzfe23ljekegbbkk32xq",
"web": "https://replicate.com/p/6990bz5xjsrme0ckvggsrh7pxr"
},
"metrics": {
"predict_time": 233.796054406,
"total_time": 338.561346
}
}