support stepvideo quantized

This commit is contained in:
Artiprocher
2025-02-17 19:43:47 +08:00
parent 3681adc5ac
commit f191353cf4
6 changed files with 63 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ torch.ops.load_library("models/stepfun-ai/stepvideo-t2v/lib/liboptimus_ths-torch
# Load models
model_manager = ModelManager()
model_manager.load_models(
["models/stepvideo-t2v/hunyuan_clip/clip_text_encoder/pytorch_model.bin"],
["models/stepfun-ai/stepvideo-t2v/hunyuan_clip/clip_text_encoder/pytorch_model.bin"],
torch_dtype=torch.float32, device="cpu"
)
model_manager.load_models(
@@ -42,6 +42,6 @@ pipe.enable_vram_management(num_persistent_param_in_dit=None)
video = pipe(
prompt="一名宇航员在月球上发现一块石碑上面印有“stepfun”字样闪闪发光。超高清、HDR 视频、环境光、杜比全景声、画面稳定、流畅动作、逼真的细节、专业级构图、超现实主义、自然、生动、超细节、清晰。",
negative_prompt="画面暗、低分辨率、不良手、文本、缺少手指、多余的手指、裁剪、低质量、颗粒状、签名、水印、用户名、模糊。",
num_inference_steps=30, cfg_scale=9, num_frames=204, seed=1
num_inference_steps=30, cfg_scale=9, num_frames=51, seed=1
)
save_video(video, "video.mp4", fps=25, quality=5)