[examples] add --enable-cpu-offload args (#930)
Signed-off-by: David Chen <530634352@qq.com>
This commit is contained in:
1 parent
28a6597c4c
commit
3d9cd16df7
8 files changed
+28
No files matched your search
@@ -28,3 +28,4 @@ Key arguments:
|
||||
- `--boundary_ratio`: Boundary split ratio for low/high DiT.
|
||||
- `--fps`: frames per second for the saved MP4 (requires `diffusers` export_to_video).
|
||||
- `--output`: path to save the generated video.
|
||||
- `--enable-cpu-offload`: enable CPU offloading for diffusion models.
|
||||
@@ -35,6 +35,11 @@ def parse_args() -> argparse.Namespace:
|
||||
)
|
||||
parser.add_argument("--output", type=str, default="wan22_output.mp4", help="Path to save the video (mp4).")
|
||||
parser.add_argument("--fps", type=int, default=24, help="Frames per second for the output video.")
|
||||
parser.add_argument(
|
||||
"--enable-cpu-offload",
|
||||
action="store_true",
|
||||
help="Enable CPU offloading for diffusion models.",
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
@@ -56,6 +61,7 @@ def main():
|
||||
vae_use_tiling=vae_use_tiling,
|
||||
boundary_ratio=args.boundary_ratio,
|
||||
flow_shift=args.flow_shift,
|
||||
enable_cpu_offload=args.enable_cpu_offload,
|
||||
)
|
||||
|
||||
if profiler_enabled:
|
||||
|
||||
Reference in new issue
Block a user