(self, sigmas, weight_type: str = 'SNR')
| 153 | num_inference_steps, shift_scale, device=device) |
| 154 | |
| 155 | def loss_weight(self, sigmas, weight_type: str = 'SNR'): |
| 156 | if weight_type == 'SNR': |
| 157 | w = (1 - sigmas)**2 |
| 158 | raise NotImplementedError(f'Not fully implement SNR: w={w}') |
| 159 | elif weight_type == 'min-SNR': |
| 160 | w = min((1 - sigmas)**2, 0.5) |
| 161 | raise NotImplementedError(f'Not fully implement min-SNR: w={w}') |
| 162 | elif weight_type == 'ones': |
| 163 | return torch.ones_like(sigmas) |
nothing calls this directly
no outgoing calls
no test coverage detected