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

Method cast_weight

diffsynth/models/flux_controlnet.py:121–128  ·  view source on GitHub ↗
(s, input=None, dtype=None, device=None)

Source from the content-addressed store, hash-verified

119 return r
120
121 def cast_weight(s, input=None, dtype=None, device=None):
122 if input is not None:
123 if dtype is None:
124 dtype = input.dtype
125 if device is None:
126 device = input.device
127 weight = cast_to(s.weight, dtype, device)
128 return weight
129
130 def cast_bias_weight(s, input=None, dtype=None, device=None, bias_dtype=None):
131 if input is not None:

Callers

nothing calls this directly

Calls 1

cast_toFunction · 0.85

Tested by

no test coverage detected