MCPcopy Create free account
hub / github.com/KohakuBlueleaf/LyCORIS / get_diff_weight

Method get_diff_weight

lycoris/modules/loha.py:228–233  ·  view source on GitHub ↗
(self, multiplier=1, shape=None, device=None)

Source from the content-addressed store, hash-verified

226 drop /= drop.mean()
227 weight *= drop
228 return weight
229
230 def get_diff_weight(self, multiplier=1, shape=None, device=None):
231 scale = self.scale * multiplier
232 diff = self.get_weight(shape) * scale
233 if device is not None:
234 diff = diff.to(device)
235 return diff, None
236

Callers 1

get_merged_weightMethod · 0.95

Calls 1

get_weightMethod · 0.95

Tested by

no test coverage detected