(x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15)
| 122 | |
| 123 | |
| 124 | def get_lin_function(x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15): |
| 125 | m = (y2 - y1) / (x2 - x1) |
| 126 | b = y1 - m * x1 |
| 127 | return lambda x: m * x + b |
| 128 | |
| 129 | |
| 130 | def guidance_embed_bypass_forward(self, timestep, guidance, pooled_projection): |