mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-20 23:58:12 +00:00
hunyuanvideo_vae_decoder
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from diffsynth import ModelManager, HunyuanVideoPipeline, download_models
|
||||
from diffsynth import ModelManager, HunyuanVideoPipeline, download_models, save_video
|
||||
import torch
|
||||
|
||||
|
||||
@@ -8,9 +8,11 @@ download_models(["HunyuanVideo"])
|
||||
# Load models
|
||||
model_manager = ModelManager(torch_dtype=torch.float16, device="cuda")
|
||||
model_manager.load_models([
|
||||
"models/HunyuanVideo/vae/pytorch_model.pt",
|
||||
"t2i_models/HunyuanVideo/text_encoder/model.safetensors",
|
||||
"t2i_models/HunyuanVideo/text_encoder_2",
|
||||
])
|
||||
pipe = HunyuanVideoPipeline.from_model_manager(model_manager)
|
||||
prompt = 'A cat walks on the grass, realistic style.'
|
||||
pipe(prompt)
|
||||
frames = pipe(prompt)
|
||||
save_video(frames, 'test_video.mp4', fps=8, quality=5)
|
||||
|
||||
Reference in New Issue
Block a user