From dea542ee77fc90306ad2a20d16f9111f1829be59 Mon Sep 17 00:00:00 2001 From: chengzeyi Date: Fri, 20 Dec 2024 11:39:38 +0800 Subject: [PATCH] prefer enable_model_cpu_offload for hunyuan video --- examples/hunyuan_video_usp_example.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/hunyuan_video_usp_example.py b/examples/hunyuan_video_usp_example.py index 9895a3f..b04da1c 100644 --- a/examples/hunyuan_video_usp_example.py +++ b/examples/hunyuan_video_usp_example.py @@ -232,12 +232,12 @@ def main(): if args.enable_tiling: pipe.vae.enable_tiling( # Make it runnable on GPUs with 48GB memory - tile_sample_min_height=128, - tile_sample_stride_height=96, - tile_sample_min_width=128, - tile_sample_stride_width=96, - tile_sample_min_num_frames=32, - tile_sample_stride_num_frames=24, + # tile_sample_min_height=128, + # tile_sample_stride_height=96, + # tile_sample_min_width=128, + # tile_sample_stride_width=96, + # tile_sample_min_num_frames=32, + # tile_sample_stride_num_frames=24, ) if args.enable_slicing: @@ -298,7 +298,7 @@ def main(): get_runtime_state().destory_distributed_env() -# mkdir -p results && torchrun --nproc_per_node=2 examples/hunyuan_video_usp_example.py --model tencent/HunyuanVideo --ulysses_degree 2 --num_inference_steps 30 --warmup_steps 0 --prompt "A cat walks on the grass, realistic" --height 320 --width 512 --num_frames 61 --enable_tiling +# mkdir -p results && torchrun --nproc_per_node=2 examples/hunyuan_video_usp_example.py --model tencent/HunyuanVideo --ulysses_degree 2 --num_inference_steps 30 --warmup_steps 0 --prompt "A cat walks on the grass, realistic" --height 320 --width 512 --num_frames 61 --enable_tiling --enable_model_cpu_offload # mkdir -p results && torchrun --nproc_per_node=2 examples/hunyuan_video_usp_example.py --model tencent/HunyuanVideo --ulysses_degree 2 --num_inference_steps 30 --warmup_steps 0 --prompt "A cat walks on the grass, realistic" --height 544 --width 960 --num_frames 129 --enable_tiling --enable_model_cpu_offload if __name__ == "__main__": main()