(begin, end, n, length, type="linear")
| 535 | |
| 536 | def _forward(self, latent, steps, t0, lora_scale_min, text_embeddings, generator): |
| 537 | def scale_schedule(begin, end, n, length, type="linear"): |
| 538 | if type == "constant": |
| 539 | return end |
| 540 | elif type == "linear": |
| 541 | return begin + (end - begin) * n / length |
| 542 | elif type == "cos": |
| 543 | factor = (1 - math.cos(n * math.pi / length)) / 2 |
| 544 | return (1 - factor) * begin + factor * end |
| 545 | else: |
| 546 | raise NotImplementedError(type) |
| 547 | |
| 548 | noises = [] |
| 549 | latents = [] |
nothing calls this directly
no outgoing calls
no test coverage detected