Hunyuan Custom Ref2V 720p
HunyuanCustom, a multi-modal, conditional, and controllable generation model centered on subject consistency, built upon the Hunyuan Video generation framework. It enables the generation of subject-consistent videos conditioned on text, images, audio, and video inputs.
Features
hunyuan-custom-ref2v-720p is an open-source, multimodal-driven architecture for customized video generation, powered by HunyuanVideo-13B. Outperforming existing open-source models, it rivals top closed-source solutions!
Key Features
- Single-Subject Video: Upload an image + text to videos with new actions, outfits, and scenes.
- Multi-Subject Video: Generate videos with multiple subjects from separate image inputs.
- Audio-Driven Video: Sync audio with visuals for talking or singing in any scene.
- Video-Driven Video: Seamlessly insert or replace subjects into any video for creative enhancements.
ComfyUI
hunyuan-custom-ref2v-720p text + image to video is available on ComfyUI, providing local inference capabilities through a node-based workflow, ensuring flexible and efficient image generation on your system.
Use Cases
- Virtual advertising and try-on: By accepting multiple image inputs, HunyuanCustom enables the creation of virtual human advertisements and virtual try-on experiences with consistent character appearance.
- Singing avatar generation: With combined image and audio inputs, it supports the generation of realistic singing avatars for entertainment and digital performer use cases.
- Video editing and subject replacement: By using an image and a video as inputs, HunyuanCustom can replace subjects in the video with those from the image, supporting advanced creative editing scenarios.
Accelerated Inference
Our accelerated inference approach leverages advanced optimization technology from WavespeedAI. This innovative fusion technique significantly reduces computational overhead and latency, enabling rapid image generation without compromising quality. The entire system is designed to efficiently handle large-scale inference tasks while ensuring that real-time applications achieve an optimal balance between speed and accuracy. For further details, please refer to the blog post.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v2/wavespeed-ai/hunyuan-custom-ref2v-720p" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
"image": "https://d2g64w682n9w0w.cloudfront.net/media/ec44bbf6abac4c25998dd2c4af1a46a7/images/1746956054461504207_FMWhea6G.png",
"prompt": "A man is writing a letter at his desk.",
"negative_prompt": "",
"size": "1280*720",
"guidance_scale": 7.5,
"flow_shift": 13,
"seed": -1,
"enable_safety_checker": true
}'
# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v2/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"
Parameters
Task Submission Parameters
Request Parameters
Parameter | Type | Required | Default | Range | Description |
---|---|---|---|---|---|
image | string | Yes | https://d2g64w682n9w0w.cloudfront.net/media/ec44bbf6abac4c25998dd2c4af1a46a7/images/1746956054461504207_FMWhea6G.png | - | The image for generating the output. |
prompt | string | Yes | A man is writing a letter at his desk. | - | |
negative_prompt | string | No | - | - | The negative prompt for generating the output. |
size | string | No | 1280*720 | 1280*720, 720*1280 | The size of the output. |
guidance_scale | number | No | 7.5 | 1.0 ~ 10.0 | The guidance scale for generation. |
flow_shift | number | No | 13 | 1.0 ~ 20.0 | The shift value for the timestep schedule for flow matching. |
seed | integer | No | -1 | -1 ~ 9999999999 | The seed for random number generation. |
enable_safety_checker | boolean | No | true | - | Whether to enable the safety checker. |
Response Parameters
Parameter | Type | Description |
---|---|---|
code | integer | HTTP status code (e.g., 200 for success) |
message | string | Status message (e.g., “success”) |
data.id | string | Unique identifier for the prediction, Task Id |
data.model | string | Model ID used for the prediction |
data.outputs | array | Array of URLs to the generated content (empty when status is not completed ) |
data.urls | object | Object containing related API endpoints |
data.urls.get | string | URL to retrieve the prediction result |
data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
data.status | string | Status of the task: created , processing , completed , or failed |
data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
data.error | string | Error message (empty if no error occurred) |
data.timings | object | Object containing timing details |
data.timings.inference | integer | Inference time in milliseconds |
Result Query Parameters
Result Request Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
id | string | Yes | - | Task ID |
Result Response Parameters
Parameter | Type | Description |
---|---|---|
code | integer | HTTP status code (e.g., 200 for success) |
message | string | Status message (e.g., “success”) |
data | object | The prediction data object containing all details |
data.id | string | Unique identifier for the prediction |
data.model | string | Model ID used for the prediction |
data.outputs | array | Array of URLs to the generated content (empty when status is not completed ) |
data.urls | object | Object containing related API endpoints |
data.urls.get | string | URL to retrieve the prediction result |
data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
data.status | string | Status of the task: created , processing , completed , or failed |
data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
data.error | string | Error message (empty if no error occurred) |
data.timings | object | Object containing timing details |
data.timings.inference | integer | Inference time in milliseconds |