MCPcopy Create free account
hub / github.com/tdrussell/diffusion-pipe / zero_first

Function zero_first

utils/common.py:38–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36
37@contextmanager
38def zero_first():
39 if not is_main_process():
40 dist.barrier()
41 yield
42 if is_main_process():
43 dist.barrier()
44
45
46@contextmanager

Callers

nothing calls this directly

Calls 1

is_main_processFunction · 0.85

Tested by

no test coverage detected