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

Function log_duration

utils/common.py:60–65  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

58
59@contextmanager
60def log_duration(name):
61 start = time.time()
62 try:
63 yield
64 finally:
65 print(f'{name}: {time.time()-start:.3f}')
66
67
68def load_safetensors(path):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected