We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54461e5 commit 4cae178Copy full SHA for 4cae178
examples/parallelism/run_flux2_tp.py
@@ -76,8 +76,12 @@
76
77
if world_size < 4 and GiB() <= 48:
78
assert not args.compile, "Compilation requires more GPU memory. Please disable it."
79
- pipe.enable_model_cpu_offload(device=device)
80
- print("Enabled model CPU offload.")
+ if world_size < 2:
+ pipe.enable_sequential_cpu_offload(device=device)
81
+ print("Enabled sequential CPU offload.")
82
+ else:
83
+ pipe.enable_model_cpu_offload(device=device)
84
+ print("Enabled model CPU offload.")
85
else:
86
pipe.to(device)
87
0 commit comments