MCPcopy
hub / github.com/kohya-ss/sd-scripts / requires_grad_

Method requires_grad_

networks/lora_fa.py:97–100  ·  view source on GitHub ↗
(self, requires_grad: bool = True)

Source from the content-addressed store, hash-verified

95 return trainable_params
96
97 def requires_grad_(self, requires_grad: bool = True):
98 self.lora_up.requires_grad_(requires_grad)
99 self.lora_down.requires_grad_(False)
100 return self
101
102 def apply_to(self):
103 self.org_forward = self.org_module.forward

Callers 15

trainFunction · 0.80
load_dit_modelFunction · 0.80
trainMethod · 0.80
trainFunction · 0.80
mainFunction · 0.80
trainFunction · 0.80
load_dit_modelFunction · 0.80
trainFunction · 0.80
trainFunction · 0.80
mainFunction · 0.80
trainFunction · 0.80

Calls

no outgoing calls

Tested by 1

mainFunction · 0.64