MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / rule_func

Function rule_func

diffusers/src/diffusers/optimization.py:109–114  ·  view source on GitHub ↗
(steps: int)

Source from the content-addressed store, hash-verified

107
108 def create_rules_function(rules_dict, last_lr_multiple):
109 def rule_func(steps: int) -> float:
110 sorted_steps = sorted(rules_dict.keys())
111 for i, sorted_step in enumerate(sorted_steps):
112 if steps < sorted_step:
113 return rules_dict[sorted_steps[i]]
114 return last_lr_multiple
115
116 return rule_func
117

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected