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 e799516 commit d3e8678Copy full SHA for d3e8678
tests/pipelines/controlnet/test_controlnet.py
@@ -951,10 +951,7 @@ def test_sequential_cpu_offloading(self):
951
output_type="np",
952
)
953
954
- if torch_device == "cuda":
955
- mem_bytes = torch.cuda.max_memory_allocated()
956
- elif torch_device == "xpu":
957
- mem_bytes = torch.xpu.max_memory_allocated()
+ mem_bytes = backend_max_memory_allocated(torch_device)
958
# make sure that less than 7 GB is allocated
959
assert mem_bytes < 4 * 10**9
960
0 commit comments