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

Method get_diff_weight

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

Source from the content-addressed store, hash-verified

219 weight *= drop
220
221 return weight * self.scalar.to(device)
222
223 def get_diff_weight(self, multiplier=1, shape=None, device=None):
224 scale = self.scale * multiplier
225 diff = self.make_weight(device=device) * scale
226 if shape is not None:
227 diff = diff.view(shape)
228 if device is not None:
229 diff = diff.to(device)
230 return diff, None
231

Callers 1

get_merged_weightMethod · 0.95

Calls 1

make_weightMethod · 0.95

Tested by

no test coverage detected