MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / lr_lambda

Function lr_lambda

src/diffusers/optimization.py:73–76  ·  view source on GitHub ↗
(current_step: int)

Source from the content-addressed store, hash-verified

71 """
72
73 def lr_lambda(current_step: int):
74 if current_step < num_warmup_steps:
75 return float(current_step) / float(max(1.0, num_warmup_steps))
76 return 1.0
77
78 return LambdaLR(optimizer, lr_lambda, last_epoch=last_epoch)
79

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected