(self, timestep, sample, sample_stablized)
| 197 | |
| 198 | |
| 199 | def return_to_timestep(self, timestep, sample, sample_stablized): |
| 200 | if isinstance(timestep, torch.Tensor): |
| 201 | timestep = timestep.cpu() |
| 202 | timestep_id = torch.argmin((self.timesteps - timestep).abs()) |
| 203 | sigma = self.sigmas[timestep_id] |
| 204 | model_output = (sample - sample_stablized) / sigma |
| 205 | return model_output |
| 206 | |
| 207 | |
| 208 | def add_noise(self, original_samples, noise, timestep): |
nothing calls this directly
no outgoing calls
no test coverage detected