MCPcopy
hub / github.com/kohya-ss/sd-scripts / offloader

Function offloader

tests/test_custom_offloading_utils.py:130–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128# Offloader Tests
129@pytest.fixture
130def offloader():
131 device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
132 return Offloader(
133 num_blocks=4,
134 blocks_to_swap=2,
135 device=device,
136 debug=False
137 )
138
139
140def test_offloader_init(offloader):

Callers

nothing calls this directly

Calls 2

OffloaderClass · 0.90
deviceMethod · 0.45

Tested by

no test coverage detected