MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / register_empty_buffer

Function register_empty_buffer

src/utils.py:21–24  ·  view source on GitHub ↗
(module, name, buffer, persistent=True)

Source from the content-addressed store, hash-verified

19 )
20
21 def register_empty_buffer(module, name, buffer, persistent=True):
22 old_register_buffer(module, name, buffer, persistent=persistent)
23 if buffer is not None:
24 module._buffers[name] = module._buffers[name].to(device)
25
26 def patch_tensor_constructor(fn):
27 def wrapper(*args, **kwargs):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected