MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / patch_tensor_constructor

Function patch_tensor_constructor

diffsynth/models/utils.py:26–31  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

24 module._buffers[name] = module._buffers[name].to(device)
25
26 def patch_tensor_constructor(fn):
27 def wrapper(*args, **kwargs):
28 kwargs["device"] = device
29 return fn(*args, **kwargs)
30
31 return wrapper
32
33 if include_buffers:
34 tensor_constructors_to_patch = {

Callers 1

init_weights_on_deviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected