[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
@@ -279,6 +279,11 @@ def parse_args() -> argparse.Namespace:
|
||||
action="store_true",
|
||||
help="Disable torch.compile and force eager execution.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--enable-cpu-offload",
|
||||
action="store_true",
|
||||
help="Enable CPU offloading for diffusion models.",
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
@@ -344,6 +349,7 @@ def main():
|
||||
cache_config=cache_config,
|
||||
parallel_config=parallel_config,
|
||||
enforce_eager=args.enforce_eager,
|
||||
enable_cpu_offload=args.enable_cpu_offload,
|
||||
)
|
||||
print("Pipeline loaded")
|
||||
|
||||
|
||||
Reference in new issue
Block a user