Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: support HunyuanVideo #2721

Merged
merged 6 commits into from
Dec 30, 2024
Merged

Conversation

qinxuye
Copy link
Contributor

@qinxuye qinxuye commented Dec 30, 2024

I ran on a 48GB GPU. Loading model with CPU offload, or OOM will occur even for 320x512 resolusion.

Loading model:

xinference launch --model-name HunyuanVideo --model-type video --cpu_offload True

Inference:

from xinference.client import Client

client = Client("http://127.0.0.1:9997")
model = client.get_model("HunyuanVideo")

input_text = "A cat walks on the grass, realistic"

resp = model.text_to_video(input_text, height=320, width=512, num_frames=61, num_inference_steps=30)

b64_video = resp['data'][0]['b64_json']
video_bytes = base64.b64decode(b64_video)
with open('1.mp4', 'wb') as f:
    f.write(video_bytes)

Result:

1.mp4

@XprobeBot XprobeBot added the gpu label Dec 30, 2024
@XprobeBot XprobeBot added this to the v1.x milestone Dec 30, 2024
@qinxuye qinxuye changed the title Feat/hunyuanvideo FEAT: support HunyuanVideo Dec 30, 2024
@qinxuye qinxuye marked this pull request as ready for review December 30, 2024 07:25
Copy link
Contributor

@codingl2k1 codingl2k1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qinxuye qinxuye merged commit 267c412 into xorbitsai:main Dec 30, 2024
12 of 13 checks passed
@qinxuye qinxuye deleted the feat/hunyuanvideo branch December 30, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants